Keep on going, never give up.

repo sync时候fatal: bad object错误

最近从CyanogenMod一套同步最新的源码,遇到fatal: bad object同步错误,这个错误出现场合是原源码目录下已经是同步OK过,但是因为备份丢失文件,再次repo sync后报告如下错误,在这大局域网里,实在不想再花两三天去同步一次代码。

fatal: bad object错误

Syncing work tree:  58% (268/462)  Traceback (most recent call last):
  File "/home/john/cm11/.repo/repo/main.py", line 500, in <module>
    _Main(sys.argv[1:])
  File "/home/john/cm11/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/home/john/cm11/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/john/cm11/.repo/repo/subcmds/sync.py", line 675, in Execute
    project.Sync_LocalHalf(syncbuf)
  File "/home/john/cm11/.repo/repo/project.py", line 1204, in Sync_LocalHalf
    lost = self._revlist(not_rev(revid), HEAD)
  File "/home/john/cm11/.repo/repo/project.py", line 2241, in _revlist
    return self.work_git.rev_list(*a, **kw)
  File "/home/john/cm11/.repo/repo/project.py", line 2435, in rev_list
    p.stderr))
error.GitError: CyanogenMod/android_frameworks_av rev-list ('^361b8e14b92e78e81be31a0a36a54c81f4046ce0', 'HEAD', '--'): fatal: bad object 361b8e14b92e78e81be31a0a36a54c81f4046ce0

尝试方法1:

cd cm11/.repo/manifests
git fetch
git diff
git stash
cd ../..
repo init repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync

无效果!

尝试方法2:

自己摸索出这个方法可解决,就是把.repo之外的其它目录全部删除,这样同步的代码也不会丢失,再次执行repo sync后,会自动重新释放工程文件,结果成功。

http://markcn.lofter.com/post/12a453_360975

http://m.blog.csdn.net/blog/ilittleone/7425343

 

相关评论(0):  

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

订阅博客

最新文章

本站采用创作共用版权协议, 要求署名、非商业用途和保持一致. 转载也必须遵循“署名-非商业用途-保持一致”的创作共用协议. 返回顶部
Copyright@2005-2016 Metsky.com, All rights Reserved.