[PATCH] update: correct description of --check option

Martin von Zweigbergk martinvonz at google.com
Wed Apr 27 17:08:16 EDT 2016


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1461790974 25200
#      Wed Apr 27 14:02:54 2016 -0700
# Branch stable
# Node ID 36a13be3120f8e40917089ff24599bae7f45bc8a
# Parent  87d4a6c5567e81386b8c2209d95060d5bf72e064
update: correct description of --check option

The current "update across branches if no uncommitted changes" makes
it sound like updating across branches (with no uncommitted changes)
is allowed only with this option, which is not true. Also, the option
does not care whether it's linear or across branches. Instead, it
checks that there are no uncommitted changes. Let's explain what it
does instead of trying to suggest what happens without it.

diff -r 87d4a6c5567e -r 36a13be3120f mercurial/commands.py
--- a/mercurial/commands.py	Fri Apr 22 13:38:02 2016 -0500
+++ b/mercurial/commands.py	Wed Apr 27 14:02:54 2016 -0700
@@ -7101,8 +7101,7 @@
 
 @command('^update|up|checkout|co',
     [('C', 'clean', None, _('discard uncommitted changes (no backup)')),
-    ('c', 'check', None,
-     _('update across branches if no uncommitted changes')),
+    ('c', 'check', None, _('require clean working directory')),
     ('d', 'date', '', _('tipmost revision matching date'), _('DATE')),
     ('r', 'rev', '', _('revision'), _('REV'))
      ] + mergetoolopts,


More information about the Mercurial-devel mailing list