mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-23 07:16:21 +00:00
Merge "Don't backtrace when current branch is not uploadable."
This commit is contained in:
commit
f1f1137d61
@ -422,7 +422,16 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
|
|||||||
for project in project_list:
|
for project in project_list:
|
||||||
if opt.current_branch:
|
if opt.current_branch:
|
||||||
cbr = project.CurrentBranch
|
cbr = project.CurrentBranch
|
||||||
avail = [project.GetUploadableBranch(cbr)] if cbr else None
|
up_branch = project.GetUploadableBranch(cbr)
|
||||||
|
if up_branch:
|
||||||
|
avail = [up_branch]
|
||||||
|
else:
|
||||||
|
avail = None
|
||||||
|
print('ERROR: Current branch (%s) not uploadable. '
|
||||||
|
'You may be able to type '
|
||||||
|
'"git branch --set-upstream-to m/master" to fix '
|
||||||
|
'your branch.' % str(cbr),
|
||||||
|
file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
avail = project.GetUploadableBranches(branch)
|
avail = project.GetUploadableBranches(branch)
|
||||||
if avail:
|
if avail:
|
||||||
|
Loading…
Reference in New Issue
Block a user