##// END OF EJS Templates
shelve: widen wlock scope of unshelve for consistency while processing...
FUJIWARA Katsunori -
r27287:c9ceea3f default
parent child Browse files
Show More
@@ -616,6 +616,13 def unshelve(ui, repo, *shelved, **opts)
616 616 than ``maxbackups`` backups are kept, if same timestamp
617 617 prevents from deciding exact order of them, for safety.
618 618 """
619 wlock = repo.wlock()
620 try:
621 return _dounshelve(ui, repo, *shelved, **opts)
622 finally:
623 lockmod.release(wlock)
624
625 def _dounshelve(ui, repo, *shelved, **opts):
619 626 abortf = opts['abort']
620 627 continuef = opts['continue']
621 628 if not abortf and not continuef:
@@ -656,11 +663,10 def unshelve(ui, repo, *shelved, **opts)
656 663 raise error.Abort(_("shelved change '%s' not found") % basename)
657 664
658 665 oldquiet = ui.quiet
659 wlock = lock = tr = None
666 lock = tr = None
660 667 forcemerge = ui.backupconfig('ui', 'forcemerge')
661 668 try:
662 669 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'unshelve')
663 wlock = repo.wlock()
664 670 lock = repo.lock()
665 671
666 672 tr = repo.transaction('unshelve', report=lambda x: None)
@@ -755,7 +761,7 def unshelve(ui, repo, *shelved, **opts)
755 761 ui.quiet = oldquiet
756 762 if tr:
757 763 tr.release()
758 lockmod.release(lock, wlock)
764 lockmod.release(lock)
759 765 ui.restoreconfig(forcemerge)
760 766
761 767 @command('shelve',
General Comments 0
You need to be logged in to leave comments. Login now