changeset 16690:de2267517841

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.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 12 May 2012 20:06:04 +0200
parents f366d4c2ff34
children 7d6a660ca151
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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',