author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
Wed, 13 Jan 2010 12:00:06 +0100 | |
changeset 10244 | c4c0502be198 |
parent 10154 | d4a62b6d4a58 |
child 10398 | ace3cf2bc991 |
permissions | -rwxr-xr-x |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
1 |
#!/bin/sh |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
2 |
|
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
3 |
mkdir test |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
4 |
cd test |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
5 |
hg init |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
6 |
for i in 0 1 2 3 4 5 6 7 8; do |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
7 |
echo $i >> foo |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
8 |
hg commit -A -m $i -d "1000000 0" |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
9 |
done |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 |
hg verify |
5384
e3a0c092b4e2
Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3988
diff
changeset
|
11 |
hg serve -p $HGPORT -d --pid-file=hg.pid |
2571
83cfd95eafb5
tests: add timeouts, make run-tests.py clean up dead daemon processes
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2521
diff
changeset
|
12 |
cat hg.pid >> $DAEMON_PIDS |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
13 |
cd .. |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
14 |
|
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
15 |
hg init new |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
16 |
# http incoming |
10154
d4a62b6d4a58
run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
7762
diff
changeset
|
17 |
hg -R new incoming http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
d4a62b6d4a58
run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
7762
diff
changeset
|
18 |
hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
19 |
# local incoming |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
20 |
hg -R new incoming test |
2521
9cceb439048b
add -r/--rev arguments to incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2260
diff
changeset
|
21 |
hg -R new incoming -r 4 test |
6191
01594b0c86e2
Add option -l/--limit to hg incoming and hg outgoing.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5384
diff
changeset
|
22 |
echo "% limit to 2 changesets" |
01594b0c86e2
Add option -l/--limit to hg incoming and hg outgoing.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5384
diff
changeset
|
23 |
hg -R new incoming -l 2 test |
7762
fece056bf240
add --git option to commands supporting --patch (log, incoming, history, tip)
Jim Correia <jim.correia@pobox.com>
parents:
6191
diff
changeset
|
24 |
echo "% limit to 2 changesets, test with -p --git" |
fece056bf240
add --git option to commands supporting --patch (log, incoming, history, tip)
Jim Correia <jim.correia@pobox.com>
parents:
6191
diff
changeset
|
25 |
hg -R new incoming -l 2 -p --git test |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
26 |
|
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
27 |
# test with --bundle |
10154
d4a62b6d4a58
run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
7762
diff
changeset
|
28 |
hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
29 |
hg -R new incoming --bundle test2.hg test |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
30 |
|
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
31 |
# test the resulting bundles |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
32 |
hg init temp |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
33 |
hg init temp2 |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
34 |
hg -R temp unbundle test.hg |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
35 |
hg -R temp2 unbundle test2.hg |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
36 |
hg -R temp tip |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
37 |
hg -R temp2 tip |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
38 |
|
3988
9dcf9d45cab8
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2571
diff
changeset
|
39 |
rm -r temp temp2 new |
2260
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
40 |
|
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
41 |
# test outgoing |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
42 |
hg clone test test-dev |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
43 |
cd test-dev |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
44 |
for i in 9 10 11 12 13; do |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
45 |
echo $i >> foo |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
46 |
hg commit -A -m $i -d "1000000 0" |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
47 |
done |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
48 |
hg verify |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
49 |
cd .. |
99d6cae511f7
add tests for incoming and outgoing
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
50 |
hg -R test-dev outgoing test |
6191
01594b0c86e2
Add option -l/--limit to hg incoming and hg outgoing.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5384
diff
changeset
|
51 |
echo "% limit to 3 changesets" |
01594b0c86e2
Add option -l/--limit to hg incoming and hg outgoing.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5384
diff
changeset
|
52 |
hg -R test-dev outgoing -l 3 test |
10154
d4a62b6d4a58
run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
7762
diff
changeset
|
53 |
hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |
d4a62b6d4a58
run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
7762
diff
changeset
|
54 |
hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' |