annotate tests/test-encode @ 1739:57de7e1a81d2

AmbiguousCommand is raised too soon. Right now, hg raises AmbiguousCommand as soon as it finds two commands/aliases that start with the substring it's searching for, even though it may still find a full match later on. This is a bit hard to hit on purpose, because hg checks the list of commands in whatever order is returned by table.keys(), which will change when you add an alias to a command. You should be able to hit it by adding an alias "u" to the "identify" command - not that that makes a lot of sense...
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 17 Feb 2006 17:41:23 -0600
parents 1945754e466b
children 7544700fd931
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1258
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
1 #!/bin/sh
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
2
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
3 hg init
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
4
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
5 cat > .hg/hgrc <<EOF
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
6 [encode]
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
7 *.gz = gunzip
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
8
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
9 [decode]
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
10 *.gz = gzip
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
11
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
12 EOF
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
13
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
14 echo "this is a test" | gzip > a.gz
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
15 hg add a.gz
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
16 hg ci -m "test" -d "0 0"
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
17 echo %% no changes
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
18 hg status
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
19 touch a.gz
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
20
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
21 echo %% no changes
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
22 hg status
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
23
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
24 echo %% uncompressed contents in repo
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
25 hg debugdata .hg/data/a.gz.d 0
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
26
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
27 echo %% uncompress our working dir copy
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
28 gunzip < a.gz
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
29
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
30 rm a.gz
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
31 hg co
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
32
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
33 echo %% uncompress our new working dir copy
1945754e466b Add file encoding/decoding support
mpm@selenic.com
parents:
diff changeset
34 gunzip < a.gz