tests/test-convert-splicemap
author Martin Geisler <mg@lazybytes.net>
Sun, 04 Oct 2009 22:03:41 +0200
changeset 10443 62d484a81dfe
parent 10119 bb5ea66789e3
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:
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     4
echo "convert=" >> $HGRCPATH
10119
bb5ea66789e3 tests: load with "ext =" instead of "hgext.ext ="
Martin Geisler <mg@lazybytes.net>
parents: 8523
diff changeset
     5
echo 'graphlog =' >> $HGRCPATH
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     6
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     7
glog()
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     8
{
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8047
diff changeset
     9
    hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    10
}
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    11
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    12
hg init repo1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    13
cd repo1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    14
echo a > a
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    15
hg ci -Am adda
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    16
echo b > b
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    17
echo a >> a
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    18
hg ci -Am addb
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    19
PARENTID1=`hg id --debug -i`
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    20
echo c > c
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    21
hg ci -Am addc
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    22
PARENTID2=`hg id --debug -i`
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    23
cd ..
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    24
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    25
hg init repo2
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    26
cd repo2
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    27
echo b > a
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    28
echo d > d
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    29
hg ci -Am addaandd
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    30
CHILDID1=`hg id --debug -i`
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    31
echo d >> d
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    32
hg ci -Am changed
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    33
CHILDID2=`hg id --debug -i`
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    34
echo e > e
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    35
hg ci -Am adde
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    36
cd ..
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    37
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    38
echo '% test invalid splicemap'
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    39
cat > splicemap <<EOF
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    40
$CHILDID2
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    41
EOF
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    42
hg convert --splicemap splicemap repo2 repo1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    43
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    44
echo '% splice repo2 on repo1'
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    45
cat > splicemap <<EOF
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    46
$CHILDID1 $PARENTID1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    47
$CHILDID2 $PARENTID2,$CHILDID1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    48
EOF
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    49
hg clone repo1 target1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    50
hg convert --splicemap splicemap repo2 target1
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    51
glog -R target1