comparison tests/test-http-clone-r @ 3449:c8686e3f0291

Testing the new changegroupsubset remote function in the ssh and http protocols.
author Eric Hopper <hopper@omnifarious.org>
date Wed, 18 Oct 2006 02:14:26 -0500
parents
children c0b449154a90
comparison
equal deleted inserted replaced
3448:6ca49c5fe268 3449:c8686e3f0291
1 #!/bin/sh
2
3 hg init remote
4 cd remote
5 echo "# creating 'remote'"
6 cat >>afile <<EOF
7 0
8 EOF
9 hg add afile
10 hg commit -m "0.0"
11 cat >>afile <<EOF
12 1
13 EOF
14 hg commit -m "0.1"
15 cat >>afile <<EOF
16 2
17 EOF
18 hg commit -m "0.2"
19 cat >>afile <<EOF
20 3
21 EOF
22 hg commit -m "0.3"
23 hg update -C 0
24 cat >>afile <<EOF
25 1
26 EOF
27 hg commit -m "1.1"
28 cat >>afile <<EOF
29 2
30 EOF
31 hg commit -m "1.2"
32 cat >fred <<EOF
33 a line
34 EOF
35 cat >>afile <<EOF
36 3
37 EOF
38 hg add fred
39 hg commit -m "1.3"
40 hg mv afile adifferentfile
41 hg commit -m "1.3m"
42 hg update -C 3
43 hg mv afile anotherfile
44 hg commit -m "0.3m"
45 hg debugindex .hg/data/afile.i
46 hg debugindex .hg/data/adifferentfile.i
47 hg debugindex .hg/data/anotherfile.i
48 hg debugindex .hg/data/fred.i
49 hg debugindex .hg/00manifest.i
50 hg verify
51 echo "# Starting server"
52 hg serve -p 20061 -d --pid-file=../hg1.pid
53 cd ..
54 cat hg1.pid >> $DAEMON_PIDS
55
56 echo "# clone remote via stream"
57 for i in 0 1 2 3 4 5 6 7 8; do
58 hg clone -r "$i" http://localhost:20061/ test-"$i" 2>&1
59 if cd test-"$i"; then
60 hg verify
61 cd ..
62 fi
63 done
64 cd test-8
65 hg pull ../test-7
66 hg verify
67 cd ..
68 cd test-1
69 hg pull -r 4 http://localhost:20061/ 2>&1
70 hg verify
71 hg pull http://localhost:20061/ 2>&1
72 cd ..
73 cd test-2
74 hg pull -r 5 http://localhost:20061/ 2>&1
75 hg verify
76 hg pull http://localhost:20061/ 2>&1
77 hg verify
78 cd ..