Original URL: http://blog.csdn.net/mr_president/article/details/7693707
A local Android Code mirroring server was built in our lab based on Google's online approach,
Today a brother on the server using repo sync download source code to 99%, the following problems occurred:
$ repo Sync
Fatal:not a git repository: '/home/andev/android/.repo/projects/bionic.git '
Fetching projects:99% (219/221) Fatal:not a git repository: '/home/andev/android/.repo/projects/bionic.git '
Internet search for a long time can not find the reason, using CTRL + Z forcibly terminate the download, and then re-repo sync or the same error occurred,
Finally found is repo version of the problem, due to the official Google update repo, my brother's repo version is a bit old, re-download
The latest version of Repo, re-repo Init,repo Sync will not appear above the problem.
What if repo sync stops?
Repo sync can be resumed , in the middle if a project is broken directly CTRL C can be next, and then re-sync again
or Ctrl z, and then repo sync after the break
A summary of Repo
http://blog.csdn.net/wh_19910525/article/details/8164107
Repo is just a script from Google that calls git in a python script , primarily the software repository for downloading and managing Android projects .
1. download repo address : Http://android.git.kernel.org/repo, can use wget Http://android.git.kernel.org/repo or curl HTTP// Android.git.kernel.org/repo >~/bin/repo to download repo, chmod a+x ~/bin/repo
2. When using repo sync to crawl Android source code, there are frequent errors that cause repo sync to break and start manually each time.
You can write the following command in a script to automatically repeat it:
Repo Sync
While [$?-ne 0]
Do
Repo Sync
Done
repo sync [Project] Download the latest local working file and synchronize the code in the repository. You can specify which project needs to be updated, and if you do not specify any parameters, the entire project will be synchronized
If you are running Repo sync for the first time, this command is equivalent to Git clone , which copies everything in the repository to local .
If you do not run Repo sync for the first time, it is equivalent to update and auto merge actions;
repo Sync will update the. repo file below . If there is a conflict during the merge process, you need to run git rebase manually--continue
3. repo Help [command] , display command details of the content
For example: You can use the command: Repo help Init to get other uses of Repo init
4. Repo init-u URL, in the current directory installation repository, will create a directory in the current directory ". Repo", the- u parameter specifies a URL from which to obtain repository manifest files.
Repo Init-u git://android.git.kernel.org/platform/manifest.git, you can use the- m parameter to select a particular manifest file in repository, If not specified, it is represented as the default manifest file (default.xml)
Repo init-u git://android.git.kernel.org/platform/manifest.git-m dalvik-plus.xml, You can specify a manifest branch with the-b parameter.
Repo Init-u git://android.git.kernel.org/platform/manifest.git-b release-1.0
5. Repo upload[project-list] upload the modified code, if your local code has been modified, then run Repo sync, you will be prompted to upload the modified code, all the modified Code branch will be uploaded to Gerrit (Web-based code review System), Gerrit by the uploaded code, will be converted to a change, so that people can review the modified code.
6. Repo diff [Project-list] shows the difference between the submitted code and the current working directory code.
7. Repo forall-ccommand, execute command commands on all projects, which is quite useful;
8. Repo Start newbranchname Create a new branch branch. "." represents the branch branch of the current work.
9. Repo prune [Project list] Delete the merge project
Repo status displays the state of project
"Go" repo sync sync android source code download to 99% error