revset: add "reversed" as a synonym for "reverse"
Augie Fackler
raf at durin42.com
Tue Oct 13 10:22:35 CDT 2015
On Mon, Oct 12, 2015 at 02:12:55PM -0700, Daniel Colascione (SEATTLE) wrote:
> # HG changeset patch
> # User Daniel Colascione <dancol at fb.com>
> # Date 1444684285 25200
> # Mon Oct 12 14:11:25 2015 -0700
> # Node ID 348e3483614878ac1049c836f4f3bb36127cae27
> # Parent a3fcc8e3136bd19012d28b863d6bf4429948c573
> revset: add "reversed" as synonym for "reverse"
I'm hesitant to do this, what's the benefit?
I get that it matches Python, but I'm not sure that merits the
duplicated name. Besides, hg tells you what you meant:
augie$ hg log -r 'reversed(::@)'
hg: parse error: unknown identifier: reversed
(did you mean one of removes, reverse?)
>
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -2193,6 +2193,7 @@
> "removes": removes,
> "rev": rev,
> "reverse": reverse,
> + "reversed": reverse,
> "roots": roots,
> "sort": sort,
> "secret": secret,
> @@ -2422,7 +2423,7 @@
> w = 100 # very slow
> elif f == "ancestor":
> w = 1 * smallbonus
> - elif f in "reverse limit first _intlist":
> + elif f in "reverse reversed limit first _intlist":
> w = 0
> elif f in "sort":
> w = 10 # assume most sorts look at changelog
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list