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 <cel@netapp.com>
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: