On Thu, 22 Feb 2018 20:33:36 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.f...@octobus.net>
> # Date 1519313522 -3600
> #      Thu Feb 22 16:32:02 2018 +0100
> # Node ID b65a85952c09cf4c71a1458fbc4ec77c49683314
> # Parent  428de1a59f2df3d6d07ff1d7164c8ee56cbb7825
> # EXP-Topic noname
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
> b65a85952c09
> namespace: fastpath name lookup on invalid name
> 
> Since label cannot contains leading or trailing whitespace we can skip looking
> for them. This is useful in repositories with slow labels (eg: special type of
> tags). Short command running on a specific revision can benefit from such
> shortcut.
> 
> eg on a repository where loading tags take 0.4s:
> 
> 1: hg log --template '{node}\n' --rev 'rev(0)'
>    0.560 seconds
> 
> 2: hg log --template '{node}\n' --rev ' rev(0)'
>    0.109 seconds
> 
> The changeset introduce a generic way to do such fast-pathing to help
> extensions writer to apply the same principle to their extensions.

So is this basically the same as the previous version in that we have to
suggest using a weird syntax (leading/trailing space) to get to the fast path?

https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-February/111432.html
> Instead, maybe we can make lookup() to not search slow labels assuming these
> labeling schemes didn't exist in pre-revset era. Alternatively, we could add
> a config knob to switch off the old-style range support.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to