From d3b31eeac6c6fba9352188755164f556faf56e59 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Wed, 14 Jan 2009 22:25:48 +0000 Subject: [PATCH] Fix the patch argument parsing for the "show" command Signed-off-by: Catalin Marinas --- stgit/commands/show.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stgit/commands/show.py b/stgit/commands/show.py index 3887b73..895943a 100644 --- a/stgit/commands/show.py +++ b/stgit/commands/show.py @@ -51,15 +51,15 @@ def func(parser, options, args): patches = crt_series.get_unapplied() elif len(args) == 0: patches = ['HEAD'] + elif '..' in ' '.join(args): + # patch ranges + applied = crt_series.get_applied() + unapplied = crt_series.get_unapplied() + patches = parse_patches(args, applied + unapplied + \ + crt_series.get_hidden(), len(applied)) else: - if len(args) == 1 or args[0].find('..') == -1: - # single patch or one/more commit ids - patches = args - else: - applied = crt_series.get_applied() - unapplied = crt_series.get_unapplied() - patches = parse_patches(args, applied + unapplied + \ - crt_series.get_hidden(), len(applied)) + # individual patches or commit ids + patches = args commit_ids = [git_id(crt_series, patch) for patch in patches] commit_str = '\n'.join([git.pretty_commit(commit_id, -- 2.11.0