diff 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
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1565,7 +1565,7 @@ def import_(ui, repo, patch1, *patches, 
             n = repo.commit(files, message, user, date, wlock=wlock, lock=lock)
             if opts.get('exact'):
                 if hex(n) != nodeid:
-                    repo.rollback()
+                    repo.rollback(wlock=wlock, lock=lock)
                     raise util.Abort(_('patch is damaged or loses information'))
         finally:
             os.unlink(tmpname)