Keep track of safe base changes.
authorYann Dirson <ydirson@altern.org>
Tue, 20 Feb 2007 00:14:19 +0000 (01:14 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 21 Feb 2007 18:41:14 +0000 (18:41 +0000)
Signed-off-by: Yann Dirson <ydirson@altern.org>
stgit/commands/common.py
stgit/stack.py

index c2c99e2..2ef8454 100644 (file)
@@ -367,6 +367,8 @@ def rebase(target):
     git.reset(tree_id = git_id(target))
 
 def post_rebase(applied, nopush, merged):
+    # memorize that we rebased to here
+    crt_series._set_field('orig-base', git.get_head())
     # push the patches back
     if not nopush:
         push_patches(applied, merged)
index 3185d64..0f5d868 100644 (file)
@@ -540,6 +540,7 @@ class Series(StgitObject):
         os.makedirs(os.path.join(self._dir(), 'patches'))
         os.makedirs(self.__refs_dir)
         self.__begin_stack_check()
+        self._set_field('orig-base', git.get_head())
 
     def convert(self):
         """Either convert to use a separate patch directory, or