repo 명령어 (command) 설명 init sync diff prune forall upload download start status
repo 명령어 (command) 설명 init sync diff prune forall upload download start status
Repo 명령어는 아래와 같은 형식으로 실행한다.
$ repo COMMAND OPTIONS
$ repo help COMMAND
명령으로 각 명령의 도움말을 볼 수 있다.
각 명령어들은 project list 를 인자로 받을 수 있다.
$ repo sync PROJECT0 PROJECT1 ... PROJECTN
INIT
$ repo init -u URL [OPTIONS]
현재 directory 에 .repo directory 를 생성하고 그 안에 URL 로 부터 다운받은 manifest.xml 을 두고 이 파일이 실제 .repo/manifests/ directory 에 있는 manifest file 을 symbolic link 하도록 한다.
-u : manifest repository 를 다운 받을 URL 을 지정한다. ex) http://android.googlesource.com/platform/manifest
-m : manifest repository 의 특정 manifest file 을 선택한다. -m option이 없을 경우는 default.xml
-b : manifest repository 의 특정 branch 를 지정한다.
SYNC
$ repo sync [PROJECT_LIST]
PROJECT_LIST 를 넣지 않으면 모든 repository 를 sync 한다.
최초 실행시는 git clone 과 동일하며
두번째 부터는
$ git remote update
$ git rebase origin/BRANCH
명령을 실행 하는것과 동일하다.
BRANCH 는 현재 checkout 된 local branch 이며 local branch가 remote branch를 tracking 하고 있지 않을 경우 sync 가 이루어지지 않는다.
repo sync 중 git rebase command 에서 conflict 가 발생할 경우 개별적으로 conflict 를 해결하고 git rebase --continue 명령을 실행해야 한다.
-d : topic branch 에 있을 경우 특정 revision 으로 switch 되도록 해준다.
-s : sync to a known good build as specified by the manifest-server element in the current manifest.
-f : 다른 project 에서 sync fail 이 발생하여도 계속 sync 를 진행 하도록 한다.
UPLOAD
$ repo upload [PROJECT_LIST]
PROJECT_LIST 의 local 변경부분을 remote 로 update 한다. 각 branch 의 reiview 를 위한 upload를 할 수 있도록 prompt 를 띄워준다.
DIFF
$ repo diff [PROJECT_LIST]
git diff 를 이용해서 PROJECT_LIST 의 working tree 변경 내용을 보여준다.
DOWNLOAD
$ repo download TARGET CHANGE
review system 의 23823 의 변경 내용을 platform/build 에 download 하는 경우
$ repo download platform/build 23823
repo sync 명령을 실행하면 download 된 내용은 사라진다.
FORALL
$ repo forall [PROJECT_LIST] -c COMMAND
-c : 실행할 command 와 argument 를 인자로 갖는다.
-p : page 단위로 output 을 보여준다.
-v : command 실행 message 를 stderr 로 보여준다.
PRUNE
$ repo prune [PROJECT_LIST]
이미 merge 된 topics 를 삭제한다.
START
$ repo start BRANCH_NAME [PROJECT_LIST]
새로운 branch 로 이동한다.
STATUS
$ repo status [PROJECT_LIST]
staging area 에 있는 변경 사항과 가장 최근의 commit 의 변경 사항을 비교한다.
아래와 같은 문자로 변경 내용을 표시해 준다.