tests/test-pull-branch
author Martin Geisler <mg@lazybytes.net>
Sun, 04 Oct 2009 22:03:41 +0200
changeset 10443 62d484a81dfe
parent 7372 e17dbf140035
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).

#!/bin/sh

hg init t
cd t
echo 1 > foo
hg ci -Am1 # 0
hg branch branchA
echo a1 > foo
hg ci -ma1 # 1

cd ..
hg init tt
cd tt
hg pull ../t
hg up branchA

cd ../t
echo a2 > foo
hg ci -ma2 # 2
echo % create branch B
hg up 0
hg branch branchB
echo b1 > foo
hg ci -mb1 # 3

cd ../tt
echo % a new branch is there
hg pull -u ../t

echo % develop both branch
cd ../t
hg up branchA
echo a3 > foo
hg ci -ma3 # 4
hg up branchB
echo b2 > foo
hg ci -mb2 # 5

cd ../tt
echo % should succeed, no new heads
hg pull -u ../t

echo % add an head on other branch
cd ../t
hg up branchA
echo a4 > foo
hg ci -ma4 # 6
hg up branchB
echo b3.1 > foo
hg ci -m b3.1 # 7
hg up 5
echo b3.2 > foo
hg ci -m b3.2 # 8

cd ../tt
echo % should succeed only one head on our branch
hg pull -u ../t

cd ../t
hg up -C branchA
echo a5.1 > foo
hg ci -ma5.1 # 9
hg up 6
echo a5.2 > foo
hg ci -ma5.2 # 10
hg up 7
echo b4.1 > foo
hg ci -m b4.1 # 11
hg up -C 8
echo b4.2 > foo
hg ci -m b4.2 # 12

cd ../tt
echo % should fail new head in our branch
hg pull -u ../t