From 6a1f73738071e299f600017d99f7252d41b96b4b Mon Sep 17 00:00:00 2001 From: Christer Fletcher Date: Thu, 28 Apr 2011 14:13:14 +0200 Subject: [PATCH] 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 --- subcmds/upload.py | 7 ++++--- 1 file 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/ date = branch.date list = branch.commits - print 'Upload project %s/:' % project.relpath + print 'Upload project %s/ to remote branch %s:' % (project.relpath, project.revisionExpr) print ' branch %s (%2d commit%s, %s):' % ( name, len(list), @@ -202,11 +202,12 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ if b: script.append('#') - script.append('# branch %s (%2d commit%s, %s):' % ( + script.append('# branch %s (%2d commit%s, %s) to remote branch %s:' % ( name, len(list), len(list) != 1 and 's' or '', - date)) + date, + project.revisionExpr)) for commit in list: script.append('# %s' % commit) b[name] = branch