Show More
@@ -1,154 +1,157 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cp "$TESTDIR"/printenv.py . |
|
3 | 3 | $ hg clone http://localhost:$HGPORT/ copy |
|
4 | 4 | abort: error: Connection refused |
|
5 | 5 | [255] |
|
6 | 6 | $ test -d copy |
|
7 | 7 | [1] |
|
8 | 8 | |
|
9 | 9 | This server doesn't do range requests so it's basically only good for |
|
10 | 10 | one pull |
|
11 | 11 | |
|
12 | 12 | $ cat > dumb.py <<EOF |
|
13 | 13 | > import BaseHTTPServer, SimpleHTTPServer, os, signal, sys |
|
14 | 14 | > |
|
15 | 15 | > def run(server_class=BaseHTTPServer.HTTPServer, |
|
16 | 16 | > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): |
|
17 | 17 | > server_address = ('localhost', int(os.environ['HGPORT'])) |
|
18 | 18 | > httpd = server_class(server_address, handler_class) |
|
19 | 19 | > httpd.serve_forever() |
|
20 | 20 | > |
|
21 | 21 | > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0)) |
|
22 | 22 | > run() |
|
23 | 23 | > EOF |
|
24 | 24 | $ python dumb.py 2>/dev/null & |
|
25 | 25 | $ echo $! >> $DAEMON_PIDS |
|
26 | 26 | $ mkdir remote |
|
27 | 27 | $ cd remote |
|
28 | 28 | $ hg init |
|
29 | 29 | $ echo foo > bar |
|
30 | $ hg add bar | |
|
30 | $ echo c2 > '.dotfile with spaces' | |
|
31 | $ hg add | |
|
32 | adding .dotfile with spaces | |
|
33 | adding bar | |
|
31 | 34 | $ hg commit -m"test" |
|
32 | 35 | $ hg tip |
|
33 |
changeset: 0: |
|
|
36 | changeset: 0:02770d679fb8 | |
|
34 | 37 | tag: tip |
|
35 | 38 | user: test |
|
36 | 39 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
37 | 40 | summary: test |
|
38 | 41 | |
|
39 | 42 | $ cd .. |
|
40 | 43 | $ hg clone static-http://localhost:$HGPORT/remote local |
|
41 | 44 | requesting all changes |
|
42 | 45 | adding changesets |
|
43 | 46 | adding manifests |
|
44 | 47 | adding file changes |
|
45 |
added 1 changesets with |
|
|
48 | added 1 changesets with 2 changes to 2 files | |
|
46 | 49 | updating to branch default |
|
47 |
|
|
|
50 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
48 | 51 | $ cd local |
|
49 | 52 | $ hg verify |
|
50 | 53 | checking changesets |
|
51 | 54 | checking manifests |
|
52 | 55 | crosschecking files in changesets and manifests |
|
53 | 56 | checking files |
|
54 |
|
|
|
57 | 2 files, 1 changesets, 2 total revisions | |
|
55 | 58 | $ cat bar |
|
56 | 59 | foo |
|
57 | 60 | $ cd ../remote |
|
58 | 61 | $ echo baz > quux |
|
59 | 62 | $ hg commit -A -mtest2 |
|
60 | 63 | adding quux |
|
61 | 64 | |
|
62 | 65 | check for HTTP opener failures when cachefile does not exist |
|
63 | 66 | |
|
64 | 67 | $ rm .hg/*.cache |
|
65 | 68 | $ cd ../local |
|
66 | 69 | $ echo '[hooks]' >> .hg/hgrc |
|
67 | 70 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
68 | 71 | $ hg pull |
|
69 |
changegroup hook: HG_NODE= |
|
|
72 | changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote | |
|
70 | 73 | pulling from static-http://localhost:$HGPORT/remote |
|
71 | 74 | searching for changes |
|
72 | 75 | adding changesets |
|
73 | 76 | adding manifests |
|
74 | 77 | adding file changes |
|
75 | 78 | added 1 changesets with 1 changes to 1 files |
|
76 | 79 | (run 'hg update' to get a working copy) |
|
77 | 80 | |
|
78 | 81 | trying to push |
|
79 | 82 | |
|
80 | 83 | $ hg update |
|
81 | 84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 85 | $ echo more foo >> bar |
|
83 | 86 | $ hg commit -m"test" |
|
84 | 87 | $ hg push |
|
85 | 88 | pushing to static-http://localhost:$HGPORT/remote |
|
86 | 89 | abort: cannot lock static-http repository |
|
87 | 90 | [255] |
|
88 | 91 | |
|
89 | 92 | trying clone -r |
|
90 | 93 | |
|
91 | 94 | $ cd .. |
|
92 | 95 | $ hg clone -r donotexist static-http://localhost:$HGPORT/remote local0 |
|
93 | 96 | abort: unknown revision 'donotexist'! |
|
94 | 97 | [255] |
|
95 | 98 | $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0 |
|
96 | 99 | adding changesets |
|
97 | 100 | adding manifests |
|
98 | 101 | adding file changes |
|
99 |
added 1 changesets with |
|
|
102 | added 1 changesets with 2 changes to 2 files | |
|
100 | 103 | updating to branch default |
|
101 |
|
|
|
104 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
102 | 105 | |
|
103 | 106 | test with "/" URI (issue 747) |
|
104 | 107 | |
|
105 | 108 | $ hg init |
|
106 | 109 | $ echo a > a |
|
107 | 110 | $ hg add a |
|
108 | 111 | $ hg ci -ma |
|
109 | 112 | $ hg clone static-http://localhost:$HGPORT/ local2 |
|
110 | 113 | requesting all changes |
|
111 | 114 | adding changesets |
|
112 | 115 | adding manifests |
|
113 | 116 | adding file changes |
|
114 | 117 | added 1 changesets with 1 changes to 1 files |
|
115 | 118 | updating to branch default |
|
116 | 119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 120 | $ cd local2 |
|
118 | 121 | $ hg verify |
|
119 | 122 | checking changesets |
|
120 | 123 | checking manifests |
|
121 | 124 | crosschecking files in changesets and manifests |
|
122 | 125 | checking files |
|
123 | 126 | 1 files, 1 changesets, 1 total revisions |
|
124 | 127 | $ cat a |
|
125 | 128 | a |
|
126 | 129 | $ hg paths |
|
127 | 130 | default = static-http://localhost:$HGPORT/ |
|
128 | 131 | |
|
129 | 132 | test with empty repo (issue965) |
|
130 | 133 | |
|
131 | 134 | $ cd .. |
|
132 | 135 | $ hg init remotempty |
|
133 | 136 | $ hg clone static-http://localhost:$HGPORT/remotempty local3 |
|
134 | 137 | no changes found |
|
135 | 138 | updating to branch default |
|
136 | 139 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
137 | 140 | $ cd local3 |
|
138 | 141 | $ hg verify |
|
139 | 142 | checking changesets |
|
140 | 143 | checking manifests |
|
141 | 144 | crosschecking files in changesets and manifests |
|
142 | 145 | checking files |
|
143 | 146 | 0 files, 0 changesets, 0 total revisions |
|
144 | 147 | $ hg paths |
|
145 | 148 | default = static-http://localhost:$HGPORT/remotempty |
|
146 | 149 | |
|
147 | 150 | test with non-repo |
|
148 | 151 | |
|
149 | 152 | $ cd .. |
|
150 | 153 | $ mkdir notarepo |
|
151 | 154 | $ hg clone static-http://localhost:$HGPORT/notarepo local3 |
|
152 | 155 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
|
153 | 156 | [255] |
|
154 | 157 | $ kill $! |
General Comments 0
You need to be logged in to leave comments.
Login now