From d2a270a6282dbc78e7c1a432af1a7cc7c47c1b4a Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 23 Nov 2008 21:16:19 +0000 Subject: [PATCH] Fix the HEAD updating during a conflicting push (bug #12609) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Catalin Marinas Copying most of Karl's comment from the list: 1. In push_patch(), we delay the final stack update (the update() function) since we want to record the state just before the conflict in the stack log. 2. In run(), we update the branch head before running the delayed stack update (self.__conflicting_push()). The patch works around this problem by explicitly specifying what the branch head should be; this mechanism is used by undo etc. to be able to set the branch head to something that isn't the stack top. Signed-off-by: Catalin Marinas Acked-by: Karl Hasselström --- stgit/lib/transaction.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stgit/lib/transaction.py b/stgit/lib/transaction.py index 6623645..0f414d8 100644 --- a/stgit/lib/transaction.py +++ b/stgit/lib/transaction.py @@ -321,6 +321,7 @@ class StackTransaction(object): if any(getattr(cd, a) != getattr(orig_cd, a) for a in ['parent', 'tree', 'author', 'message']): comm = self.__stack.repository.commit(cd) + self.head = comm else: comm = None s = ' (unmodified)' -- [mdw]