From patchwork Thu Mar 17 15:33:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 87390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id BC7CDB6FAE for ; Fri, 18 Mar 2011 02:33:55 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q0FCt-0001pF-49; Thu, 17 Mar 2011 15:33:47 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q0FCq-0001ok-Tn for kernel-team@lists.ubuntu.com; Thu, 17 Mar 2011 15:33:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q0FCq-0006sO-Lp for ; Thu, 17 Mar 2011 15:33:44 +0000 Received: from dynamic-adsl-94-36-92-51.clienti.tiscali.it ([94.36.92.51] helo=[192.168.0.32]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q0FCq-0006xF-Hq for kernel-team@lists.ubuntu.com; Thu, 17 Mar 2011 15:33:44 +0000 Message-ID: <4D8229DB.5030907@canonical.com> Date: Thu, 17 Mar 2011 16:33:47 +0100 From: Paolo Pisati User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH] Add --skip command line flag to maint-rebase-branch X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Add to maint-rebase-branch the ability to git rebase --skip via --skip command line flag. From d88e961d329be4b95d8bfac1a337a3f169373ca2 Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Thu, 17 Mar 2011 16:18:22 +0100 Subject: [PATCH] Added --skip command line flag Added ability to git rebase --skip via --skip command line flag. Signed-off-by: Paolo Pisati --- maintscripts/maint-rebase-branch | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/maintscripts/maint-rebase-branch b/maintscripts/maint-rebase-branch index 13efd0c..d0b26a9 100755 --- a/maintscripts/maint-rebase-branch +++ b/maintscripts/maint-rebase-branch @@ -34,6 +34,8 @@ parser.add_option("--continue", action="store_true", default=False, dest="continue_rebase", help="continue a disrupted rebase") parser.add_option("--debug", action="store_true", default=False, dest="debug", help="print loads of verbose messages that might give a clue as to what's going on") +parser.add_option("--skip", action="store_true", default=False, + dest="skip_rebase", help="continue a disrupted rebase skipping next commit") (opts, args) = parser.parse_args() @@ -142,7 +144,7 @@ if GetPackageInfo(branch)[2] != "UNRELEASED": #------------------------------------------------------------------------------ # Working tree must be clean #------------------------------------------------------------------------------ -if opts.continue_rebase == False: +if opts.continue_rebase == False and opts.skip_rebase == False: print "Checking working tree ...", if GitListFiles(opts="--others --modified") != []: print "NOT CLEAN!" @@ -169,11 +171,14 @@ if opts.continue_rebase == False: # the version number of it. Then rebase the temporary branch on top of the # target release. #------------------------------------------------------------------------------ -if opts.continue_rebase == False: +if opts.continue_rebase == False and opts.skip_rebase == False: print "Rebasing from", BaseVersion, "to", TargetVersion cmd = "git rebase --onto Ubuntu-{0} {1}".format(TargetVersion, MergeBase) else: - cmd = "git rebase --continue" + if opts.continue_rebase == True: + cmd = "git rebase --continue" + else: + cmd = "git rebase --skip" p = Popen(cmd, shell=True) status = os.waitpid(p.pid, 0)[1] if status > 0: -- 1.7.1