Lakshman Chilukuri
Lakshman Chilukuri

Reputation: 1067

Downloading Android source with repo

When I give these commands then the 2.3.7 branch gets initialized in current directory and source gets downloaded.

repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1

repo sync

Thereafter if I give following command what exactly happens

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

or

repo init -u https://android.googlesource.com/platform/manifest 

My Questions

  1. Will my earlier branch be deleted which I have downloaded with great difficulty? Cant I have multiple branches existing simultaneously?

  2. If I can have more than one branch then how to access them? I dont see any directory called 2.3.7 or 4.0.1.

  3. The repo directory structure is very confusing. Can anybody guide?

Upvotes: 0

Views: 1597

Answers (3)

Ryu_hayabusa
Ryu_hayabusa

Reputation: 3722

I see that you want to sync a new branch while using the files downloaded at previous sync to save download time.

  1. create a new directory
  2. copy the .repo file (hidden) from the old branch_folder (gingerbread in your case) to a new directory
  3. cd into that directory

Finally you can do:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
repo sync

Upvotes: 0

Rajdeep Dua
Rajdeep Dua

Reputation: 11230

You should start a new repo branch within the same source code branch

 repo start BRANCH_NAME [PROJECT_LIST]

Also refer to the following book on how to switch and make use to features in git

Look at section on branching and merging. Create branch using repo and then git commands to move around

Upvotes: 2

Rajdeep Dua
Rajdeep Dua

Reputation: 11230

You should do a repo init in a different directory. repo init clones the git structure specified by the manifest file e.g

android/gingerbread/repo init

android/eclair/repo init

Upvotes: 0

Related Questions