hgext/histedit.py
branchstable
changeset 20071 4778f398ec83
parent 19972 1e13a5a9c66e
child 20503 23dc77874191
child 20770 5d22cadd1938
--- a/hgext/histedit.py	Mon Nov 18 15:43:45 2013 -0500
+++ b/hgext/histedit.py	Sun Nov 17 15:11:09 2013 -0800
@@ -159,6 +159,7 @@
 from mercurial import util
 from mercurial import obsolete
 from mercurial import merge as mergemod
+from mercurial.lock import release
 from mercurial.i18n import _
 
 cmdtable = {}
@@ -476,6 +477,15 @@
     for intentional "edit" command, but also for resolving unexpected
     conflicts).
     """
+    lock = wlock = None
+    try:
+        wlock = repo.wlock()
+        lock = repo.lock()
+        _histedit(ui, repo, *freeargs, **opts)
+    finally:
+        release(lock, wlock)
+
+def _histedit(ui, repo, *freeargs, **opts):
     # TODO only abort if we try and histedit mq patches, not just
     # blanket if mq patches are applied somewhere
     mq = getattr(repo, 'mq', None)