From 94b7894d7cbbbe5c1350a198727f88c51f3cd4de Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 6 Oct 2005 11:20:14 +0100 Subject: [PATCH] Allow print_crt_patch to work on other branches print_crt_patch() current prints the current patch in the current branch. Add a function argument to allow it to print the current patch in other branches. Signed-off-by: Chuck Lever --- stgit/commands/common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stgit/commands/common.py b/stgit/commands/common.py index 7a9df6e..f9e2a28 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -92,8 +92,12 @@ def check_conflicts(): if os.path.exists(os.path.join(git.base_dir, 'conflicts')): raise CmdException, 'Unsolved conflicts. Please resolve them first' -def print_crt_patch(): - patch = crt_series.get_current() +def print_crt_patch(branch = None): + if not branch: + patch = crt_series.get_current() + else: + patch = stack.Series(branch).get_current() + if patch: print 'Now at patch "%s"' % patch else: -- 2.11.0