mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
upload: improve no pending CL error handling
Show clearer messages and exit non-zero if there's nothing to upload. Change-Id: Icd9c13b9b1126610a409fc13d1d11bfc66f5e802 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255834 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
0258584c72
commit
7a753b8b18
@ -486,8 +486,12 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
||||
pending.append((project, avail))
|
||||
|
||||
if not pending:
|
||||
print("no branches ready for upload", file=sys.stderr)
|
||||
return
|
||||
if branch is None:
|
||||
print('repo: error: no branches ready for upload', file=sys.stderr)
|
||||
else:
|
||||
print('repo: error: no branches named "%s" ready for upload' %
|
||||
(branch,), file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if not opt.bypass_hooks:
|
||||
hook = RepoHook('pre-upload', self.manifest.repo_hooks_project,
|
||||
|
Loading…
Reference in New Issue
Block a user