Patchwork update: correct description of --check option

login
register
mail settings
Submitter via Mercurial-devel
Date April 27, 2016, 9:08 p.m.
Message ID <36a13be3120f8e409170.1461791296@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/14815/
State Accepted
Headers show

Comments

via Mercurial-devel - April 27, 2016, 9:08 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@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.
timeless - April 28, 2016, 12:31 a.m.
Martin von Zweigbergk wrote:
> The current "update across branches if no uncommitted changes" makes
> it sound like updating across branches (with no uncommitted changes)

Commit messages should describe the state with the changes applied as
present tense.
This quoted text doesn't do that.
via Mercurial-devel - April 28, 2016, 3:56 a.m.
On Wed, Apr 27, 2016 at 5:31 PM, timeless <timeless@gmail.com> wrote:
> Martin von Zweigbergk wrote:
>> The current "update across branches if no uncommitted changes" makes
>> it sound like updating across branches (with no uncommitted changes)
>
> Commit messages should describe the state with the changes applied as
> present tense.
> This quoted text doesn't do that.

Huh, I had no idea. Here's a rewrite from that perspective for someone
to change to in flight (I left present (?) tense in the sentence that
starts with "Let's" since I've seen that used frequently):

The old "update across branches if no uncommitted changes" made
it sound like updating across branches (with no uncommitted changes)
was allowed only with this option, which was not true. Also, the option
did not care whether it was linear or across branches. Instead, it
checked that there were no uncommitted changes. Let's explain what it
does instead of trying to suggest what happens without it.
Matt Mackall - April 28, 2016, 10:24 p.m.
On Wed, 2016-04-27 at 14:08 -0700, Martin von Zweigbergk via Mercurial-devel
wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@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

Queued for stable, thanks.

-- 
Mathematics is the supreme nostalgia of our time.

Patch

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,