Handle failed pushes differently depending on cause
authorKarl Hasselström <kha@treskal.com>
Thu, 20 Mar 2008 23:12:11 +0000 (23:12 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 20 Mar 2008 23:12:11 +0000 (23:12 +0000)
commit363d432f16ef2ba8b8f11e6b2402c35842a0a7e7
treef7e1af52b2c9b10c28eae3f7a2599c2daca28f24
parent923309140a6f091df9ed7120d7c818586c980c86
Handle failed pushes differently depending on cause

Specifically, if the push failed because of a merge conflict, the
patch should be applied but empty; and if it fails for any other
reason (such as a too-dirty worktree), the patch should not be
applied.

This fixes the data loss bug tested for by t3000.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/lib/git.py
stgit/lib/transaction.py
t/t3000-dirty-merge.sh