comparison mercurial/commands.py @ 30984:afaf3c2b129c

update: clarify that -C and -c are mutually exclusive This makes it clear in both the synopsis and in the verbose output that -C and -c are mutually exclusive. It also restructures the verbose output a little so it's better prepared for a third option (--merge). This patch also reorders the options to match the flag table.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 13 Feb 2017 15:04:46 -0800
parents 7beb3ec34443
children 9c2977ceaa46
comparison
equal deleted inserted replaced
30983:7beb3ec34443 30984:afaf3c2b129c
5287 [('C', 'clean', None, _('discard uncommitted changes (no backup)')), 5287 [('C', 'clean', None, _('discard uncommitted changes (no backup)')),
5288 ('c', 'check', None, _('require clean working directory')), 5288 ('c', 'check', None, _('require clean working directory')),
5289 ('d', 'date', '', _('tipmost revision matching date'), _('DATE')), 5289 ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
5290 ('r', 'rev', '', _('revision'), _('REV')) 5290 ('r', 'rev', '', _('revision'), _('REV'))
5291 ] + mergetoolopts, 5291 ] + mergetoolopts,
5292 _('[-c] [-C] [-d DATE] [[-r] REV]')) 5292 _('[-C|-c] [-d DATE] [[-r] REV]'))
5293 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False, 5293 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False,
5294 tool=None): 5294 tool=None):
5295 """update working directory (or switch revisions) 5295 """update working directory (or switch revisions)
5296 5296
5297 Update the repository's working directory to the specified 5297 Update the repository's working directory to the specified
5308 for uncommitted changes; if none are found, the working directory is 5308 for uncommitted changes; if none are found, the working directory is
5309 updated to the specified changeset. 5309 updated to the specified changeset.
5310 5310
5311 .. container:: verbose 5311 .. container:: verbose
5312 5312
5313 The following rules apply when the working directory contains 5313 The -C/--clean and -c/--check options control what happens if the
5314 uncommitted changes: 5314 working directory contains uncommitted changes.
5315 5315 At most of one of them can be specified.
5316 1. If neither -c/--check nor -C/--clean is specified, and if 5316
5317 1. If no option is specified, and if
5317 the requested changeset is an ancestor or descendant of 5318 the requested changeset is an ancestor or descendant of
5318 the working directory's parent, the uncommitted changes 5319 the working directory's parent, the uncommitted changes
5319 are merged into the requested changeset and the merged 5320 are merged into the requested changeset and the merged
5320 result is left uncommitted. If the requested changeset is 5321 result is left uncommitted. If the requested changeset is
5321 not an ancestor or descendant (that is, it is on another 5322 not an ancestor or descendant (that is, it is on another