Mercurial > public > mercurial-scm > hg-stable
diff tests/test-alias.t @ 16609:d36a384bec87 stable
alias: inherit command optionalrepo flag (issue3298)
Commands working without a repository, like "init", are listed in
commands.norepo. Commands optionally using a repository, like "showconfig", are
listed in commands.optionalrepo. Command aliases were inheriting the former but
not the latter.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 05 May 2012 12:21:22 +0200 |
parents | 795d591b6ef5 |
children | 7863ff383894 |
line wrap: on
line diff
--- a/tests/test-alias.t Mon May 07 00:52:11 2012 +0200 +++ b/tests/test-alias.t Sat May 05 12:21:22 2012 +0200 @@ -9,6 +9,7 @@ > # should clobber ci but not commit (issue2993) > ci = version > myinit = init + > optionalrepo = showconfig alias.myinit > cleanstatus = status -c > unknown = bargle > ambiguous = s @@ -108,8 +109,17 @@ $ hg help no--repository error in definition for alias 'no--repository': --repository may only be given on the command line +optional repository + + $ hg optionalrepo + init $ cd alias - + $ cat > .hg/hgrc <<EOF + > [alias] + > myinit = init -q + > EOF + $ hg optionalrepo + init -q no usage