how repo to switch the manifest.xml

4,162 views
Skip to first unread message

Liang Peng

unread,
Jul 6, 2011, 10:21:16 PM7/6/11
to repo-d...@googlegroups.com
Hi,

    I init my repo  by "repo init -u ... -b froyo-x86 and repo sync", then what to do if I want the switch the manifest to "gingerbread-x86" ?

     I tried this way:
              
              #cd .repo/manifests/
              #git checkout -t origin/gingerbread-x86
              #cd ../../
              #repo sync

     Yeah, it does work, but takes some time to sync.

     Does any repo command or some simple way can just switch all the project to a branch and update the manifest.xml?
  
     "repo forall -c git checkout gingerbread-x86" does not work, because not all project have the gingerbread-x86 branch.

   
--
Best regards,
Peng Liang

Luthander, Fredrik

unread,
Jul 7, 2011, 10:47:49 AM7/7/11
to Liang Peng, repo-d...@googlegroups.com

Hi Peng!

 

I'm not sure of the consequences when doing this, but I know of several people in my $DAYJOB that just reruns repo init with the new branch.

 

I would however rather recommend you to setup a reference directory [1] and then initiate two workspaces with one branch each from there instead.

 

[1] Explained for instance here: http://www.excentral.org/archives/2011/02/24/android-repo-mirroring

you can rerun repo init with the --reference switch in any number of work spaces, it will reuse the mirror directory for each of them. Ultimately you might want to setup a repo sync job in your crontab to keep the mirror up to date when you run repo sync in your workspaces.. saves you even more time. J

 

--

Best regards,

    Fredrik Luthander

Sony Ericsson Mobile Communications AB

Magnus Bäck

unread,
Jul 7, 2011, 12:20:40 PM7/7/11
to repo-d...@googlegroups.com
On Thursday, July 07, 2011 at 04:21 CEST,
Liang Peng <pengli...@gmail.com> wrote:

> I init my repo by "repo init -u ... -b froyo-x86 and repo sync", then
> what to do if I want the switch the manifest to "gingerbread-x86" ?

Easiest way:

repo init -b gingerbread-x86

You can certainly set up multiple workspaces as Fredrik suggests, but if
you're abandoning froyo-x86 for good there might be little point in that.

[...]

--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Reply all
Reply to author
Forward
0 new messages