mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-07-04 20:17:16 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
719965af35 | |||
5732e47ebb | |||
f3fdf823cf |
@ -24,6 +24,7 @@ import time
|
|||||||
import xmlrpclib
|
import xmlrpclib
|
||||||
|
|
||||||
from git_command import GIT
|
from git_command import GIT
|
||||||
|
from git_refs import R_HEADS
|
||||||
from project import HEAD
|
from project import HEAD
|
||||||
from project import Project
|
from project import Project
|
||||||
from project import RemoteSpec
|
from project import RemoteSpec
|
||||||
@ -147,6 +148,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 +161,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
|
||||||
@ -201,6 +206,8 @@ uncommitted changes are present' % project.relpath
|
|||||||
p = self.manifest.manifestProject
|
p = self.manifest.manifestProject
|
||||||
b = p.GetBranch(p.CurrentBranch)
|
b = p.GetBranch(p.CurrentBranch)
|
||||||
branch = b.merge
|
branch = b.merge
|
||||||
|
if branch.startswith(R_HEADS):
|
||||||
|
branch = branch[len(R_HEADS):]
|
||||||
|
|
||||||
env = dict(os.environ)
|
env = dict(os.environ)
|
||||||
if (env.has_key('TARGET_PRODUCT') and
|
if (env.has_key('TARGET_PRODUCT') and
|
||||||
@ -219,13 +226,13 @@ uncommitted changes are present' % project.relpath
|
|||||||
f = open(manifest_path, 'w')
|
f = open(manifest_path, 'w')
|
||||||
try:
|
try:
|
||||||
f.write(manifest_str)
|
f.write(manifest_str)
|
||||||
self.manifest.Override(manifest_name)
|
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
print >>sys.stderr, 'error: cannot write manifest to %s' % \
|
print >>sys.stderr, 'error: cannot write manifest to %s' % \
|
||||||
manifest_path
|
manifest_path
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
self.manifest.Override(manifest_name)
|
||||||
else:
|
else:
|
||||||
print >>sys.stderr, 'error: %s' % manifest_str
|
print >>sys.stderr, 'error: %s' % manifest_str
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Reference in New Issue
Block a user