--- a/hgext/mq.py Fri Jan 15 13:14:47 2016 -0800
+++ b/hgext/mq.py Fri Jan 15 13:14:47 2016 -0800
@@ -2079,8 +2079,7 @@
lastparent = None
diffopts = self.diffopts({'git': git})
- tr = repo.transaction('qimport')
- try:
+ with repo.transaction('qimport') as tr:
for r in rev:
if not repo[r].mutable():
raise error.Abort(_('revision %d is not mutable') % r,
@@ -2121,9 +2120,6 @@
self.parseseries()
self.applieddirty = True
self.seriesdirty = True
- tr.close()
- finally:
- tr.release()
for i, filename in enumerate(files):
if existing: