Optimise the export command
[stgit] / stgit / commands / common.py
index f9e2a28..9747981 100644 (file)
@@ -24,6 +24,8 @@ from optparse import OptionParser, make_option
 from stgit.utils import *
 from stgit import stack, git
 
+crt_series = None
+
 
 # Command exception class
 class CmdException(Exception):
@@ -68,6 +70,11 @@ def git_id(string):
             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: