I copied the android repositories to local pc with repo init and repo sync, the branch is ics_rb7. In manifest.xml file, revision is ics_rb7.2, that's supposed to mean the branch in each project, right? However, the branch ics_rb7.2 doesn't exist on all projects in the repository. How do we know which branch in the projects is the default cloned one? Thanks,
1 Answers
The branch that you specify in your repo init
is the branch to use for the manifest repository only. You can find this repository in .repo/manifests
. This branch is not necessarily (or even usually) the same branch that will be used for the individual projects.
The manifest.xml
file in .repo is actually a symbolic link to the specific manifest within the manifests repository (use ls -l
to see which one). It is created when you do a repo init
, using the branch (-b) and manifest (-m) flags that you specified to determine which one to use, or using the defaults (e.g. master and default.xml) if you didn't specify these flags.
The manifest file specifies the default revision for projects using the element, but the individual elements can override this and specify a different revision. This may explain why some of your projects do not have the ics_rb7.2 branch.
If you want to work out what the manifest branch is for a given project, you can either look at the manifest.xml file, or do a git branch -a
and look for a branch that looks like this:
remotes/m/my_manifest_branch

- 511
- 3
- 5
-
There will be more than one branch of the form `remotes/m/my_manifest_branch` if you've been switching repo branches. It seems hard to work out what the last checked out repo branch is – Sam Liddicott Dec 17 '19 at 09:52