[PATCH 7 of 7 path-configs] ui.paths: accept multiple arguments to getpath()

Sean Farley sean.michael.farley at gmail.com
Sun Feb 8 03:02:42 CST 2015


Gregory Szorc writes:

> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1423350425 28800
> #      Sat Feb 07 15:07:05 2015 -0800
> # Node ID f68fa5071815f89a369dc55cc987e852344a07f5
> # Parent  327b209f4ef203fd5d9bedb2527b8bfdc9edad3f
> ui.paths: accept multiple arguments to getpath()
>
> It is a common pattern to do something like
> |ui.expandpath(dest or 'default-push', dest or 'default')| This is
> essentially multiple fallback, albeit implemented in a manner that is
> hard to read and understand. Since we're reinventing the paths APIs,
> let's support a sane API for multi-query.

This series is extremely interesting. I am still digesting it but plan
to give it more attention tomorrow. I already like the fact that you
wrote doc strings and tests :-D


More information about the Mercurial-devel mailing list