Show More
@@ -1,50 +1,52 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | cp "$TESTDIR"/printenv.py . | |
|
4 | ||
|
3 | 5 | http_proxy= hg clone static-http://localhost:20059/ copy |
|
4 | 6 | echo $? |
|
5 | 7 | test -d copy || echo copy: No such file or directory |
|
6 | 8 | |
|
7 | 9 | # This server doesn't do range requests so it's basically only good for |
|
8 | 10 | # one pull |
|
9 | 11 | cat > dumb.py <<EOF |
|
10 | 12 | import BaseHTTPServer, SimpleHTTPServer, signal |
|
11 | 13 | |
|
12 | 14 | def run(server_class=BaseHTTPServer.HTTPServer, |
|
13 | 15 | handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): |
|
14 | 16 | server_address = ('localhost', 20059) |
|
15 | 17 | httpd = server_class(server_address, handler_class) |
|
16 | 18 | httpd.serve_forever() |
|
17 | 19 | |
|
18 | 20 | signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) |
|
19 | 21 | run() |
|
20 | 22 | EOF |
|
21 | 23 | |
|
22 | 24 | python dumb.py 2>/dev/null & |
|
23 | 25 | echo $! >> $DAEMON_PIDS |
|
24 | 26 | |
|
25 | 27 | mkdir remote |
|
26 | 28 | cd remote |
|
27 | 29 | hg init |
|
28 | 30 | echo foo > bar |
|
29 | 31 | hg add bar |
|
30 | 32 | hg commit -m"test" -d "1000000 0" |
|
31 | 33 | hg tip |
|
32 | 34 | |
|
33 | 35 | cd .. |
|
34 | 36 | |
|
35 | 37 | http_proxy= hg clone static-http://localhost:20059/remote local |
|
36 | 38 | |
|
37 | 39 | cd local |
|
38 | 40 | hg verify |
|
39 | 41 | cat bar |
|
40 | 42 | |
|
41 | 43 | cd ../remote |
|
42 | 44 | echo baz > quux |
|
43 | 45 | hg commit -A -mtest2 -d '100000000 0' |
|
44 | 46 | |
|
45 | 47 | cd ../local |
|
46 | 48 | echo '[hooks]' >> .hg/hgrc |
|
47 |
echo 'changegroup = |
|
|
49 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
|
48 | 50 | http_proxy= hg pull |
|
49 | 51 | |
|
50 | 52 | kill $! |
@@ -1,30 +1,30 | |||
|
1 | 1 | abort: Connection refused |
|
2 | 2 | 255 |
|
3 | 3 | copy: No such file or directory |
|
4 | 4 | changeset: 0:53e17d176ae6 |
|
5 | 5 | tag: tip |
|
6 | 6 | user: test |
|
7 | 7 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
8 | 8 | summary: test |
|
9 | 9 | |
|
10 | 10 | requesting all changes |
|
11 | 11 | adding changesets |
|
12 | 12 | adding manifests |
|
13 | 13 | adding file changes |
|
14 | 14 | added 1 changesets with 1 changes to 1 files |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | checking changesets |
|
17 | 17 | checking manifests |
|
18 | 18 | crosschecking files in changesets and manifests |
|
19 | 19 | checking files |
|
20 | 20 | 1 files, 1 changesets, 1 total revisions |
|
21 | 21 | foo |
|
22 | 22 | adding quux |
|
23 | changegroup: u=static-http://localhost:20059/remote | |
|
23 | changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=static-http://localhost:20059/remote | |
|
24 | 24 | pulling from static-http://localhost:20059/remote |
|
25 | 25 | searching for changes |
|
26 | 26 | adding changesets |
|
27 | 27 | adding manifests |
|
28 | 28 | adding file changes |
|
29 | 29 | added 1 changesets with 1 changes to 1 files |
|
30 | 30 | (run 'hg update' to get a working copy) |
General Comments 0
You need to be logged in to leave comments.
Login now