From: Yann Dirson Date: Tue, 20 Feb 2007 00:14:19 GMT Subject: [PATCH 4/5] Keep track of safe base changes. Message-ID: <20070220001418.31139.49033.stgit@gandelf.nowhere.earth> In-Reply-To: <20070220000908.31139.36841.stgit@gandelf.nowhere.earth> Signed-off-by: Yann Dirson --- stgit/commands/common.py | 2 ++ stgit/stack.py | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/stgit/commands/common.py b/stgit/commands/common.py index 240d003..56cb517 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -366,6 +366,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) diff --git a/stgit/stack.py b/stgit/stack.py index 3185d64..0f5d868 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -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