repo manifest.xml file 완벽 설명
repo 는 git 통합 관리 프로그램이라고 할 수 있습니다.
여러개의 git 들을 한번에 sync, push 가 가능하게 해주죠.
repo 명령어를 download 받는 방법은
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
로 다운받고 실행 속성을 설정하면 됩니다.
이제 manifest file 을 만드는 방법을 알아 봐야겠죠?
먼저 manifest file 을 만드는 방법은 하나씩 typing 해서 작성할 수 있겠지만 보통 project root 에서
repo manifest -o outfilename.xml -r
과 같은 명령으로 만들 수 있습니다.
-r : 현재 HEAD를 revision 으로 저장
-o : 저장될 file name
--suppress-upstream-revision
: upstream 이 저장되지 않도록 설정
repo init 명령으로 manifest file 을 지정하는 방법은
repo init -m manifestFileName.xml
의 형식으로 지정 합니다.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="ssh://server.name.com" name="umg" review="server.name.com:8080"/>
<default remote="umg" revision="platform/android/main"/>
<project groups="aosp,device,flo" name="a/aosp/device/asus/deb" path="device/asus/deb" revision="bbe44d...e3"/>
<project groups="aosp,device,flo" name="a/aosp/device/asus/flo" path="device/asus/flo" revision="42adc...03e16"/>
<project groups="aosp,device,flo" name="a/aosp/device/asus/flo-kernel" path="device/asus/flo-kernel" revision="97f...296dce"/>
<project groups="aosp,device,grouper" name="a/aosp/device/asus/grouper" path="device/asus/grouper" revision="0bec...a53b6a"/>
<project groups="aosp,device,grouper" name="a/aosp/device/asus/tilapia" path="device/asus/tilapia" revision="2553c...cdc"/>
<project groups="aosp,pdk" name="a/aosp/platform/build" path="build" revision="f678...2db1">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
....
</manifest>
여기서 중요한 것은 fetch remote revision groups name path 입니다. 다 중요하네요. ^^
<remote fetch="ssh://server.name.com" name="umg" review="server.name.com:8080"/>
fetch : 소스를 받아올 서버 및 프로토콜(ssh, git등)
name : repository name
review : gerrit review site
<default remote="umg" revision="platform/android/main"/> : 아래에서 사용될 각 project 의 기본 설정값
remote : default repository name
revision : default branch name. 아래 project 에서 revision 이 없다면 해당 branch 의 최신 commit 이 HEAD가 됨
<project groups="aosp,device,flo" name="a/aosp/device/asus/deb" path="device/asus/deb" revision="bbe44d3c88ca8484befb8446d090f7d069f9e7e3"/>
groups : repo init 명령에서 -g 옵션으로 해당 project 의 sync 여부를 결정 할 수 있음
name : git repository 의 저장 위치
path : 실제 소스에서 저장될 위치
revision : sync 후 HEAD가 될 commit id
copyfile : sync 후 file 복사
dest : 복사될 위치 및 파일 이름
src : 복사할 파일 이름 및 위치
repo init -g default,-flo,-device -u ssh://manifest.server.name/manifest -b manifestBranchName -m ManifestFile.name
g : group 의 sync 여부 - 를 붙이면 sync 하지 않음
u : manifest file 이 저장 되어 있는 server 및 protocol
b : manifest file 을 받아올 branch
m : manifest file name
그리고 source 의 sync 방법
repo sync -c -j4
c : 현재 manifest에 설정된 branch 의 소스만을 sync함
j : job number
일반적으로 필요한 repo sync 및 repo init 명령과 manifest file의 내용은 이정도면 될 것 같네요.
더 자세한 내용은 http://git-repo.googlecode.com/git-history/9a27d0111d5cf88c6b9409261707a5d7d50aaa64/docs/manifest-format.txt
에 자세히 나와 있습니다.
'GIT' 카테고리의 다른 글
repo command option 설명 (repo 명령어 옵션 설명) (0) | 2013.11.24 |
---|---|
GIT 모든 branch 에서 특정 파일 찾기 (0) | 2013.09.30 |
Repo GIT 에서 특정 tag 로 이동하는 방법 (1) | 2013.01.16 |
GIT : gitolite ssh pub key 여러개 사용하기 (0) | 2013.01.14 |