comparison 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
comparison
equal deleted inserted replaced
5985:850494d62674 5986:a732eebf1958
1630 if opts.get('exact'): 1630 if opts.get('exact'):
1631 if hex(n) != nodeid: 1631 if hex(n) != nodeid:
1632 repo.rollback() 1632 repo.rollback()
1633 raise util.Abort(_('patch is damaged' + 1633 raise util.Abort(_('patch is damaged' +
1634 ' or loses information')) 1634 ' or loses information'))
1635 # Force a dirstate write so that the next transaction backups
1636 # an up-do-date file.
1637 repo.dirstate.write()
1635 finally: 1638 finally:
1636 os.unlink(tmpname) 1639 os.unlink(tmpname)
1637 finally: 1640 finally:
1638 del lock, wlock 1641 del lock, wlock
1639 1642