简体   繁体   English

git-repo ( aosp repo ) 的替代品

[英]alternative to git-repo ( aosp repo )

I have recently started to look into android development (aosp) and read about "repo" tool/wrapper that takes care of all the android's sub projects .我最近开始研究 android 开发 (aosp) 并阅读有关处理所有 android 子项目的“repo”工具/包装器。

While I think repo does a fairly good job at what it does, I wanted to know if there are any alternatives to it.虽然我认为 repo 在它所做的方面做得相当好,但我想知道是否有任何替代方案。

I thought git submodules are sufficient for this but many posts on internet discourage use of submodules ( due to some "drawbacks" which I feel are not drawbacks at all ).我认为 git submodules 就足够了,但互联网上的许多帖子不鼓励使用子模块(由于一些“缺点”,我觉得这根本不是缺点)。

Keeping in mind that the source code for different sub projects should have their own releases or indipendednt code bases I am not sure if git subtree is a good solution for this.请记住,不同子项目的源代码应该有自己的版本或独立的代码库,我不确定 git subtree 是否是一个很好的解决方案。

It would be great if someone can point out some alternatives to repo or any other information about this.如果有人可以指出回购的一些替代方案或有关此的任何其他信息,那就太好了。

The repo tool is the standard way to work with AOSP code base.回购工具是使用 AOSP 代码库的标准方式。 Sure you can manually manage the repos yourself but that is going to be rather tiresome and error prone.当然,您可以自己手动管理存储库,但这会相当烦人且容易出错。

Otherwise using submodules or subtrees won't let you inter-operate with Google and everyone else working on the AOSP codebase, so unless you are planning to do a one-way fork of AOSP there are no alternatives to the repo tool for working on AOSP.否则,使用子模块或子树将无法让您与 Google 以及在 AOSP 代码库上工作的其他所有人进行互操作,因此除非您计划进行 AOSP 的单向分支,否则除了用于 AOSP 的 repo 工具之外别无选择.

repo has one huge disadvantage: it detaches HEADs. repo有一个巨大的缺点:它分离了 HEAD。 You can't switch to specific branch under specific subrepo.您无法切换到特定子仓库下的特定分支。 Unless you do repo start除非你做repo start

tsrc , as far as I know, has less functionality but doesn't have this specific problem. tsrc ,据我所知,功能较少,但没有这个具体问题。

Also, you can use embedded mechanisms of build systems like Bazel (git_repository/new_git_repository).此外,您还可以使用 Bazel (git_repository/new_git_repository) 等构建系统的嵌入式机制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM