comparison tests/test-http.t @ 12446:df57227a72bf

tests: unify test-http
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:41:32 -0500
parents tests/test-http@1a8df80dfdde
children d08bb64888bc
comparison
equal deleted inserted replaced
12445:981ce49a243f 12446:df57227a72bf
1
2 $ cp "$TESTDIR"/printenv.py .
3 $ hg init test
4 $ cd test
5 $ echo foo>foo
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
7 $ echo foo>foo.d/foo
8 $ echo bar>foo.d/bAr.hg.d/BaR
9 $ echo bar>foo.d/baR.d.hg/bAR
10 $ hg commit -A -m 1
11 adding foo
12 adding foo.d/bAr.hg.d/BaR
13 adding foo.d/baR.d.hg/bAR
14 adding foo.d/foo
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid
16 $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
17
18 Test server address cannot be reused
19
20 $ hg serve -p $HGPORT1 2>&1
21 abort: cannot start server at ':*': Address already in use (glob)
22 [255]
23 $ cd ..
24 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
25
26 clone via stream
27
28 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
29 streaming all changes
30 6 files to transfer, 606 bytes of data
31 transferred * bytes in * seconds (*B/sec) (glob)
32 updating to branch default
33 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 $ hg verify -R copy
35 checking changesets
36 checking manifests
37 crosschecking files in changesets and manifests
38 checking files
39 4 files, 1 changesets, 4 total revisions
40
41 try to clone via stream, should use pull instead
42
43 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
44 requesting all changes
45 adding changesets
46 adding manifests
47 adding file changes
48 added 1 changesets with 4 changes to 4 files
49 updating to branch default
50 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
51
52 clone via pull
53
54 $ hg clone http://localhost:$HGPORT1/ copy-pull
55 requesting all changes
56 adding changesets
57 adding manifests
58 adding file changes
59 added 1 changesets with 4 changes to 4 files
60 updating to branch default
61 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ hg verify -R copy-pull
63 checking changesets
64 checking manifests
65 crosschecking files in changesets and manifests
66 checking files
67 4 files, 1 changesets, 4 total revisions
68 $ cd test
69 $ echo bar > bar
70 $ hg commit -A -d '1 0' -m 2
71 adding bar
72 $ cd ..
73
74 pull
75
76 $ cd copy-pull
77 $ echo '[hooks]' >> .hg/hgrc
78 $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
79 $ hg pull
80 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:*/* (glob)
81 pulling from http://localhost:*/ (glob)
82 searching for changes
83 adding changesets
84 adding manifests
85 adding file changes
86 added 1 changesets with 1 changes to 1 files
87 (run 'hg update' to get a working copy)
88 $ cd ..