Fix the HEAD updating during a conflicting push (bug #12609)
authorCatalin Marinas <catalin.marinas@gmail.com>
Sun, 23 Nov 2008 21:16:19 +0000 (21:16 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Sat, 29 Nov 2008 17:01:18 +0000 (17:01 +0000)
commitd2a270a6282dbc78e7c1a432af1a7cc7c47c1b4a
tree4f05112b887908136863019365ec4b581029a7b7
parent60a825576e437809c7b4d51329474edaf8f9c66a
Fix the HEAD updating during a conflicting push (bug #12609)

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 <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
stgit/lib/transaction.py