tests/test-encode
author Bryan O'Sullivan <bos@serpentine.com>
Sat, 17 Sep 2005 00:27:27 -0700
changeset 1270 fc3b41570082
parent 1258 1945754e466b
child 1933 7544700fd931
permissions -rwxr-xr-x
Switch to new syntax for .hgignore files. Here is the new syntax, in summary. Trailing white space is dropped. The escape character is "\". Comments start with #. Empty lines are skipped. Lines can be of the following formats: syntax: regexp # defaults following lines to non-rooted regexps syntax: glob # defaults following lines to non-rooted globs re:pattern # non-rooted regular expression glob:pattern # non-rooted glob pattern # pattern of the current default type The default pattern type is regexp, which is completely backwards compatible with the old hgignore syntax. In the dirstate class, the ignore method has been reworked to be based on the util.matcher function, by way of a new dirstate.hgignore method.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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