Record a single transaction for conflicting push operations
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 5 Feb 2010 13:44:59 +0000 (13:44 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 5 Feb 2010 13:44:59 +0000 (13:44 +0000)
commitba52890d6274b54c024388e79203f902d55476c7
treed92f36112e3fd8c6df6424ab8862a646ae60ee17
parente2a3c618b016f84b9e6fe44e77bb798b2b9c718f
Record a single transaction for conflicting push operations

StGit commands resulting in a conflicting patch pushing record two
transactions in the log (with one of them being inconsistent with HEAD
!= top). Undoing such operations requires two "stg undo" (possibly with
--hard) commands which is unintuitive. This patch changes such
operations to only record one log entry and "stg undo" reverts the stack
to the state prior to the operation.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Gustav HÃ¥llberg <gustav@virtutech.com>
Cc: Karl Wiberg <kha@treskal.com>
stgit/lib/transaction.py
t/t3101-reset-hard.sh
t/t3103-undo-hard.sh