[PATCH 1 of 2 STABLE] tests: demonstrate `hg show` mapping to showconfig

Gregory Szorc gregory.szorc at gmail.com
Thu Apr 27 19:11:34 EDT 2017


This series is a "pick your poison" if you are a reviewer. I'm partial to
the more complex one adding an argument to @command. But it may not be
appropriate for stable. So a hacky fallback is provided as an alternative.

On Thu, Apr 27, 2017 at 4:08 PM, Gregory Szorc <gregory.szorc at gmail.com>
wrote:

> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1493333518 25200
> #      Thu Apr 27 15:51:58 2017 -0700
> # Branch stable
> # Node ID f495df1ca1cc3583ecfbed208de69a966eb74aea
> # Parent  f9dd22b588e9f0eb475ce522a78c640d35c12310
> tests: demonstrate `hg show` mapping to showconfig
>
> `hg config` has a "showconfig" alias. In a vanilla installation where
> the "show" extension isn't enabled, `hg show` will map to
> `hg showconfig`. Add a test demonstrating this confusing behavior.
>
> diff --git a/tests/test-show.t b/tests/test-show.t
> --- a/tests/test-show.t
> +++ b/tests/test-show.t
> @@ -1,3 +1,20 @@
> +`hg show` without extension enabled says to enable the extension
> +TODO this is broken due to matching with showconfig
> +
> +  $ hg show
> +  defaults.backout=-d "0 0"
> +  defaults.commit=-d "0 0"
> +  defaults.shelve=--date "0 0"
> +  defaults.tag=-d "0 0"
> +  devel.all-warnings=true
> +  largefiles.usercache=$TESTTMP/.cache/largefiles
> +  ui.slash=True
> +  ui.interactive=False
> +  ui.mergemarkers=detailed
> +  ui.promptecho=True
> +  web.address=localhost
> +  web.ipv6=False
> +
>    $ cat >> $HGRCPATH << EOF
>    > [extensions]
>    > show =
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170427/7c1bd1f0/attachment.html>


More information about the Mercurial-devel mailing list