[PATCH 1 of 6] revset: make tokenize extensible to parse alias declarations and definitions

Matt Mackall mpm at selenic.com
Thu Jan 8 14:35:04 CST 2015


On Thu, 2015-01-08 at 19:37 +0900, FUJIWARA Katsunori wrote:
> +    if not syminitletter:
> +        syminitletter = lambda c: c.isalnum() or c in '._@' or ord(c) > 127
> +    if not symletter:
> +        symletter = lambda i, c: c.isalnum() or c in "-._/@" or ord(c) > 127

You don't explain what "i" is used for.

Ideally, we'd make these checks a trivial set lookup, which is much
faster than a function call to a complex conditional and also tweakable.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list