How do I know which manifest branch I am working on?

2,592 views
Skip to first unread message

johnny

unread,
Apr 29, 2009, 10:36:19 PM4/29/09
to Repo and Gerrit Discussion
Hi Shawn,

I am using repo mirror to create a mirror server of AOSP. When I
specify a manifest repository, I also need to specify a branch.
Different branch of the manifest file may include different set of
projects. If I want to sync both the master and cupcake branch, I need
type: repo init -b cupcake && repo sync and then repo init -b master
&& repo sync. Is that correct?

I just completed a repo sync. But suddenly I was aware that I didn't
know which branch I just synced. So is there a way to know which
branch of manifest I am working on?

Thanks,
Johnny Xia.

Brad Larson

unread,
Apr 30, 2009, 3:16:34 PM4/30/09
to Repo and Gerrit Discussion


On Apr 29, 9:36 pm, johnny <johnny...@gmail.com> wrote:
> Hi Shawn,
>
> I am using repo mirror to create a mirror server of AOSP. When I
> specify a manifest repository, I also need to specify a branch.
> Different branch of the manifest file may include different set of
> projects. If I want to sync both the master and cupcake branch, I need
> type: repo init -b cupcake && repo sync and then repo init -b master
> && repo sync. Is that correct?

Not exactly. Just a repo sync will update all the projects in the
manifest, which will download the changes for all branches in each
project. You only need to switch the manifest branch if it lists
different projects from one branch to the other. It might make sense
to use 2 sandboxes in this case.


>
> I just completed a repo sync. But suddenly I was aware that I didn't
> know which branch I just synced. So is there a way to know which
> branch of manifest I am working on?

You should be able to see which branch your manifest is on by:
$ cd .repo/manifests/
$ git-remote show origin
And look for which branch a 'git pull' will merge with. If that
doesn't work, just cat .git/config and see what default is tracking.
I'm sure Shawn knows a better way to do this...


>
> Thanks,
> Johnny Xia.

Shawn Pearce

unread,
Apr 30, 2009, 3:29:36 PM4/30/09
to repo-d...@googlegroups.com
On Thu, Apr 30, 2009 at 12:16, Brad Larson <bkla...@gmail.com> wrote:

You should be able to see which branch your manifest is on by:
$ cd .repo/manifests/
$ git-remote show origin
And look for which branch a 'git pull' will merge with.  If that
doesn't work, just cat .git/config and see what default is tracking.
I'm sure Shawn knows a better way to do this...

Nope, that's the only way to know.  :-)

johnny

unread,
May 1, 2009, 9:39:51 AM5/1/09
to Repo and Gerrit Discussion
That works. Thanks Brad and Shawn.

On May 1, 3:29 am, Shawn Pearce <s...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages