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.
--- a/mercurial/commands.py Sat May 12 16:02:46 2012 +0200
+++ b/mercurial/commands.py Sat May 12 20:06:04 2012 +0200
@@ -5634,9 +5634,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',