[PATCH 1 of 3] graft: clarify in help that `-r` not just is optional
Ryan McElroy
rm at fb.com
Sun Jan 17 14:05:53 CST 2016
On 1/17/2016 6:33 PM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1453055582 -3600
> # Sun Jan 17 19:33:02 2016 +0100
> # Node ID 1fca1cf4ecf3092cbb6ecd5f3357aee4c244b872
> # Parent 0029c2bebc23182c34f83fa22abde1d5d4aebc51
> graft: clarify in help that `-r` not just is optional
>
> Positional parameters are also treated as revisions, but the order of revisions
> matters and it will often be wrong if the user understands it as `-r` taking
> multiple revisions as `-r REV1 REV2`.
>
> (Alternatively, `-r` could be turned into a no-op flag as the documentation
> suggests. That would however be less "semantic markup" and I agree with the
> implementation in 55e7f352b1d3 but not the documentation.)
I actually strongly prefer your alternative a lot -- it will ensure that
the bad behavior doesn't happen even when the user messes up (which they
do in real life).
However, I'm not clear how you could make a parameter become "unnamed"
-- is that possible?
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3819,7 +3819,7 @@ def forget(ui, repo, *pats, **opts):
> ('U', 'currentuser', False,
> _('record the current user as committer'), _('DATE'))]
> + commitopts2 + mergetoolopts + dryrunopts,
> - _('[OPTION]... [-r] REV...'))
> + _('[OPTION]... [-r REV]... REV...'))
> def graft(ui, repo, *revs, **opts):
> '''copy changes from other branches onto the current branch
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list