update: clarify that -C and -c are mutually exclusive
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 13 Feb 2017 15:04:46 -0800
changeset 30964 afaf3c2b129c
parent 30963 7beb3ec34443
child 30965 f01df5d2fe49
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.
mercurial/commands.py
--- a/mercurial/commands.py	Mon Feb 13 11:58:02 2017 -0800
+++ b/mercurial/commands.py	Mon Feb 13 15:04:46 2017 -0800
@@ -5289,7 +5289,7 @@
     ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
     ('r', 'rev', '', _('revision'), _('REV'))
      ] + mergetoolopts,
-    _('[-c] [-C] [-d DATE] [[-r] REV]'))
+    _('[-C|-c] [-d DATE] [[-r] REV]'))
 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False,
            tool=None):
     """update working directory (or switch revisions)
@@ -5310,10 +5310,11 @@
 
     .. container:: verbose
 
-      The following rules apply when the working directory contains
-      uncommitted changes:
-
-      1. If neither -c/--check nor -C/--clean is specified, and if
+      The -C/--clean and -c/--check options control what happens if the
+      working directory contains uncommitted changes.
+      At most of one of them can be specified.
+
+      1. If no option is specified, and if
          the requested changeset is an ancestor or descendant of
          the working directory's parent, the uncommitted changes
          are merged into the requested changeset and the merged