tests/test-alias.out
author Brodie Rao <brodie@bitheap.org>
Thu, 22 Jul 2010 15:26:26 -0400
branchstable
changeset 11676 e4357c214bf1
parent 10793 16df09a54113
child 11681 c5e555e064d0
permissions -rw-r--r--
alias: ensure checksignature() is applied directly to the command (issue2286) Aliased commands that received bad arguments would raise TypeError instead of SignatureError. This only affected commands that weren't wrapped by extensions. Using util.checksignature() in cmdalias.__call__() ensures SignatureError is raised correctly.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     1
% basic
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     2
% unknown
8655
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
     3
alias 'unknown' resolves to unknown command 'bargle'
10021
0022f5c5459e help: don't display bogus help messages for invalid aliases
Brodie Rao <me+hg@dackz.net>
parents: 9993
diff changeset
     4
alias 'unknown' resolves to unknown command 'bargle'
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     5
% ambiguous
8655
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
     6
alias 'ambiguous' resolves to ambiguous command 's'
10021
0022f5c5459e help: don't display bogus help messages for invalid aliases
Brodie Rao <me+hg@dackz.net>
parents: 9993
diff changeset
     7
alias 'ambiguous' resolves to ambiguous command 's'
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     8
% recursive
8655
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
     9
alias 'recursive' resolves to unknown command 'recursive'
10021
0022f5c5459e help: don't display bogus help messages for invalid aliases
Brodie Rao <me+hg@dackz.net>
parents: 9993
diff changeset
    10
alias 'recursive' resolves to unknown command 'recursive'
8655
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    11
% no definition
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    12
no definition for alias 'nodefinition'
10021
0022f5c5459e help: don't display bogus help messages for invalid aliases
Brodie Rao <me+hg@dackz.net>
parents: 9993
diff changeset
    13
no definition for alias 'nodefinition'
9993
8bce1e0d2801 alias: do not crash when aliased command has no usage help text
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8655
diff changeset
    14
% no usage
8bce1e0d2801 alias: do not crash when aliased command has no usage help text
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8655
diff changeset
    15
no rollback information available
4801
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    16
adding foo
6aa1fae4c28a Add alias extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    17
% with opts
5764
8a5d8fb59ed2 Backed out changeset c2a21fe60994
Matt Mackall <mpm@selenic.com>
parents: 5762
diff changeset
    18
C foo
8519
5fbee915ea5d alias: a0104303f400 did not correctly handle whitespace in the args
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8477
diff changeset
    19
% with opts and whitespace
5fbee915ea5d alias: a0104303f400 did not correctly handle whitespace in the args
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8477
diff changeset
    20
0 e63c23eaa88a | 1970-01-01 00:00 +0000
8477
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5764
diff changeset
    21
% interaction with defaults
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5764
diff changeset
    22
0:e63c23eaa88a
a0104303f400 alias: honor the [defaults] section, fix issue1642
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 5764
diff changeset
    23
-1:000000000000
8655
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    24
% properly recursive
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    25
changeset:   -1:0000000000000000000000000000000000000000
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    26
parent:      -1:0000000000000000000000000000000000000000
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    27
parent:      -1:0000000000000000000000000000000000000000
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    28
manifest:    -1:0000000000000000000000000000000000000000
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    29
user:        
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    30
date:        Thu Jan 01 00:00:00 1970 +0000
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    31
extra:       branch=default
21688b8a594b Move alias into core
Brendan Cully <brendan@kublai.com>
parents: 8519
diff changeset
    32
10793
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    33
% path expanding
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    34
# HG changeset patch
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    35
# User test
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    36
# Date 0 0
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    37
# Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    38
# Parent  0000000000000000000000000000000000000000
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    39
foo
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    40
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    41
diff -r 000000000000 -r e63c23eaa88a foo
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    42
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    43
+++ b/foo	Thu Jan 01 00:00:00 1970 +0000
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    44
@@ -0,0 +1,1 @@
16df09a54113 expand paths in aliases
Alexander Solovyov <piranha@piranha.org.ua>
parents: 10021
diff changeset
    45
+foo
11676
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    46
% invalid arguments
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    47
hg rt: invalid arguments
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    48
hg rt 
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    49
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    50
alias for: hg root
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    51
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    52
print the root (top) of the current working directory
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    53
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    54
    Print the root directory of the current repository.
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    55
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    56
    Returns 0 on success.
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    57
e4357c214bf1 alias: ensure checksignature() is applied directly to the command (issue2286)
Brodie Rao <brodie@bitheap.org>
parents: 10793
diff changeset
    58
use "hg -v help rt" to show global options