Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 5986:a732eebf1958
hg import: write the dirstate after every commit
This allows the transaction system to backup the correct file, so
that a future rollback can do the right thing.
This should fix issue963.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sun, 03 Feb 2008 21:03:46 -0200 |
parents | 000ed6873951 |
children | 30d2fecaab76 d0dbae32517c |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Feb 03 21:03:46 2008 -0200 +++ b/mercurial/commands.py Sun Feb 03 21:03:46 2008 -0200 @@ -1632,6 +1632,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: