From patchwork Tue Jul 30 19:09:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 263517 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id C93472C00C0 for ; Wed, 31 Jul 2013 05:11:25 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1V4FKI-0000wj-PL; Tue, 30 Jul 2013 19:11:18 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1V4FIQ-0000Wg-3x for kernel-team@lists.ubuntu.com; Tue, 30 Jul 2013 19:09:22 +0000 Received: from c-67-160-231-162.hsd1.ca.comcast.net ([67.160.231.162] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1V4FIP-0007bd-UA; Tue, 30 Jul 2013 19:09:22 +0000 Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1V4FIN-0000l2-Q8; Tue, 30 Jul 2013 12:09:19 -0700 From: Kamal Mostafa To: luis.henriques@canonical.com Subject: [kteam-tools][PATCH 3/3] notify-stable-review: implement --edit_patch_dir Date: Tue, 30 Jul 2013 12:09:01 -0700 Message-Id: <1375211341-2827-4-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1375211341-2827-1-git-send-email-kamal@canonical.com> References: <1375211341-2827-1-git-send-email-kamal@canonical.com> Cc: kernel-team@lists.ubuntu.com, Kamal Mostafa X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Allows for selective removal or edit of the patch files to be emailed. Useful for recovering from a partially busted notify-stable-review run, especially along with --sent_cover_letter. Signed-off-by: Kamal Mostafa --- stable/notify-stable-review | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/stable/notify-stable-review b/stable/notify-stable-review index 09337f6..2557392 100755 --- a/stable/notify-stable-review +++ b/stable/notify-stable-review @@ -93,6 +93,11 @@ class Cmdline: git-send-email as the --in-reply-to to be used (and does not generate another cover letter). + --edit_patch_dir + Starts a subshell in the directory of generated + patches just before sending to allow edits or + selective removal. + --previous_release= The tag or commit of the top of the previous stable release, e.g. v3.5.7, we will get the stable patches @@ -119,7 +124,7 @@ class Cmdline: try: optsShort = '' optsLong = ['help', 'dry-run', 'from=', 'previous_release=', - 'new_version=', 'sent_cover_letter='] + 'new_version=', 'sent_cover_letter=', 'edit_patch_dir' ] opts, args = getopt(argv[1:], optsShort, optsLong) for opt, val in opts: @@ -141,6 +146,9 @@ class Cmdline: elif opt in ('--sent_cover_letter'): self.cfg['sent_cover_letter'] = val + elif opt in ('--edit_patch_dir'): + self.cfg['edit_patch_dir'] = True + except GetoptError, error: print(error, defaults) raise CmdlineError('') @@ -428,6 +436,14 @@ see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable . else: tfe = False + if 'edit_patch_dir' in self.cfg: + print "\n\n" + print "*** You are now in a sub-shell in %s ." % tmpdir + print "*** Remove or edit these patch files as desired." + print "*** When you 'exit' all remaining files will be sent.\n" + cmd = "cd %s ; bash ;" % tmpdir + system(cmd) + cmd = "git send-email --no-chain-reply-to " cmd += "--from \"" + sender + "\"" for line in self.tolist: