1.报错:
Traceback (most recent call last):
File "aosp/.repo/repo/main.py", line 651, in <module>
_Main(sys.argv[1:])
File "aosp/.repo/repo/main.py", line 627, in _Main
result = run()
File "aosp/.repo/repo/main.py", line 620, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "aosp/.repo/repo/main.py", line 286, in _Run
result = cmd.Execute(copts, cargs)
File "aosp/.repo/repo/subcmds/sync.py", line 985, in Execute
self._UpdateManifestProject(opt, mp, manifest_name)
File "aosp/.repo/repo/subcmds/sync.py", line 901, in _UpdateManifestProject
if mp.HasChanges:
File "aosp/.repo/repo/project.py", line 3344, in HasChanges
elif self._revlist(not_rev(HEAD), revid):
File "aosp/.repo/repo/project.py", line 2875, in _revlist
return self.work_git.rev_list(*a, **kw)
File "aosp/.repo/repo/project.py", line 3089, in rev_list
(self._project.name, str(args), p.stderr))
error.GitError: manifests rev-list ('^HEAD', '14686468c69c63f1995ab2a0a9ad90b2e1d5e01c', '--'): fatal: bad revision '^HEAD'
2.解决:
原因:版本号不一致导致的。1 到该项目的最外层 没进入 repo/manifests# cd .repo/manifests2 恢复代码到指定commitID# git reset --hard 14686468c69c63f1995ab2a0a9ad90b2e1d5e01c3 拉却代码# git pull(可能会报错,这个报错没关系,直接进项下一步)4 退出到最外层,强制更新代码# repo sync -c