--- 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