prune: lock inside the try
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 06 Aug 2014 17:40:55 -0700
changeset 1019 0c733dab0036
parent 1018 30262465b932
child 1020 155949287628
prune: lock inside the try tss…
hgext/evolve.py
--- a/hgext/evolve.py	Wed Aug 06 17:39:32 2014 -0700
+++ b/hgext/evolve.py	Wed Aug 06 17:40:55 2014 -0700
@@ -1754,9 +1754,9 @@
         raise util.Abort(_('nothing to prune'))
 
     wlock = lock = None
-    wlock = repo.wlock()
-    sortedrevs = lambda specs: sorted(set(scmutil.revrange(repo, specs)))
     try:
+        wlock = repo.wlock()
+        sortedrevs = lambda specs: sorted(set(scmutil.revrange(repo, specs)))
         lock = repo.lock()
         # defines pruned changesets
         precs = []