[PATCH] Move alias into core

Martin Geisler mg at lazybytes.net
Wed May 20 05:28:23 CDT 2009


Brendan Cully <brendan at kublai.com> writes:

> +def addaliases(ui, cmdtable):
> +    # aliases are processed after extensions have been loaded, so they
> +    # may use extension commands. Aliases can also use other alias definitions,
> +    # but only if they have been defined prior to the current definition.
> +    for alias, definition in ui.configitems('alias'):
> +        if not definition:
> +            ui.warn(_("*** no definition for alias '%s'\n") % alias)
> +            continue
> +        if alias in cmdtable:
> +            ui.warn(_("*** alias '%s' shadows command\n") % alias)

I would prefer the warnings without the "***" since most other ui.warn
calls don't have them. (Instead, I think it would be nice if ui.warn
would automatically add "warning:" or a similar prefix in order to
give consistent output.)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list