mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
sync: Safely skip already deleted projects
Do not error if a project is missing on the filesystem, is deleted from manifest.xml, but still exists in project.list. Change-Id: I1d13e435473c83091e27e4df571504ef493282dd
This commit is contained in:
parent
a1bfd2cd72
commit
f3fdf823cf
@ -147,6 +147,9 @@ later is required to fix a server side protocol bug.
|
|||||||
if not path:
|
if not path:
|
||||||
continue
|
continue
|
||||||
if path not in new_project_paths:
|
if path not in new_project_paths:
|
||||||
|
"""If the path has already been deleted, we don't need to do it
|
||||||
|
"""
|
||||||
|
if os.path.exists(self.manifest.topdir + '/' + path):
|
||||||
project = Project(
|
project = Project(
|
||||||
manifest = self.manifest,
|
manifest = self.manifest,
|
||||||
name = path,
|
name = path,
|
||||||
@ -157,6 +160,7 @@ later is required to fix a server side protocol bug.
|
|||||||
relpath = path,
|
relpath = path,
|
||||||
revisionExpr = 'HEAD',
|
revisionExpr = 'HEAD',
|
||||||
revisionId = None)
|
revisionId = None)
|
||||||
|
|
||||||
if project.IsDirty():
|
if project.IsDirty():
|
||||||
print >>sys.stderr, 'error: Cannot remove project "%s": \
|
print >>sys.stderr, 'error: Cannot remove project "%s": \
|
||||||
uncommitted changes are present' % project.relpath
|
uncommitted changes are present' % project.relpath
|
||||||
|
Loading…
Reference in New Issue
Block a user