Im building the Cyanogenmod 9 (Android ICS) system for a Nexus S phone (samsung crespo).
The problem is that if I do:
repo init -u git://github.com/CyanogenMod/android.git -b ics
The repo inits to the latest commit of ICS, in which the manifest does not include some device/samsung/ projects I need (specifically https://github.com/CyanogenMod/android_device_samsung_crespo).
How do I repo init to a particular commit?
In my case I want the last commit using the google android-4.0.3_r1 branch.
Is this one:
If I do
repo init -u git://github.com/CyanogenMod/android.git -b commit-hash
Does not work, seems that repo init -b only support the HEAD of a branch.
Thanks in Advance.
Long answer:
You can’t specify a branch name (or SHA, or whatever else) to
repo, it will not work. Here’s why:repois a script that handles a collection of repository projects (which in fact are independent git’s). Project list is located in.repogit, and contains a manifest file, which basically is a list of all repository git’s and they branches.-bis relevant only forrepogit duringrepo init.Here is an example of
.repo/manifests/default.xml:So, the correct way of obtaining the sources of the repository for the particular build is to obtain it’s manifest.
I.e., manifest, that will contain SHA’s (or tags, which are practically the same, if they are present) instead of branch names. This way every git project within your repository will point into some commit, that is specified in the manifest file:
As you see, the only difference between these two manifests is the revision values of repository git’s.
Short answer:
You need to obtain
manifest_static.xmlof the particular build.Or, if you just missing some project git’s, then you could create
local_manifest.xmlfile in.repogit, add missing git’s there, and thenrepo syncfrom the root of your repository. More info onlocal_manifest.xmlusage is here.