sapling/tests/test-alias2.t
Jun Wu d878cea953 dispatch: expand aliases correctly
Summary:
Use the "first argument position" reported by the parsing library to expand the
command name correctly.

Before this patch:

    --repo foo foo
           ^^^ this foo gets expanded (incorrectly)

After this patch:

    --repo foo foo
               ^^^ this foo gets expanded

Reviewed By: kulshrax

Differential Revision: D16556869

fbshipit-source-id: 8eca98d80cdd8f0d3d329040d6f2eb81653db99f
2019-07-29 19:35:31 -07:00

23 lines
467 B
Perl

Interesting corner cases.
command name matches global flag values
$ setconfig ui.allowemptycommit=1
$ hg init foo
$ hg -R foo commit -m "This is foo\n"
$ hg init log
$ hg -R log commit -m "This is log\n"
$ setconfig "alias.foo=log" "alias.log=log -T {desc} -r"
$ hg -R foo foo tip
This is foo\n (no-eol)
$ hg -R log foo tip
This is log\n (no-eol)
$ hg -R foo log tip
This is foo\n (no-eol)
$ hg -R log log tip
This is log\n (no-eol)