return series.get_patch(patch_name).get_top()
elif patch_id == 'bottom':
return series.get_patch(patch_name).get_bottom()
+ # Note we can return None here.
+ elif patch_id == 'top.old':
+ return series.get_patch(patch_name).get_old_top()
+ elif patch_id == 'bottom.old':
+ return series.get_patch(patch_name).get_old_bottom()
# base
if patch_name == 'base' and len(string_list) == 1:
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: