[PATCH] Move alias into core

Brendan Cully brendan at kublai.com
Wed May 20 11:13:05 CDT 2009


On Wednesday, 20 May 2009 at 12:28, Martin Geisler wrote:
> 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.)

Ok, sure. I was just bringing over what the extension did. I do think
config errors ought to be flagged specially somehow.



More information about the Mercurial-devel mailing list