[PATCH 2 of 4 stable] unbundle: move bookmark update outside the lock
Mads Kiilerich
mads at kiilerich.com
Sat May 12 13:37:44 CDT 2012
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1336845964 -7200
# Node ID 711ef9c22ba55ef5e160793792b39a74167bb05a
# Parent 0802cad1ac04f820ee98ed938df41404dab7258e
unbundle: move bookmark update outside the lock
d16c99f16f00 introduced updatecurrentbookmark after unbundle, but that path
might end up taking a wlock after lock when writing the bookmarks.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5623,9 +5623,9 @@
f = url.open(ui, fname)
gen = changegroup.readbundle(f, fname)
modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
- bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch())
finally:
lock.release()
+ bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch())
return postincoming(ui, repo, modheads, opts.get('update'), None)
@command('^update|up|checkout|co',
More information about the Mercurial-devel
mailing list