##// END OF EJS Templates
test-http: use printenv.py
Alexis S. L. Carvalho -
r4289:e1759888 default
parent child Browse files
Show More
@@ -1,36 +1,38
1 1 #!/bin/sh
2 2
3 cp "$TESTDIR"/printenv.py .
4
3 5 hg init test
4 6 cd test
5 7 echo foo>foo
6 8 hg commit -A -d '0 0' -m 1
7 9 hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
8 10 hg serve -p 20060 -d --pid-file=../hg2.pid
9 11 # Test server address cannot be reused
10 12 hg serve -p 20060 2>&1 | sed -e 's/abort: cannot start server:.*/abort: cannot start server:/'
11 13 cd ..
12 14 cat hg1.pid hg2.pid >> $DAEMON_PIDS
13 15
14 16 echo % clone via stream
15 17 http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \
16 18 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
17 19 hg verify -R copy
18 20
19 21 echo % try to clone via stream, should use pull instead
20 22 http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
21 23
22 24 echo % clone via pull
23 25 http_proxy= hg clone http://localhost:20059/ copy-pull
24 26 hg verify -R copy-pull
25 27
26 28 cd test
27 29 echo bar > bar
28 30 hg commit -A -d '1 0' -m 2
29 31 cd ..
30 32
31 33 echo % pull
32 34 cd copy-pull
33 35 echo '[hooks]' >> .hg/hgrc
34 echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
36 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
35 37 hg pull
36 38 cd ..
@@ -1,41 +1,41
1 1 adding foo
2 2 abort: cannot start server:
3 3 % clone via stream
4 4 streaming all changes
5 5 XXX files to transfer, XXX bytes of data
6 6 transferred XXX bytes in XXX seconds (XXX XB/sec)
7 7 XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
8 8 checking changesets
9 9 checking manifests
10 10 crosschecking files in changesets and manifests
11 11 checking files
12 12 1 files, 1 changesets, 1 total revisions
13 13 % try to clone via stream, should use pull instead
14 14 requesting all changes
15 15 adding changesets
16 16 adding manifests
17 17 adding file changes
18 18 added 1 changesets with 1 changes to 1 files
19 19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 20 % clone via pull
21 21 requesting all changes
22 22 adding changesets
23 23 adding manifests
24 24 adding file changes
25 25 added 1 changesets with 1 changes to 1 files
26 26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 27 checking changesets
28 28 checking manifests
29 29 crosschecking files in changesets and manifests
30 30 checking files
31 31 1 files, 1 changesets, 1 total revisions
32 32 adding bar
33 33 % pull
34 changegroup: u=http://localhost:20059/
34 changegroup hook: HG_NODE=cfbd11a1fa315300a080c3de8fe36b0fc5820acf HG_SOURCE=pull HG_URL=http://localhost:20059/
35 35 pulling from http://localhost:20059/
36 36 searching for changes
37 37 adding changesets
38 38 adding manifests
39 39 adding file changes
40 40 added 1 changesets with 1 changes to 1 files
41 41 (run 'hg update' to get a working copy)
General Comments 0
You need to be logged in to leave comments. Login now