[PATCH 3 of 6] amend: fix unlocking order - first lock then wlock

Mads Kiilerich mads at kiilerich.com
Tue Apr 16 21:11:03 CDT 2013


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1366162868 -7200
# Node ID 50b42260018a4739637cde911f42c04ecd402c88
# Parent  815cbc05cd06440e71448fd43d20142d2fc1db91
amend: fix unlocking order - first lock then wlock

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1790,7 +1790,7 @@ def amend(ui, repo, commitfunc, old, ext
     finally:
         if newid is None:
             repo.dirstate.invalidate()
-        lockmod.release(wlock, lock)
+        lockmod.release(lock, wlock)
     return newid
 
 def commiteditor(repo, ctx, subs):


More information about the Mercurial-devel mailing list