tests/test-hgrc
author Martin Geisler <mg@lazybytes.net>
Sun, 04 Oct 2009 22:03:41 +0200
changeset 10443 62d484a81dfe
parent 10296 cade47dcac2d
child 10455 40dfd46d098f
permissions -rwxr-xr-x
minirst: support containers Text can be grouped into generic containers in reStructuredText: .. container:: foo This is text inside a "foo" container. .. container:: bar This is nested inside two containers. The minirst parser now recognizes these containers. The containers are either pruned completely from the output (included all nested blocks) or they are simply un-indented. So if 'foo' and 'bar' containers are kept, the above example will result in: This is text inside a "foo" container. This is nested inside two containers. If only 'foo' containers are kept, we get: This is text inside a "foo" container. No output is made if only 'bar' containers are kept. This feature will come in handy for implementing different levels of help output (e.g., verbose and debug level help texts).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1473
7d66ce9895fa make readconfig take a filename instead of a file pointer as argument
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
7d66ce9895fa make readconfig take a filename instead of a file pointer as argument
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
10043
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
     3
echo "invalid" > $HGRCPATH
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
     4
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
     5
echo "" > $HGRCPATH
7044
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
     6
10043
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
     7
# issue1199: escaping
7044
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
     8
hg init "foo%bar"
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
     9
hg clone "foo%bar" foobar
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
    10
p=`pwd`
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
    11
cd foobar
10043
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    12
cat .hg/hgrc | sed -e "s:$p:...:"
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    13
hg paths | sed -e "s:$p:...:"
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    14
hg showconfig | sed -e "s:$p:...:"
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    15
cd ..
9470
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
    16
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
    17
# issue1829: wrong indentation
10043
e95f0f70c3fd test-hgrc: cleanup
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    18
echo '[foo]' > $HGRCPATH
9470
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
    19
echo '  x = y' >> $HGRCPATH
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
    20
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
10042
7cdd2a7db2c2 config: raise ConfigError on non-existing include files
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    21
10295
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
    22
python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" \
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
    23
    > $HGRCPATH
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
    24
hg showconfig foo
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
    25
10042
7cdd2a7db2c2 config: raise ConfigError on non-existing include files
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    26
echo '%include /no-such-file' > $HGRCPATH
7cdd2a7db2c2 config: raise ConfigError on non-existing include files
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    27
hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"