mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
Only compute commits in repo upload if we need to show a prompt
If the user has disabled a prompt, skip the two commands we use to obtain the list of commits and the date of the branch. These will never be displayed and just waste the end-user's time. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
a608fb024b
commit
66bdd46871
@ -99,8 +99,6 @@ or in the .git/config within the project. For example:
|
|||||||
def _SingleBranch(self, branch, people):
|
def _SingleBranch(self, branch, people):
|
||||||
project = branch.project
|
project = branch.project
|
||||||
name = branch.name
|
name = branch.name
|
||||||
date = branch.date
|
|
||||||
list = branch.commits
|
|
||||||
remote = project.GetBranch(name).remote
|
remote = project.GetBranch(name).remote
|
||||||
|
|
||||||
key = 'review.%s.autoupload' % remote.review
|
key = 'review.%s.autoupload' % remote.review
|
||||||
@ -110,6 +108,9 @@ or in the .git/config within the project. For example:
|
|||||||
_die("upload blocked by %s = false" % key)
|
_die("upload blocked by %s = false" % key)
|
||||||
|
|
||||||
if answer is None:
|
if answer is None:
|
||||||
|
date = branch.date
|
||||||
|
list = branch.commits
|
||||||
|
|
||||||
print 'Upload project %s/:' % project.relpath
|
print 'Upload project %s/:' % project.relpath
|
||||||
print ' branch %s (%2d commit%s, %s):' % (
|
print ' branch %s (%2d commit%s, %s):' % (
|
||||||
name,
|
name,
|
||||||
|
Loading…
Reference in New Issue
Block a user