[PATCH 02 of 19] rebase: take locks in the right order
Mads Kiilerich
mads at kiilerich.com
Thu Jan 12 19:32:36 CST 2012
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1326413947 -3600
# Node ID 4fb59c0234f8d140e1a57b1381e3f5ab360ace27
# Parent 2796b9a69c8e6ac233c77c07071dd94c0f25ea7d
rebase: take locks in the right order
repo.lock was taken before repo.wlock - that could in principle cause a deadlock.
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -115,8 +115,8 @@
lock = wlock = None
try:
+ wlock = repo.wlock()
lock = repo.lock()
- wlock = repo.wlock()
# Validate input and define rebasing points
destf = opts.get('dest', None)
More information about the Mercurial-devel
mailing list