comparison mercurial/commands.py @ 27857:b0b98e0a12f8

with: use context manager in rename
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 15 Jan 2016 13:14:49 -0800
parents 2b3a21052be9
children 7575c048482d
comparison
equal deleted inserted replaced
27856:2b3a21052be9 27857:b0b98e0a12f8
5816 This command takes effect at the next commit. To undo a rename 5816 This command takes effect at the next commit. To undo a rename
5817 before that, see :hg:`revert`. 5817 before that, see :hg:`revert`.
5818 5818
5819 Returns 0 on success, 1 if errors are encountered. 5819 Returns 0 on success, 1 if errors are encountered.
5820 """ 5820 """
5821 wlock = repo.wlock(False) 5821 with repo.wlock(False):
5822 try:
5823 return cmdutil.copy(ui, repo, pats, opts, rename=True) 5822 return cmdutil.copy(ui, repo, pats, opts, rename=True)
5824 finally:
5825 wlock.release()
5826 5823
5827 @command('resolve', 5824 @command('resolve',
5828 [('a', 'all', None, _('select all unresolved files')), 5825 [('a', 'all', None, _('select all unresolved files')),
5829 ('l', 'list', None, _('list state of files needing merge')), 5826 ('l', 'list', None, _('list state of files needing merge')),
5830 ('m', 'mark', None, _('mark files as resolved')), 5827 ('m', 'mark', None, _('mark files as resolved')),