diff options
| author | Shawn O. Pearce <sop@google.com> | 2009-04-17 18:47:22 -0700 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2009-04-17 20:54:39 -0700 |
| commit | 66bdd468717a6f52056924837b766cf60889f2ed (patch) | |
| tree | c066bcf6b82bf33070933c7235e21956c9ea9f6a /subcmds/upload.py | |
| parent | a608fb024ba0d6b1534e514e3ad2265a9f187182 (diff) | |
| download | git-repo-66bdd468717a6f52056924837b766cf60889f2ed.tar.gz | |
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>
Diffstat (limited to 'subcmds/upload.py')
| -rw-r--r-- | subcmds/upload.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 6a98a8bd..de3fe857 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -99,8 +99,6 @@ or in the .git/config within the project. For example: | |||
| 99 | def _SingleBranch(self, branch, people): | 99 | def _SingleBranch(self, branch, people): |
| 100 | project = branch.project | 100 | project = branch.project |
| 101 | name = branch.name | 101 | name = branch.name |
| 102 | date = branch.date | ||
| 103 | list = branch.commits | ||
| 104 | remote = project.GetBranch(name).remote | 102 | remote = project.GetBranch(name).remote |
| 105 | 103 | ||
| 106 | key = 'review.%s.autoupload' % remote.review | 104 | key = 'review.%s.autoupload' % remote.review |
| @@ -110,6 +108,9 @@ or in the .git/config within the project. For example: | |||
| 110 | _die("upload blocked by %s = false" % key) | 108 | _die("upload blocked by %s = false" % key) |
| 111 | 109 | ||
| 112 | if answer is None: | 110 | if answer is None: |
| 111 | date = branch.date | ||
| 112 | list = branch.commits | ||
| 113 | |||
| 113 | print 'Upload project %s/:' % project.relpath | 114 | print 'Upload project %s/:' % project.relpath |
| 114 | print ' branch %s (%2d commit%s, %s):' % ( | 115 | print ' branch %s (%2d commit%s, %s):' % ( |
| 115 | name, | 116 | name, |
