Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4438:3900f684a150
Fix hg import --exact bug that hangs hg on failure.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Thu, 17 May 2007 09:29:30 -0700 |
parents | aac150af09e8 |
children | eff2eefdb65a 62019c4427e3 |
comparison
equal
deleted
inserted
replaced
4437:a210b40d0860 | 4438:3900f684a150 |
---|---|
1563 finally: | 1563 finally: |
1564 files = patch.updatedir(ui, repo, files, wlock=wlock) | 1564 files = patch.updatedir(ui, repo, files, wlock=wlock) |
1565 n = repo.commit(files, message, user, date, wlock=wlock, lock=lock) | 1565 n = repo.commit(files, message, user, date, wlock=wlock, lock=lock) |
1566 if opts.get('exact'): | 1566 if opts.get('exact'): |
1567 if hex(n) != nodeid: | 1567 if hex(n) != nodeid: |
1568 repo.rollback() | 1568 repo.rollback(wlock=wlock, lock=lock) |
1569 raise util.Abort(_('patch is damaged or loses information')) | 1569 raise util.Abort(_('patch is damaged or loses information')) |
1570 finally: | 1570 finally: |
1571 os.unlink(tmpname) | 1571 os.unlink(tmpname) |
1572 | 1572 |
1573 def incoming(ui, repo, source="default", **opts): | 1573 def incoming(ui, repo, source="default", **opts): |