Patchwork [1,of,5] grep: clarify that --all works exactly the same way as --diff

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 17, 2020, 12:42 p.m.
Message ID <a4ddce2205693eb3bfaf.1600346545@mimosa>
Download mbox | patch
Permalink /patch/47185/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 17, 2020, 12:42 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1599711053 -32400
#      Thu Sep 10 13:10:53 2020 +0900
# Node ID a4ddce2205693eb3bfafff9a3f9ffe7c4d8e45f9
# Parent  6916e6b81fef2158afbdf235acc826c81649d149
grep: clarify that --all works exactly the same way as --diff

7fbb5d76c555 "grep: add --diff flag" says as such, but the help strings
have diverged since, and it's getting fuzzier what this --all will do.
Augie Fackler - Sept. 17, 2020, 3:24 p.m.
queued these, thanks

> On Sep 17, 2020, at 08:42, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1599711053 -32400
> #      Thu Sep 10 13:10:53 2020 +0900
> # Node ID a4ddce2205693eb3bfafff9a3f9ffe7c4d8e45f9
> # Parent  6916e6b81fef2158afbdf235acc826c81649d149
> grep: clarify that --all works exactly the same way as --diff
> 
> 7fbb5d76c555 "grep: add --diff flag" says as such, but the help strings
> have diverged since, and it's getting fuzzier what this --all will do.
> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3252,7 +3252,7 @@ statemod.addunfinished(
>     b'grep',
>     [
>         (b'0', b'print0', None, _(b'end fields with NUL')),
> -        (b'', b'all', None, _(b'print all revisions that match (DEPRECATED) ')),
> +        (b'', b'all', None, _(b'an alias to --diff (DEPRECATED)')),
>         (
>             b'',
>             b'diff',
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3252,7 +3252,7 @@  statemod.addunfinished(
     b'grep',
     [
         (b'0', b'print0', None, _(b'end fields with NUL')),
-        (b'', b'all', None, _(b'print all revisions that match (DEPRECATED) ')),
+        (b'', b'all', None, _(b'an alias to --diff (DEPRECATED)')),
         (
             b'',
             b'diff',