Mercurial > hg
comparison mercurial/commands.py @ 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 | c2d9ef43ff6c |
comparison
equal
deleted
inserted
replaced
16689:f366d4c2ff34 | 16690:de2267517841 |
---|---|
5632 try: | 5632 try: |
5633 for fname in fnames: | 5633 for fname in fnames: |
5634 f = url.open(ui, fname) | 5634 f = url.open(ui, fname) |
5635 gen = changegroup.readbundle(f, fname) | 5635 gen = changegroup.readbundle(f, fname) |
5636 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) | 5636 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) |
5637 bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch()) | |
5638 finally: | 5637 finally: |
5639 lock.release() | 5638 lock.release() |
5639 bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch()) | |
5640 return postincoming(ui, repo, modheads, opts.get('update'), None) | 5640 return postincoming(ui, repo, modheads, opts.get('update'), None) |
5641 | 5641 |
5642 @command('^update|up|checkout|co', | 5642 @command('^update|up|checkout|co', |
5643 [('C', 'clean', None, _('discard uncommitted changes (no backup)')), | 5643 [('C', 'clean', None, _('discard uncommitted changes (no backup)')), |
5644 ('c', 'check', None, | 5644 ('c', 'check', None, |