Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/localrepo.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 | 0912d8df5e19 |
children | e8a584067825 |
line wrap: on
line diff
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -586,10 +586,11 @@ class localrepository(repo.repository): self.ui.warn(_("no interrupted transaction available\n")) return False - def rollback(self, wlock=None): + def rollback(self, wlock=None, lock=None): if not wlock: wlock = self.wlock() - l = self.lock() + if not lock: + lock = self.lock() if os.path.exists(self.sjoin("undo")): self.ui.status(_("rolling back last transaction\n")) transaction.rollback(self.sopener, self.sjoin("undo"))