Add patch history support
[stgit] / stgit / commands / common.py
index b8ea3bb..bf8481e 100644 (file)
@@ -98,6 +98,8 @@ def git_id(rev):
                 return series.get_patch(patch).get_old_top()
             elif patch_id == 'bottom.old':
                 return series.get_patch(patch).get_old_bottom()
+            elif patch_id == 'log':
+                return series.get_patch(patch).get_log()
         if patch == 'base' and patch_id == None:
             return read_string(series.get_base_file())
     except RevParseException:
@@ -194,7 +196,7 @@ def push_patches(patches, check_merged = False):
             else:
                 print 'done'
 
-def pop_patches(patches):
+def pop_patches(patches, keep = False):
     """Pop the patches in the list from the stack. It is assumed that
     the patches are listed in the stack reverse order.
     """
@@ -205,7 +207,7 @@ def pop_patches(patches):
         print 'Popping "%s" - "%s" patches...' % (patches[0], p),
     sys.stdout.flush()
 
-    crt_series.pop_patch(p)
+    crt_series.pop_patch(p, keep)
 
     print 'done'