Show More
@@ -616,6 +616,13 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
616 | than ``maxbackups`` backups are kept, if same timestamp |
|
616 | than ``maxbackups`` backups are kept, if same timestamp | |
617 | prevents from deciding exact order of them, for safety. |
|
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 | abortf = opts['abort'] |
|
626 | abortf = opts['abort'] | |
620 | continuef = opts['continue'] |
|
627 | continuef = opts['continue'] | |
621 | if not abortf and not continuef: |
|
628 | if not abortf and not continuef: | |
@@ -656,11 +663,10 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
656 | raise error.Abort(_("shelved change '%s' not found") % basename) |
|
663 | raise error.Abort(_("shelved change '%s' not found") % basename) | |
657 |
|
664 | |||
658 | oldquiet = ui.quiet |
|
665 | oldquiet = ui.quiet | |
659 |
|
|
666 | lock = tr = None | |
660 | forcemerge = ui.backupconfig('ui', 'forcemerge') |
|
667 | forcemerge = ui.backupconfig('ui', 'forcemerge') | |
661 | try: |
|
668 | try: | |
662 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'unshelve') |
|
669 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'unshelve') | |
663 | wlock = repo.wlock() |
|
|||
664 | lock = repo.lock() |
|
670 | lock = repo.lock() | |
665 |
|
671 | |||
666 | tr = repo.transaction('unshelve', report=lambda x: None) |
|
672 | tr = repo.transaction('unshelve', report=lambda x: None) | |
@@ -755,7 +761,7 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
755 | ui.quiet = oldquiet |
|
761 | ui.quiet = oldquiet | |
756 | if tr: |
|
762 | if tr: | |
757 | tr.release() |
|
763 | tr.release() | |
758 |
lockmod.release(lock |
|
764 | lockmod.release(lock) | |
759 | ui.restoreconfig(forcemerge) |
|
765 | ui.restoreconfig(forcemerge) | |
760 |
|
766 | |||
761 | @command('shelve', |
|
767 | @command('shelve', |
General Comments 0
You need to be logged in to leave comments.
Login now