hgext/evolve.py
changeset 1687 73e0018c423f
parent 1686 474db2d60202
child 1688 031682c1faa2
--- a/hgext/evolve.py	Mon Apr 25 16:24:42 2016 -0700
+++ b/hgext/evolve.py	Mon May 02 18:21:54 2016 +0200
@@ -3121,12 +3121,13 @@
         ui.write_err(_('single revision specified, nothing to fold\n'))
         return 1
 
-    root, head = _foldcheck(repo, revs)
-
     wlock = lock = None
     try:
         wlock = repo.wlock()
         lock = repo.lock()
+
+        root, head = _foldcheck(repo, revs)
+
         tr = repo.transaction('touch')
         try:
             commitopts = opts.copy()