root@hghphicprd13391:/usr1/sdk/workspace/public_code_96CV300/linux_master/.repo# ll
total 36
drwxr-xr-x 7 root root 4096 Dec 9 2019 ./
drwxr-xr-x 7 root root 4096 Dec 10 2019 ../
-rw-r--r-- 1 root root 2836 Dec 10 2019 .repo_fetchtimes.json
lrwxrwxrwx 1 root root 21 Dec 9 2019 manifest.xml -> manifests/default.xml*
drwxr-xr-x 4 root root 4096 Nov 25 16:21 manifests/
drwxr-xr-x 10 root root 4096 Dec 9 2019 manifests.git/
drwxr-xr-x 6 root root 4096 Dec 9 2019 project-objects/
-rw-r--r-- 1 root root 1201 Dec 10 2019 project.list
drwxr-xr-x 8 root root 4096 Dec 9 2019 projects/
drwxr-xr-x 7 root root 4096 Dec 9 2019 repo/
.repo/manifest.xml就是项目多版本库的清单文件
1 <?xml version="1.0" encoding="UTF-8"?>
2 <manifest>
3 <remote fetch="http://szxgit10-rd.huawei.com:8080" name="szxgit10" review="http://szxgit10-rd.huawei.com:8080" />
4 <default remote="szxgit10" revision="linux_master" sync-j="4" sync_c="true" />
5
6 <project name="stb/linux/sdk" path="sdk"/>
7 <project name="stb/linux/sample" path="sdk/sample"/>
8 <project name="stb/linux/build" path="sdk/scripts"/>
9 <project name="stb/linux/boot_app" path="sdk/source/bootloader/app"/>
10 <project name="stb/linux/liteos" path="sdk/source/liteos"/>
11 <project name="stb/linux/sysreg" path="sdk/source/bootloader/sysreg"/>
12 <project name="stb/linux/unf" path="sdk/source/linux/api/include"/>
13 <project name="stb/linux/gpu_user" path="sdk/source/linux/api/gpu"/>
14 <project name="stb/linux/driver" path="sdk/source/linux/drv"/>
15 <project name="stb/linux/bluetooth" path="sdk/source/linux/drv/bluetooth"/>
16 <project name="stb/linux/wifi" path="sdk/source/linux/drv/wifi"/>
17 <project name="stb/linux/hiplayer" path="sdk/source/component/hiplayer"/>
18 <project name="stb/linux/nagra" path="sdk/source/component/nagra"/>
19 <project name="stb/linux/irdeto" path="sdk/source/component/irdeto"/>
20 <project name="stb/linux/hi_pq_tool" path="sdk/tools/windows/HiPQTool"/>
21 <project name="stb/linux/hi_pro_info" path="sdk/tools/windows/HiProInfo"/>
22 <project name="stb/linux/hi_tool" path="sdk/tools/windows/HiTool"/>
23 <project name="stb/linux/hi_workbench" path="sdk/tools/windows/HiWorkbench"/>
24 <project name="stb/linux/open_source" path="sdk/third_party/open_source"/>
25
26 <project name="TC_HiDolphin_GIT/Android/androidn/device/hal" path="sdk/hisilicon_hal" revision="HAL_DEV" sync_c="true" >
27 <linkfile dest="sdk/source/component/hal/include" src="include"/>
28 </project>
29
30 <project name="stb/linux/release" path="build"/>
31 <project name="stb/linux/ci" path="CI"/>
32
33 <project name="stb/linux/test_code" path="test"/>
34 <project name="stb/linux/test_code/common" path="test/common"/>
35 <project name="stb/linux/test_code/integration" path="test/integration"/>
36 <project name="stb/linux/test_code/bsp" path="test/bsp"/>
37 <project name="stb/linux/test_code/frontend" path="test/frontend"/>
38 <project name="stb/linux/test_code/demux" path="test/demux"/>
39 <project name="stb/linux/test_code/avplay" path="test/avplay"/>
40 <project name="stb/linux/test_code/audio" path="test/audio"/>
41 <project name="stb/linux/test_code/vdec" path="test/vdec"/>
42 <project name="stb/linux/test_code/venc" path="test/venc"/>
43 <project name="stb/linux/test_code/xdp" path="test/xdp"/>
44 <project name="stb/linux/test_code/pvr" path="test/pvr"/>
45 <project name="stb/linux/test_code/gfx" path="test/gfx"/>
46 <project name="stb/linux/test_code/hdmi" path="test/hdmi"/>
47 <project name="stb/linux/test_code/security" path="test/security"/>
48 <project name="stb/linux/test_code/ecs" path="test/ecs"/>
49 <project name="stb/linux/test_code/pmoc" path="test/pmoc"/>
50 <project name="stb/linux/test_code/caption" path="test/caption"/>
51 <project name="stb/linux/test_code/rm" path="test/rm"/>
52 <project name="stb/linux/test_code/panel" path="test/panel"/>
53
54 <include name="platform_sdk.xml" />
55
56 </manifest>
xml的顶级元素是manifest第二行和第181行
3 <remote fetch="http://szxgit10-rd.huawei.com:8080" name="szxgit10" review="http://szxgit10-rd.huawei.com:8080" />
4 <default remote="szxgit10" revision="linux_master" sync-j="4" sync_c="true" />
remote元素定义的szxgit10的远程版本库,其中git库基址为http://szxgit10-rd.huawei.com:8080
gerrit代码审核服务器的地址http://szxgit10-rd.huawei.com:8080,可以定义多个remote,一般情况只定义一个如果不定义分支默认为master,这里我们定义了分支revision="linux_master"
<project name="stb/linux/test_code/panel" path="test/panel"/>
各个项目(project元素)可以定义自己的remote和revision覆盖该默认配置,版本库相对路径stb/linux/test_code/panel;绝对路径http://szxgit10-rd.huawei.com:8080/stb/linux/test_code/panel,本地版本库工作区位置:test/panel
project也可以有子元素copyfile,可能后的一个附加动作:从core/root.mk拷贝文件至Makefile
<project name="stb/linux/test_code/panel" path="test/panel">
<copyfile src="core/root.mk" dest="Makefile" />
</project>
5.还可能出现manifest-server元素,其url属性定义了通过XMLRPC提供实时更新清单的服务器URL,只有当执行repo sync --smart-sync的时候才会检查该值,并用动态获取的manifest覆盖掉默认的清单。