tests/test-alias
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 17 May 2009 16:15:37 +0200
changeset 8477 a0104303f400
parent 5523 5db730475d6d
child 8519 5fbee915ea5d
permissions -rwxr-xr-x
alias: honor the [defaults] section, fix issue1642
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     1
#!/bin/sh
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     2
5523
5db730475d6d tests/*: avoid losing the original settings from $HGRCPATH
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4801
diff changeset
     3
cat >> $HGRCPATH <<EOF
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     4
[extensions]
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     5
alias=
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     6
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     7
[alias]
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     8
myinit = init
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     9
cleanstatus = status -c
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    10
unknown = bargle
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    11
ambiguous = s
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    12
recursive = recursive
8477
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    13
mylog = log
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    14
lognull = log -r null
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    15
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    16
[defaults]
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    17
mylog = -q
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    18
lognull = -q
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    19
log = -v
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    20
EOF
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    21
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    22
echo '% basic'
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    23
hg myinit alias
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    24
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    25
echo '% unknown'
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    26
hg unknown
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    27
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    28
echo '% ambiguous'
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    29
hg ambiguous
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    30
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    31
echo '% recursive'
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    32
hg recursive
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    33
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    34
cd alias
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    35
echo foo > foo
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    36
hg ci -Amfoo
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    37
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    38
echo '% with opts'
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    39
hg cleanst
8477
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    40
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    41
echo '% interaction with defaults'
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    42
hg mylog
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5523
diff changeset
    43
hg lognull