分享

android repo qiehuanfenzhi

 灬木木的花灬 2014-12-15
http://wv1124./blog/1838217

查看可切换的分支
cd .repo/manifests
git branch -a | cut -d / -f 3


以 gingerbread-release 分支为例
repo init -b android-4.1.2_r1


repo sync (not needed if your local copy is up to date)
repo start android-4.1.2_r1 --all 
查看当前的分支
repo branches
正在尝试这一种看看可不可以,执行repo sync后//我的好像还更新了
error: bionic/: platform/bionic checkout f57514eb59747171f55cd9b4abb064f1a474d5ee
error: external/valgrind/: platform/external/valgrind checkout d5d3abcc16492e823e09201a56a7d8c991e194d9
error: prebuilt/: platform/prebuilt checkout 4046d154f6b6d0722a7c1199e4be9322531cb3ca
wv@LiXia_PC ~/Android-4.0.0_r1
$ ~/bin/repo branches
*  android-4.1.2_r1          | not in bionic, external/valgrind, prebuilt
报错了,没有全部转完!
***********************************************************

查看当前所有分支:git branch -a

 

把所有的库切换分支:  repo forall  -c git checkout branch_name

删除所有库的某个分支: repo forall  -c git branch -D branch_name
 
Java代码  收藏代码
  1. $ ~/bin/repo sync -j1  
  2. remote: Counting objects: 597, done  
  3. remote: Finding sources: 100% (4/4)  
  4. remote: Total 4 (delta 2), reused 4 (delta 2)  
  5. Unpacking objects: 100% (4/4), done.  
  6. From https://android./platform/build  
  7.    923ac1a..a1fd8e4  master     -> aosp/master  
  8. Fetching projects: 100% (293/293), done.  
  9. info: A new version of repo is available  
  10.   
  11.   
  12. object 45d21685b93f80b67239849b2d2cfe6b217e335a  
  13. type commit  
  14. tag v1.12.2  
  15. tagger Shawn Pearce <sop@google.com> 1362159402 -0800  
  16.   
  17. repo 1.12.2  
  18.   
  19. error: cannot run gpg: No such file or directory  
  20. error: could not run gpg.  
  21. error: could not verify the tag 'v1.12.2'  
  22.   
  23.   
  24. warning: Skipped upgrade to unverified version  
  25. Syncing work tree:   0% (2/293)  error: Your local changes to the following files would be overwritten by checkout:  
  26.         libc/kernel/common/linux/netfilter/xt_CONNMARK.h  
  27.         libc/kernel/common/linux/netfilter/xt_MARK.h  
  28.         libc/kernel/common/linux/netfilter_ipv6/ip6t_HL.h  
  29. Please, commit your changes or stash them before you can switch branches.  
  30. Aborting  
  31. Syncing work tree:  55% (162/293)  error: Your local changes to the following files would be overwritten by checkout:  
  32.         main/docs/html/FAQ.html  
  33. Please, commit your changes or stash them before you can switch branches.  
  34. Aborting  
  35. Syncing work tree:  90% (264/293)  error: Your local changes to the following files would be overwritten by checkout:  
  36.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter/xt_CONNMARK.h  
  37.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter/xt_DSCP.h  
  38.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter/xt_MARK.h  
  39.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter/xt_TCPMSS.h  
  40.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_CONNMARK.h  
  41.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_DSCP.h  
  42.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_ECN.h  
  43.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_MARK.h  
  44.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h  
  45.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_TOS.h  
  46.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv4/ipt_TTL.h  
  47.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv6/ip6t_HL.h  
  48.         linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/netfilter_ipv6/ip6t_MARK.h  
  49. Please, commit your changes or stash them before you can switch branches.  
  50. Aborting  
  51. Syncing work tree: 100% (293/293), done.  
  52.   
  53. error: bionic/: platform/bionic checkout f57514eb59747171f55cd9b4abb064f1a474d5ee  
  54. error: external/valgrind/: platform/external/valgrind checkout d5d3abcc16492e823e09201a56a7d8c991e194d9  
  55. error: prebuilt/: platform/prebuilt checkout 4046d154f6b6d0722a7c1199e4be9322531cb3ca  
 好像没有成功更新

wv@wv-ThinkPad-SL:~/android/source$ repo sync
Fetching projects: 100% (293/293), done. 
fatal: bad config file line 1 in .git/config
Traceback (most recent call last):
  File "/home/wv/android/source/.repo/repo/main.py", line 414, in <module>
    _Main(sys.argv[1:])
  File "/home/wv/android/source/.repo/repo/main.py", line 390, in _Main
    result = repo._Run(argv) or 0
  File "/home/wv/android/source/.repo/repo/main.py", line 138, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/wv/android/source/.repo/repo/subcmds/sync.py", line 630, in Execute
    project.Sync_LocalHalf(syncbuf)
  File "/home/wv/android/source/.repo/repo/project.py", line 1086, in Sync_LocalHalf
    lost = self._revlist(not_rev(revid), HEAD)
  File "/home/wv/android/source/.repo/repo/project.py", line 2006, in _revlist
    return self.work_git.rev_list(*a, **kw)
  File "/home/wv/android/source/.repo/repo/project.py", line 2155, in rev_list
    p.stderr))
error.GitError: platform/bionic rev-list ('^f57514eb59747171f55cd9b4abb064f1a474d5ee', 'HEAD', '--'): fatal: bad config file line 1 in .git/config

wv@wv-ThinkPad-SL:~/android/source$
 上面问题终于可以解决了,不用删除.repo, .repo已经8G了,怎么舍得删了重新同步呢?
再新建一个目录android4.3,执行 repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2(这个源根据个人意愿不同而不同)
再把原来那个目录下的.repo覆盖到新建的android4.3目录下,再进行repo sync就OK了。
原来的目录可以删了
所有源码单独下载:https://android./tools/repo/
软件共享:
http://pan.baidu.com/share/link?shareid=317254&uk=2299385808

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多