mq: qimport need wlock for --push - do that after releasing lock stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 30 Jan 2012 17:37:45 +0100
branchstable
changeset 16681 0128cdb846d9
parent 16680 d0e419b0f7de
child 16682 40cdf8bc8d40
mq: qimport need wlock for --push - do that after releasing lock qimport locking was introduced for phases in 29ea059be33c.
hgext/mq.py
--- a/hgext/mq.py	Sat May 12 20:06:02 2012 +0200
+++ b/hgext/mq.py	Mon Jan 30 17:37:45 2012 +0100
@@ -2089,12 +2089,11 @@
                 rev=opts.get('rev'), git=opts.get('git'))
         finally:
             q.savedirty()
-
-
-        if imported and opts.get('push') and not opts.get('rev'):
-            return q.push(repo, imported[-1])
     finally:
         lock.release()
+
+    if imported and opts.get('push') and not opts.get('rev'):
+        return q.push(repo, imported[-1])
     return 0
 
 def qinit(ui, repo, create):