--- a/mercurial/localrepo.py Fri Jan 15 13:14:50 2016 -0800
+++ b/mercurial/localrepo.py Fri Jan 15 13:14:50 2016 -0800
@@ -1126,8 +1126,7 @@
self.svfs.tryread("phaseroots"))
def recover(self):
- lock = self.lock()
- try:
+ with self.lock():
if self.svfs.exists("journal"):
self.ui.status(_("rolling back interrupted transaction\n"))
vfsmap = {'': self.svfs,
@@ -1139,8 +1138,6 @@
else:
self.ui.warn(_("no interrupted transaction available\n"))
return False
- finally:
- lock.release()
def rollback(self, dryrun=False, force=False):
wlock = lock = dsguard = None