[PATCH 4 of 6 V2] update: clarify that -C and -c are mutually exclusive

Martin von Zweigbergk martinvonz at google.com
Tue Feb 14 18:08:39 EST 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1487027086 28800
#      Mon Feb 13 15:04:46 2017 -0800
# Node ID f9b2552610a5453bf836d3c7469fbebc59c5ad4b
# Parent  8a7b145ee159628a0ab5926ef5e4354df3f05ee0
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.

diff -r 8a7b145ee159 -r f9b2552610a5 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
@@ -5916,7 +5916,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)
@@ -5937,10 +5937,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


More information about the Mercurial-devel mailing list