Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

android - repo init a particular commit

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I figured it out. If your have a tag in a manifest file (version.xml for example). You can repo init to a specific tag with the following command:

repo init -u <addres> -b refs/tags/<tagname> -m version.xml

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...