mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
upload: Fix --replace flag
--replace started to fail due to a Python error, I forgot to pass through the opt structure to the replace function. Change-Id: Ifcd7a0c715c3fd9070a4c58208612a626382de35 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
a22f99ae41
commit
60829ba72f
@ -262,7 +262,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
|
|||||||
except:
|
except:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def _ReplaceBranch(self, project, people):
|
def _ReplaceBranch(self, opt, project, people):
|
||||||
branch = project.CurrentBranch
|
branch = project.CurrentBranch
|
||||||
if not branch:
|
if not branch:
|
||||||
print >>sys.stdout, "no branches ready for upload"
|
print >>sys.stdout, "no branches ready for upload"
|
||||||
@ -388,7 +388,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
|
|||||||
print >>sys.stderr, \
|
print >>sys.stderr, \
|
||||||
'error: --replace requires exactly one project'
|
'error: --replace requires exactly one project'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self._ReplaceBranch(project_list[0], people)
|
self._ReplaceBranch(opt, project_list[0], people)
|
||||||
return
|
return
|
||||||
|
|
||||||
for project in project_list:
|
for project in project_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user