From 2c3a16552d7d3809145890e0e3ac65ea88a6bd52 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sun, 28 May 2006 08:46:11 +0100 Subject: [PATCH] Allow to specify multiple patch names on push command-line Signed-off-by: Yann Dirson --- stgit/commands/push.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stgit/commands/push.py b/stgit/commands/push.py index 90777c1..71fe100 100644 --- a/stgit/commands/push.py +++ b/stgit/commands/push.py @@ -25,7 +25,7 @@ from stgit import stack, git help = 'push a patch on top of the series' -usage = """%prog [options] [] +usage = """%prog [options] [ [...]] Push a patch (defaulting to the first unapplied one) or range of patches to the stack. The 'push' operation allows patch reordering by @@ -118,11 +118,9 @@ def func(parser, options, args): patches = unapplied elif len(args) == 0: patches = [unapplied[0]] - elif len(args) == 1: - patches = args - is_patch_appliable(patches[0]) else: - parser.error('incorrect number of arguments') + patches = args + map(is_patch_appliable, patches) if patches == []: raise CmdException, 'No patches to push' -- 2.11.0