summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChrister Fletcher <christer.fletcher@sonyericsson.com>2011-04-28 14:13:14 +0200
committerShawn O. Pearce <sop@google.com>2011-11-29 14:01:57 -0800
commit6a1f73738071e299f600017d99f7252d41b96b4b (patch)
tree86ff686f12648b471e153e295c706e0f2a948577
parente9311273dda9aef91c563cd69b30f7a7491c56b5 (diff)
downloadgit-repo-6a1f73738071e299f600017d99f7252d41b96b4b.tar.gz
Added remote destination branch information when uploading.
Several times one have done an upload only to later notice in gerrit that the upload was done to the wrong branch as the git has not yet been branched for the current git. This change will make repo print what the destination branch is when asking the user if she wants to go through with the upload. Change-Id: Ia9c3a92a6a04c022edfebf4f8d651ac062bb1f3b
-rw-r--r--subcmds/upload.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index c152e75d..53118f6b 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -162,7 +162,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
162 date = branch.date 162 date = branch.date
163 list = branch.commits 163 list = branch.commits
164 164
165 print 'Upload project %s/:' % project.relpath 165 print 'Upload project %s/ to remote branch %s:' % (project.relpath, project.revisionExpr)
166 print ' branch %s (%2d commit%s, %s):' % ( 166 print ' branch %s (%2d commit%s, %s):' % (
167 name, 167 name,
168 len(list), 168 len(list),
@@ -202,11 +202,12 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
202 202
203 if b: 203 if b:
204 script.append('#') 204 script.append('#')
205 script.append('# branch %s (%2d commit%s, %s):' % ( 205 script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % (
206 name, 206 name,
207 len(list), 207 len(list),
208 len(list) != 1 and 's' or '', 208 len(list) != 1 and 's' or '',
209 date)) 209 date,
210 project.revisionExpr))
210 for commit in list: 211 for commit in list:
211 script.append('# %s' % commit) 212 script.append('# %s' % commit)
212 b[name] = branch 213 b[name] = branch