diff -r 8e7d64989bb8 -r 30d2fecaab76 mercurial/commands.py --- a/mercurial/commands.py Sat Feb 02 21:01:43 2008 +0100 +++ b/mercurial/commands.py Sun Feb 03 21:47:07 2008 -0200 @@ -1540,6 +1540,9 @@ repo.rollback() raise util.Abort(_('patch is damaged' ' or loses information')) + # Force a dirstate write so that the next transaction + # backups an up-do-date file. + repo.dirstate.write() finally: os.unlink(tmpname) finally: