From: Yann Dirson Date: Sun, 28 May 2006 07:46:11 +0000 (+0100) Subject: Allow to specify multiple patch names on push command-line X-Git-Tag: v0.14.3~486 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/2c3a16552d7d3809145890e0e3ac65ea88a6bd52 Allow to specify multiple patch names on push command-line Signed-off-by: Yann Dirson --- 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'