问题描述
林建设的CyanogenMod 9(安卓ICS)系统的Nexus S的手机(三星克雷斯波)。现在的问题是,如果我做的:
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
inits最新的回购承诺ICS的,其中的清单不包括某些设备/三星/项目,我需要(具体的)。
我如何回购初始化到一个特定的承诺?在我来说,我想最后一次提交使用谷歌Android-4.0.3_r1分支。这是其一:
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:
- 的
如果我这样做
回购的init -u git的://github.com/CyanogenMod/android.git -b提交散列
不行的,似乎回购初始化-b只支持一个分支的负责人。
Does not work, seems that repo init -b only support the HEAD of a branch.
在此先感谢。
推荐答案
的回答:
您不能指定一个分支名称(或SHA,或任何其他),以回购
,它不会工作。这里的原因:
You can't specify a branch name (or SHA, or whatever else) to repo
, it will not work. Here's why:
回购
是处理库项目(这实际上是独立的Git的)集合的脚本。项目列表位于的.repo
git的,并且包含一个清单文件,这基本上是所有的版本库的git的,他们分支的列表。在回购的init
-b
相关仅适用于回购
混帐
repo
is a script that handles a collection of repository projects (which in fact are independent git's). Project list is located in .repo
git, and contains a manifest file, which basically is a list of all repository git's and they branches. -b
is relevant only for repo
git during repo init
.
下面是的.repo /舱单/ default.xml中
的例子:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://address.com/" name="origin"
review="review.address.com"/>
<default remote="origin" revision="ics-something" sync-j="4"/>
<manifest-server url="http://manifests.address.com:8000"/>
<!-- sniff -->
<project name="platform/external/libxml2" path="external/libxml2"
revision="ics-common"/>
<project name="platform/external/zlib" path="external/zlib"
revision="ics-common"/>
<project name="platform/frameworks/base" path="frameworks/base"
revision="ics-something"/>
<project name="platform/packages/apps/Bluetooth" path="packages/apps/Bluetooth"
revision="ics-common"/>
<!-- sniff -->
</manifest>
因此,获得资源库的资源为特定版本的正确方法是获得它的清单。的
也就是说,舱单,将包含SHA(或标签,这实际上是相同的,如果他们是present),而不是分支名称。这样,你的资料库中的每一个Git项目将指向到一些承诺,那是当构建被执行最新最伟大的:
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 was the latest greatest when the build was executed:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://address.com/" name="origin"
review="review.address.com"/>
<default remote="origin" revision="ics-something" sync-j="4"/>
<manifest-server url="http://manifests.address.com:8000"/>
<!-- sniff -->
<project name="platform/external/libxml2" path="external/libxml2"
revision="refs/tags/android-4.0.4_r1.1"/>
<project name="platform/external/zlib" path="external/zlib"
revision="refs/tags/android-4.0.4_r1.1"/>
<project name="platform/frameworks/base" path="frameworks/base"
revision="ecb41a77411358d385e3fde5b4e98a5f3d9cfdd5"/>
<project name="platform/packages/apps/Bluetooth" path="packages/apps/Bluetooth"
revision="621bae79f1a250e443eb83d1f473c533bea493dc"/>
<!-- sniff -->
</manifest>
正如你看到的,这两个清单之间的唯一区别是存储库混帐的修订值。
As you see, the only difference between these two manifests is the revision values of repository git's.
简短的回答:
您需要获得 manifest_static.xml
的具体构建。
You need to obtain manifest_static.xml
of the particular build.
或者,如果你只是缺少一些项目混帐的,那么你可以创建 local_manifest.xml
在的.repo
文件git的,加有缺失的混帐的,然后回购同步
从库的根。在 local_manifest.xml
使用工具的更多信息的。
Or, if you just missing some project git's, then you could create local_manifest.xml
file in .repo
git, add missing git's there, and then repo sync
from the root of your repository. More info on local_manifest.xml
usage is here.
这篇关于回购初始化一个特定的承诺的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!