[issue3298] alias for showconfig won't work outside repo

A. Budden bugs at mercurial.selenic.com
Thu Mar 1 13:05:10 CST 2012


New submission from A. Budden <abudden+MERCURIAL at gmail.com>:

To reproduce:

    $ cat >>~/.hgrc <<EOF
    > [alias]
    > whoami = showconfig ui.username
    > EOF
    $ cd / # I'm assuming that /.hg doesn't exist
    $ hg showconfig ui.username
    A. S. Budden <email at email.com>
    $ hg whoami
    abort: no repository found in '/' (.hg not found)!

More information (from Matt Mackall):

> Any idea what's causing this?

Yep. Each command has a notion of whether or not it requires a repo to
operate on. This is inherited by aliases. But a smaller set of commands
optionally work with a repo (like showconfig), and this property is not
inherited. Please open a bug for this.

----------
messages: 19237
nosy: abudden
priority: bug
status: unread
title: alias for showconfig won't work outside repo

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3298>
____________________________________________________


More information about the Mercurial-devel mailing list