Summary:
Previously, the alias resolution is affected by the alias definition order. So
things like:
[alias]
myglog = log -G
myvlog = myglog -v
works. But
[alias]
myvlog = myglog -v
myglog = log -G
doesn't. D8767902 changed ordering semantics and broke some people's aliases,
because if both `myvlog` and `myglog` are defined in system hgrc, their order
cannot be changed from a user hgrc.
Instead of having subtle behavior here depending on the order. Let's just do
not rely on the order. This diff makes it so, by resolving aliases using latest
(alias-if-possible) definitions, with only one special case: "foo = foo ..."
uses the original non-alias "foo" command.
The "alias ... shadows command ..." debug message was removed as it's
no longer accurate.
Reviewed By: simpkins
Differential Revision: D9417710
fbshipit-source-id: f4228eba3c8c728163a54bcf053c379fa86bd123