From c9b912a6dbecdd8efef36d13e0d11dd859ed92d9 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 2 Oct 2013 17:24:47 +0800 Subject: [PATCH] Backport and updating tracker using references --- lib/commands/backport.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/commands/backport.py b/lib/commands/backport.py index 1010698..153e55e 100644 --- a/lib/commands/backport.py +++ b/lib/commands/backport.py @@ -75,9 +75,11 @@ class BackportCommand(Command): ( ['-t', '--update-tracker'], { - 'action': 'store_true', + 'const': True, 'dest': 'updatetracker', - 'help': 'to use with --push, also add the diff information to the tracker issue' + 'help': 'to use with --push, also add the diff information to the tracker issue', + 'metavar': 'gitref', + 'nargs': '?' } ), ( @@ -214,8 +216,9 @@ class BackportCommand(Command): continue # Update the tracker - if args.updatetracker: - M2.updateTrackerGitInfo(branch=newbranch) + if args.updatetracker != None: + ref = None if args.updatetracker == True else args.updatetracker + M2.updateTrackerGitInfo(branch=newbranch, ref=ref) stashPop(stash) -- 2.11.0