tests/test-alias
author Steve Borho <steve@borho.org>
Fri, 05 Feb 2010 04:33:08 -0600
branchstable
changeset 10315 be324d31b6c5
parent 9993 8bce1e0d2801
child 10021 0022f5c5459e
permissions -rwxr-xr-x
commands: label from user is in local encoding repo.branchtags().keys() are in UTF-8, so the label should be converted to UTF-8 before checking for a naming conflict. Keep the original label for ui.status()

#!/bin/sh

cat >> $HGRCPATH <<EOF
[alias]
myinit = init
cleanstatus = status -c
unknown = bargle
ambiguous = s
recursive = recursive
nodefinition =
mylog = log
lognull = log -r null
shortlog = log --template '{rev} {node|short} | {date|isodate}\n'
dln = lognull --debug
nousage = rollback

[defaults]
mylog = -q
lognull = -q
log = -v
EOF

echo '% basic'
hg myinit alias

echo '% unknown'
hg unknown

echo '% ambiguous'
hg ambiguous

echo '% recursive'
hg recursive

echo '% no definition'
hg nodef

cd alias

echo '% no usage'
hg nousage

echo foo > foo
hg ci -Amfoo

echo '% with opts'
hg cleanst

echo '% with opts and whitespace'
hg shortlog

echo '% interaction with defaults'
hg mylog
hg lognull

echo '% properly recursive'
hg dln