From b6c95ada87ed57ef78f4a02987606e498cd4e04d Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 20 Feb 2007 01:14:19 +0100 Subject: [PATCH] Keep track of safe base changes. Signed-off-by: Yann Dirson --- stgit/commands/common.py | 2 ++ stgit/stack.py | 1 + 2 files changed, 3 insertions(+) diff --git a/stgit/commands/common.py b/stgit/commands/common.py index c2c99e26..2ef84542 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -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) diff --git a/stgit/stack.py b/stgit/stack.py index 3185d645..0f5d868d 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 -- 2.11.4.GIT