--- a/hgext/mq.py Fri Jan 15 13:14:47 2016 -0800
+++ b/hgext/mq.py Fri Jan 15 13:14:47 2016 -0800
@@ -1318,8 +1318,7 @@
keepchanges=False):
self.checkkeepchanges(keepchanges, force)
diffopts = self.diffopts()
- wlock = repo.wlock()
- try:
+ with repo.wlock():
heads = []
for hs in repo.branchmap().itervalues():
heads.extend(hs)
@@ -1461,9 +1460,6 @@
self.ui.write(_("now at: %s\n") % top)
return ret[0]
- finally:
- wlock.release()
-
def pop(self, repo, patch=None, force=False, update=True, all=False,
nobackup=False, keepchanges=False):
self.checkkeepchanges(keepchanges, force)