Show More
@@ -1,659 +1,659 b'' | |||||
1 | Setting up test |
|
1 | Setting up test | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo 0 > afile |
|
5 | $ echo 0 > afile | |
6 | $ hg add afile |
|
6 | $ hg add afile | |
7 | $ hg commit -m "0.0" |
|
7 | $ hg commit -m "0.0" | |
8 | $ echo 1 >> afile |
|
8 | $ echo 1 >> afile | |
9 | $ hg commit -m "0.1" |
|
9 | $ hg commit -m "0.1" | |
10 | $ echo 2 >> afile |
|
10 | $ echo 2 >> afile | |
11 | $ hg commit -m "0.2" |
|
11 | $ hg commit -m "0.2" | |
12 | $ echo 3 >> afile |
|
12 | $ echo 3 >> afile | |
13 | $ hg commit -m "0.3" |
|
13 | $ hg commit -m "0.3" | |
14 | $ hg update -C 0 |
|
14 | $ hg update -C 0 | |
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
16 | $ echo 1 >> afile |
|
16 | $ echo 1 >> afile | |
17 | $ hg commit -m "1.1" |
|
17 | $ hg commit -m "1.1" | |
18 | created new head |
|
18 | created new head | |
19 | $ echo 2 >> afile |
|
19 | $ echo 2 >> afile | |
20 | $ hg commit -m "1.2" |
|
20 | $ hg commit -m "1.2" | |
21 | $ echo "a line" > fred |
|
21 | $ echo "a line" > fred | |
22 | $ echo 3 >> afile |
|
22 | $ echo 3 >> afile | |
23 | $ hg add fred |
|
23 | $ hg add fred | |
24 | $ hg commit -m "1.3" |
|
24 | $ hg commit -m "1.3" | |
25 | $ hg mv afile adifferentfile |
|
25 | $ hg mv afile adifferentfile | |
26 | $ hg commit -m "1.3m" |
|
26 | $ hg commit -m "1.3m" | |
27 | $ hg update -C 3 |
|
27 | $ hg update -C 3 | |
28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
29 | $ hg mv afile anotherfile |
|
29 | $ hg mv afile anotherfile | |
30 | $ hg commit -m "0.3m" |
|
30 | $ hg commit -m "0.3m" | |
31 | $ hg verify |
|
31 | $ hg verify | |
32 | checking changesets |
|
32 | checking changesets | |
33 | checking manifests |
|
33 | checking manifests | |
34 | crosschecking files in changesets and manifests |
|
34 | crosschecking files in changesets and manifests | |
35 | checking files |
|
35 | checking files | |
36 | 4 files, 9 changesets, 7 total revisions |
|
36 | 4 files, 9 changesets, 7 total revisions | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 | $ hg init empty |
|
38 | $ hg init empty | |
39 |
|
39 | |||
40 | Bundle and phase |
|
40 | Bundle and phase | |
41 |
|
41 | |||
42 | $ hg -R test phase --force --secret 0 |
|
42 | $ hg -R test phase --force --secret 0 | |
43 | $ hg -R test bundle phase.hg empty |
|
43 | $ hg -R test bundle phase.hg empty | |
44 | searching for changes |
|
44 | searching for changes | |
45 | no changes found (ignored 9 secret changesets) |
|
45 | no changes found (ignored 9 secret changesets) | |
46 | [1] |
|
46 | [1] | |
47 | $ hg -R test phase --draft -r 'head()' |
|
47 | $ hg -R test phase --draft -r 'head()' | |
48 |
|
48 | |||
49 | Bundle --all |
|
49 | Bundle --all | |
50 |
|
50 | |||
51 | $ hg -R test bundle --all all.hg |
|
51 | $ hg -R test bundle --all all.hg | |
52 | 9 changesets found |
|
52 | 9 changesets found | |
53 |
|
53 | |||
54 | Bundle test to full.hg |
|
54 | Bundle test to full.hg | |
55 |
|
55 | |||
56 | $ hg -R test bundle full.hg empty |
|
56 | $ hg -R test bundle full.hg empty | |
57 | searching for changes |
|
57 | searching for changes | |
58 | 9 changesets found |
|
58 | 9 changesets found | |
59 |
|
59 | |||
60 | Unbundle full.hg in test |
|
60 | Unbundle full.hg in test | |
61 |
|
61 | |||
62 | $ hg -R test unbundle full.hg |
|
62 | $ hg -R test unbundle full.hg | |
63 | adding changesets |
|
63 | adding changesets | |
64 | adding manifests |
|
64 | adding manifests | |
65 | adding file changes |
|
65 | adding file changes | |
66 | added 0 changesets with 0 changes to 4 files |
|
66 | added 0 changesets with 0 changes to 4 files | |
67 | (run 'hg update' to get a working copy) |
|
67 | (run 'hg update' to get a working copy) | |
68 |
|
68 | |||
69 | Verify empty |
|
69 | Verify empty | |
70 |
|
70 | |||
71 | $ hg -R empty heads |
|
71 | $ hg -R empty heads | |
72 | [1] |
|
72 | [1] | |
73 | $ hg -R empty verify |
|
73 | $ hg -R empty verify | |
74 | checking changesets |
|
74 | checking changesets | |
75 | checking manifests |
|
75 | checking manifests | |
76 | crosschecking files in changesets and manifests |
|
76 | crosschecking files in changesets and manifests | |
77 | checking files |
|
77 | checking files | |
78 | 0 files, 0 changesets, 0 total revisions |
|
78 | 0 files, 0 changesets, 0 total revisions | |
79 |
|
79 | |||
80 | Pull full.hg into test (using --cwd) |
|
80 | Pull full.hg into test (using --cwd) | |
81 |
|
81 | |||
82 | $ hg --cwd test pull ../full.hg |
|
82 | $ hg --cwd test pull ../full.hg | |
83 | pulling from ../full.hg |
|
83 | pulling from ../full.hg | |
84 | searching for changes |
|
84 | searching for changes | |
85 | no changes found |
|
85 | no changes found | |
86 |
|
86 | |||
87 | Verify that there are no leaked temporary files after pull (issue2797) |
|
87 | Verify that there are no leaked temporary files after pull (issue2797) | |
88 |
|
88 | |||
89 | $ ls test/.hg | grep .hg10un |
|
89 | $ ls test/.hg | grep .hg10un | |
90 | [1] |
|
90 | [1] | |
91 |
|
91 | |||
92 | Pull full.hg into empty (using --cwd) |
|
92 | Pull full.hg into empty (using --cwd) | |
93 |
|
93 | |||
94 | $ hg --cwd empty pull ../full.hg |
|
94 | $ hg --cwd empty pull ../full.hg | |
95 | pulling from ../full.hg |
|
95 | pulling from ../full.hg | |
96 | requesting all changes |
|
96 | requesting all changes | |
97 | adding changesets |
|
97 | adding changesets | |
98 | adding manifests |
|
98 | adding manifests | |
99 | adding file changes |
|
99 | adding file changes | |
100 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
100 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
101 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
101 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
102 |
|
102 | |||
103 | Rollback empty |
|
103 | Rollback empty | |
104 |
|
104 | |||
105 | $ hg -R empty rollback |
|
105 | $ hg -R empty rollback | |
106 | repository tip rolled back to revision -1 (undo pull) |
|
106 | repository tip rolled back to revision -1 (undo pull) | |
107 |
|
107 | |||
108 | Pull full.hg into empty again (using --cwd) |
|
108 | Pull full.hg into empty again (using --cwd) | |
109 |
|
109 | |||
110 | $ hg --cwd empty pull ../full.hg |
|
110 | $ hg --cwd empty pull ../full.hg | |
111 | pulling from ../full.hg |
|
111 | pulling from ../full.hg | |
112 | requesting all changes |
|
112 | requesting all changes | |
113 | adding changesets |
|
113 | adding changesets | |
114 | adding manifests |
|
114 | adding manifests | |
115 | adding file changes |
|
115 | adding file changes | |
116 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
116 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
117 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
117 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
118 |
|
118 | |||
119 | Pull full.hg into test (using -R) |
|
119 | Pull full.hg into test (using -R) | |
120 |
|
120 | |||
121 | $ hg -R test pull full.hg |
|
121 | $ hg -R test pull full.hg | |
122 | pulling from full.hg |
|
122 | pulling from full.hg | |
123 | searching for changes |
|
123 | searching for changes | |
124 | no changes found |
|
124 | no changes found | |
125 |
|
125 | |||
126 | Pull full.hg into empty (using -R) |
|
126 | Pull full.hg into empty (using -R) | |
127 |
|
127 | |||
128 | $ hg -R empty pull full.hg |
|
128 | $ hg -R empty pull full.hg | |
129 | pulling from full.hg |
|
129 | pulling from full.hg | |
130 | searching for changes |
|
130 | searching for changes | |
131 | no changes found |
|
131 | no changes found | |
132 |
|
132 | |||
133 | Rollback empty |
|
133 | Rollback empty | |
134 |
|
134 | |||
135 | $ hg -R empty rollback |
|
135 | $ hg -R empty rollback | |
136 | repository tip rolled back to revision -1 (undo pull) |
|
136 | repository tip rolled back to revision -1 (undo pull) | |
137 |
|
137 | |||
138 | Pull full.hg into empty again (using -R) |
|
138 | Pull full.hg into empty again (using -R) | |
139 |
|
139 | |||
140 | $ hg -R empty pull full.hg |
|
140 | $ hg -R empty pull full.hg | |
141 | pulling from full.hg |
|
141 | pulling from full.hg | |
142 | requesting all changes |
|
142 | requesting all changes | |
143 | adding changesets |
|
143 | adding changesets | |
144 | adding manifests |
|
144 | adding manifests | |
145 | adding file changes |
|
145 | adding file changes | |
146 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
146 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
147 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
147 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
148 |
|
148 | |||
149 | Log -R full.hg in fresh empty |
|
149 | Log -R full.hg in fresh empty | |
150 |
|
150 | |||
151 | $ rm -r empty |
|
151 | $ rm -r empty | |
152 | $ hg init empty |
|
152 | $ hg init empty | |
153 | $ cd empty |
|
153 | $ cd empty | |
154 | $ hg -R bundle://../full.hg log |
|
154 | $ hg -R bundle://../full.hg log | |
155 | changeset: 8:aa35859c02ea |
|
155 | changeset: 8:aa35859c02ea | |
156 | tag: tip |
|
156 | tag: tip | |
157 | parent: 3:eebf5a27f8ca |
|
157 | parent: 3:eebf5a27f8ca | |
158 | user: test |
|
158 | user: test | |
159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: 0.3m |
|
160 | summary: 0.3m | |
161 |
|
161 | |||
162 | changeset: 7:a6a34bfa0076 |
|
162 | changeset: 7:a6a34bfa0076 | |
163 | user: test |
|
163 | user: test | |
164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | summary: 1.3m |
|
165 | summary: 1.3m | |
166 |
|
166 | |||
167 | changeset: 6:7373c1169842 |
|
167 | changeset: 6:7373c1169842 | |
168 | user: test |
|
168 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: 1.3 |
|
170 | summary: 1.3 | |
171 |
|
171 | |||
172 | changeset: 5:1bb50a9436a7 |
|
172 | changeset: 5:1bb50a9436a7 | |
173 | user: test |
|
173 | user: test | |
174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
175 | summary: 1.2 |
|
175 | summary: 1.2 | |
176 |
|
176 | |||
177 | changeset: 4:095197eb4973 |
|
177 | changeset: 4:095197eb4973 | |
178 | parent: 0:f9ee2f85a263 |
|
178 | parent: 0:f9ee2f85a263 | |
179 | user: test |
|
179 | user: test | |
180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
180 | date: Thu Jan 01 00:00:00 1970 +0000 | |
181 | summary: 1.1 |
|
181 | summary: 1.1 | |
182 |
|
182 | |||
183 | changeset: 3:eebf5a27f8ca |
|
183 | changeset: 3:eebf5a27f8ca | |
184 | user: test |
|
184 | user: test | |
185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:00 1970 +0000 | |
186 | summary: 0.3 |
|
186 | summary: 0.3 | |
187 |
|
187 | |||
188 | changeset: 2:e38ba6f5b7e0 |
|
188 | changeset: 2:e38ba6f5b7e0 | |
189 | user: test |
|
189 | user: test | |
190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
190 | date: Thu Jan 01 00:00:00 1970 +0000 | |
191 | summary: 0.2 |
|
191 | summary: 0.2 | |
192 |
|
192 | |||
193 | changeset: 1:34c2bf6b0626 |
|
193 | changeset: 1:34c2bf6b0626 | |
194 | user: test |
|
194 | user: test | |
195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
195 | date: Thu Jan 01 00:00:00 1970 +0000 | |
196 | summary: 0.1 |
|
196 | summary: 0.1 | |
197 |
|
197 | |||
198 | changeset: 0:f9ee2f85a263 |
|
198 | changeset: 0:f9ee2f85a263 | |
199 | user: test |
|
199 | user: test | |
200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
200 | date: Thu Jan 01 00:00:00 1970 +0000 | |
201 | summary: 0.0 |
|
201 | summary: 0.0 | |
202 |
|
202 | |||
203 | Make sure bundlerepo doesn't leak tempfiles (issue2491) |
|
203 | Make sure bundlerepo doesn't leak tempfiles (issue2491) | |
204 |
|
204 | |||
205 | $ ls .hg |
|
205 | $ ls .hg | |
206 | 00changelog.i |
|
206 | 00changelog.i | |
207 | cache |
|
207 | cache | |
208 | requires |
|
208 | requires | |
209 | store |
|
209 | store | |
210 |
|
210 | |||
211 | Pull ../full.hg into empty (with hook) |
|
211 | Pull ../full.hg into empty (with hook) | |
212 |
|
212 | |||
213 | $ echo "[hooks]" >> .hg/hgrc |
|
213 | $ echo "[hooks]" >> .hg/hgrc | |
214 |
$ echo "changegroup = p |
|
214 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc | |
215 |
|
215 | |||
216 | doesn't work (yet ?) |
|
216 | doesn't work (yet ?) | |
217 |
|
217 | |||
218 | hg -R bundle://../full.hg verify |
|
218 | hg -R bundle://../full.hg verify | |
219 |
|
219 | |||
220 | $ hg pull bundle://../full.hg |
|
220 | $ hg pull bundle://../full.hg | |
221 | pulling from bundle:../full.hg |
|
221 | pulling from bundle:../full.hg | |
222 | requesting all changes |
|
222 | requesting all changes | |
223 | adding changesets |
|
223 | adding changesets | |
224 | adding manifests |
|
224 | adding manifests | |
225 | adding file changes |
|
225 | adding file changes | |
226 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
226 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
227 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob) |
|
227 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:../full.hg (glob) | |
228 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
228 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
229 |
|
229 | |||
230 | Rollback empty |
|
230 | Rollback empty | |
231 |
|
231 | |||
232 | $ hg rollback |
|
232 | $ hg rollback | |
233 | repository tip rolled back to revision -1 (undo pull) |
|
233 | repository tip rolled back to revision -1 (undo pull) | |
234 | $ cd .. |
|
234 | $ cd .. | |
235 |
|
235 | |||
236 | Log -R bundle:empty+full.hg |
|
236 | Log -R bundle:empty+full.hg | |
237 |
|
237 | |||
238 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
238 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" | |
239 | 8 7 6 5 4 3 2 1 0 |
|
239 | 8 7 6 5 4 3 2 1 0 | |
240 |
|
240 | |||
241 | Pull full.hg into empty again (using -R; with hook) |
|
241 | Pull full.hg into empty again (using -R; with hook) | |
242 |
|
242 | |||
243 | $ hg -R empty pull full.hg |
|
243 | $ hg -R empty pull full.hg | |
244 | pulling from full.hg |
|
244 | pulling from full.hg | |
245 | requesting all changes |
|
245 | requesting all changes | |
246 | adding changesets |
|
246 | adding changesets | |
247 | adding manifests |
|
247 | adding manifests | |
248 | adding file changes |
|
248 | adding file changes | |
249 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
249 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
250 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob) |
|
250 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=bundle:empty+full.hg (glob) | |
251 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
251 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
252 |
|
252 | |||
253 | Create partial clones |
|
253 | Create partial clones | |
254 |
|
254 | |||
255 | $ rm -r empty |
|
255 | $ rm -r empty | |
256 | $ hg init empty |
|
256 | $ hg init empty | |
257 | $ hg clone -r 3 test partial |
|
257 | $ hg clone -r 3 test partial | |
258 | adding changesets |
|
258 | adding changesets | |
259 | adding manifests |
|
259 | adding manifests | |
260 | adding file changes |
|
260 | adding file changes | |
261 | added 4 changesets with 4 changes to 1 files |
|
261 | added 4 changesets with 4 changes to 1 files | |
262 | updating to branch default |
|
262 | updating to branch default | |
263 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
263 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
264 | $ hg clone partial partial2 |
|
264 | $ hg clone partial partial2 | |
265 | updating to branch default |
|
265 | updating to branch default | |
266 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
266 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
267 | $ cd partial |
|
267 | $ cd partial | |
268 |
|
268 | |||
269 | Log -R full.hg in partial |
|
269 | Log -R full.hg in partial | |
270 |
|
270 | |||
271 | $ hg -R bundle://../full.hg log -T phases |
|
271 | $ hg -R bundle://../full.hg log -T phases | |
272 | changeset: 8:aa35859c02ea |
|
272 | changeset: 8:aa35859c02ea | |
273 | tag: tip |
|
273 | tag: tip | |
274 | phase: draft |
|
274 | phase: draft | |
275 | parent: 3:eebf5a27f8ca |
|
275 | parent: 3:eebf5a27f8ca | |
276 | user: test |
|
276 | user: test | |
277 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | date: Thu Jan 01 00:00:00 1970 +0000 | |
278 | summary: 0.3m |
|
278 | summary: 0.3m | |
279 |
|
279 | |||
280 | changeset: 7:a6a34bfa0076 |
|
280 | changeset: 7:a6a34bfa0076 | |
281 | phase: draft |
|
281 | phase: draft | |
282 | user: test |
|
282 | user: test | |
283 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
283 | date: Thu Jan 01 00:00:00 1970 +0000 | |
284 | summary: 1.3m |
|
284 | summary: 1.3m | |
285 |
|
285 | |||
286 | changeset: 6:7373c1169842 |
|
286 | changeset: 6:7373c1169842 | |
287 | phase: draft |
|
287 | phase: draft | |
288 | user: test |
|
288 | user: test | |
289 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
289 | date: Thu Jan 01 00:00:00 1970 +0000 | |
290 | summary: 1.3 |
|
290 | summary: 1.3 | |
291 |
|
291 | |||
292 | changeset: 5:1bb50a9436a7 |
|
292 | changeset: 5:1bb50a9436a7 | |
293 | phase: draft |
|
293 | phase: draft | |
294 | user: test |
|
294 | user: test | |
295 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
295 | date: Thu Jan 01 00:00:00 1970 +0000 | |
296 | summary: 1.2 |
|
296 | summary: 1.2 | |
297 |
|
297 | |||
298 | changeset: 4:095197eb4973 |
|
298 | changeset: 4:095197eb4973 | |
299 | phase: draft |
|
299 | phase: draft | |
300 | parent: 0:f9ee2f85a263 |
|
300 | parent: 0:f9ee2f85a263 | |
301 | user: test |
|
301 | user: test | |
302 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:00 1970 +0000 | |
303 | summary: 1.1 |
|
303 | summary: 1.1 | |
304 |
|
304 | |||
305 | changeset: 3:eebf5a27f8ca |
|
305 | changeset: 3:eebf5a27f8ca | |
306 | phase: public |
|
306 | phase: public | |
307 | user: test |
|
307 | user: test | |
308 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | date: Thu Jan 01 00:00:00 1970 +0000 | |
309 | summary: 0.3 |
|
309 | summary: 0.3 | |
310 |
|
310 | |||
311 | changeset: 2:e38ba6f5b7e0 |
|
311 | changeset: 2:e38ba6f5b7e0 | |
312 | phase: public |
|
312 | phase: public | |
313 | user: test |
|
313 | user: test | |
314 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
314 | date: Thu Jan 01 00:00:00 1970 +0000 | |
315 | summary: 0.2 |
|
315 | summary: 0.2 | |
316 |
|
316 | |||
317 | changeset: 1:34c2bf6b0626 |
|
317 | changeset: 1:34c2bf6b0626 | |
318 | phase: public |
|
318 | phase: public | |
319 | user: test |
|
319 | user: test | |
320 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
320 | date: Thu Jan 01 00:00:00 1970 +0000 | |
321 | summary: 0.1 |
|
321 | summary: 0.1 | |
322 |
|
322 | |||
323 | changeset: 0:f9ee2f85a263 |
|
323 | changeset: 0:f9ee2f85a263 | |
324 | phase: public |
|
324 | phase: public | |
325 | user: test |
|
325 | user: test | |
326 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
326 | date: Thu Jan 01 00:00:00 1970 +0000 | |
327 | summary: 0.0 |
|
327 | summary: 0.0 | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | Incoming full.hg in partial |
|
330 | Incoming full.hg in partial | |
331 |
|
331 | |||
332 | $ hg incoming bundle://../full.hg |
|
332 | $ hg incoming bundle://../full.hg | |
333 | comparing with bundle:../full.hg |
|
333 | comparing with bundle:../full.hg | |
334 | searching for changes |
|
334 | searching for changes | |
335 | changeset: 4:095197eb4973 |
|
335 | changeset: 4:095197eb4973 | |
336 | parent: 0:f9ee2f85a263 |
|
336 | parent: 0:f9ee2f85a263 | |
337 | user: test |
|
337 | user: test | |
338 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
338 | date: Thu Jan 01 00:00:00 1970 +0000 | |
339 | summary: 1.1 |
|
339 | summary: 1.1 | |
340 |
|
340 | |||
341 | changeset: 5:1bb50a9436a7 |
|
341 | changeset: 5:1bb50a9436a7 | |
342 | user: test |
|
342 | user: test | |
343 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
343 | date: Thu Jan 01 00:00:00 1970 +0000 | |
344 | summary: 1.2 |
|
344 | summary: 1.2 | |
345 |
|
345 | |||
346 | changeset: 6:7373c1169842 |
|
346 | changeset: 6:7373c1169842 | |
347 | user: test |
|
347 | user: test | |
348 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
348 | date: Thu Jan 01 00:00:00 1970 +0000 | |
349 | summary: 1.3 |
|
349 | summary: 1.3 | |
350 |
|
350 | |||
351 | changeset: 7:a6a34bfa0076 |
|
351 | changeset: 7:a6a34bfa0076 | |
352 | user: test |
|
352 | user: test | |
353 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
353 | date: Thu Jan 01 00:00:00 1970 +0000 | |
354 | summary: 1.3m |
|
354 | summary: 1.3m | |
355 |
|
355 | |||
356 | changeset: 8:aa35859c02ea |
|
356 | changeset: 8:aa35859c02ea | |
357 | tag: tip |
|
357 | tag: tip | |
358 | parent: 3:eebf5a27f8ca |
|
358 | parent: 3:eebf5a27f8ca | |
359 | user: test |
|
359 | user: test | |
360 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
360 | date: Thu Jan 01 00:00:00 1970 +0000 | |
361 | summary: 0.3m |
|
361 | summary: 0.3m | |
362 |
|
362 | |||
363 |
|
363 | |||
364 | Outgoing -R full.hg vs partial2 in partial |
|
364 | Outgoing -R full.hg vs partial2 in partial | |
365 |
|
365 | |||
366 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
366 | $ hg -R bundle://../full.hg outgoing ../partial2 | |
367 | comparing with ../partial2 |
|
367 | comparing with ../partial2 | |
368 | searching for changes |
|
368 | searching for changes | |
369 | changeset: 4:095197eb4973 |
|
369 | changeset: 4:095197eb4973 | |
370 | parent: 0:f9ee2f85a263 |
|
370 | parent: 0:f9ee2f85a263 | |
371 | user: test |
|
371 | user: test | |
372 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
372 | date: Thu Jan 01 00:00:00 1970 +0000 | |
373 | summary: 1.1 |
|
373 | summary: 1.1 | |
374 |
|
374 | |||
375 | changeset: 5:1bb50a9436a7 |
|
375 | changeset: 5:1bb50a9436a7 | |
376 | user: test |
|
376 | user: test | |
377 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
378 | summary: 1.2 |
|
378 | summary: 1.2 | |
379 |
|
379 | |||
380 | changeset: 6:7373c1169842 |
|
380 | changeset: 6:7373c1169842 | |
381 | user: test |
|
381 | user: test | |
382 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
382 | date: Thu Jan 01 00:00:00 1970 +0000 | |
383 | summary: 1.3 |
|
383 | summary: 1.3 | |
384 |
|
384 | |||
385 | changeset: 7:a6a34bfa0076 |
|
385 | changeset: 7:a6a34bfa0076 | |
386 | user: test |
|
386 | user: test | |
387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
388 | summary: 1.3m |
|
388 | summary: 1.3m | |
389 |
|
389 | |||
390 | changeset: 8:aa35859c02ea |
|
390 | changeset: 8:aa35859c02ea | |
391 | tag: tip |
|
391 | tag: tip | |
392 | parent: 3:eebf5a27f8ca |
|
392 | parent: 3:eebf5a27f8ca | |
393 | user: test |
|
393 | user: test | |
394 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
394 | date: Thu Jan 01 00:00:00 1970 +0000 | |
395 | summary: 0.3m |
|
395 | summary: 0.3m | |
396 |
|
396 | |||
397 |
|
397 | |||
398 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
398 | Outgoing -R does-not-exist.hg vs partial2 in partial | |
399 |
|
399 | |||
400 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
400 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 | |
401 | abort: *../does-not-exist.hg* (glob) |
|
401 | abort: *../does-not-exist.hg* (glob) | |
402 | [255] |
|
402 | [255] | |
403 | $ cd .. |
|
403 | $ cd .. | |
404 |
|
404 | |||
405 | hide outer repo |
|
405 | hide outer repo | |
406 | $ hg init |
|
406 | $ hg init | |
407 |
|
407 | |||
408 | Direct clone from bundle (all-history) |
|
408 | Direct clone from bundle (all-history) | |
409 |
|
409 | |||
410 | $ hg clone full.hg full-clone |
|
410 | $ hg clone full.hg full-clone | |
411 | requesting all changes |
|
411 | requesting all changes | |
412 | adding changesets |
|
412 | adding changesets | |
413 | adding manifests |
|
413 | adding manifests | |
414 | adding file changes |
|
414 | adding file changes | |
415 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
415 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
416 | updating to branch default |
|
416 | updating to branch default | |
417 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
417 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
418 | $ hg -R full-clone heads |
|
418 | $ hg -R full-clone heads | |
419 | changeset: 8:aa35859c02ea |
|
419 | changeset: 8:aa35859c02ea | |
420 | tag: tip |
|
420 | tag: tip | |
421 | parent: 3:eebf5a27f8ca |
|
421 | parent: 3:eebf5a27f8ca | |
422 | user: test |
|
422 | user: test | |
423 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
423 | date: Thu Jan 01 00:00:00 1970 +0000 | |
424 | summary: 0.3m |
|
424 | summary: 0.3m | |
425 |
|
425 | |||
426 | changeset: 7:a6a34bfa0076 |
|
426 | changeset: 7:a6a34bfa0076 | |
427 | user: test |
|
427 | user: test | |
428 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
428 | date: Thu Jan 01 00:00:00 1970 +0000 | |
429 | summary: 1.3m |
|
429 | summary: 1.3m | |
430 |
|
430 | |||
431 | $ rm -r full-clone |
|
431 | $ rm -r full-clone | |
432 |
|
432 | |||
433 | When cloning from a non-copiable repository into '', do not |
|
433 | When cloning from a non-copiable repository into '', do not | |
434 | recurse infinitely (issue2528) |
|
434 | recurse infinitely (issue2528) | |
435 |
|
435 | |||
436 | $ hg clone full.hg '' |
|
436 | $ hg clone full.hg '' | |
437 | abort: empty destination path is not valid |
|
437 | abort: empty destination path is not valid | |
438 | [255] |
|
438 | [255] | |
439 |
|
439 | |||
440 | test for http://mercurial.selenic.com/bts/issue216 |
|
440 | test for http://mercurial.selenic.com/bts/issue216 | |
441 |
|
441 | |||
442 | Unbundle incremental bundles into fresh empty in one go |
|
442 | Unbundle incremental bundles into fresh empty in one go | |
443 |
|
443 | |||
444 | $ rm -r empty |
|
444 | $ rm -r empty | |
445 | $ hg init empty |
|
445 | $ hg init empty | |
446 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
446 | $ hg -R test bundle --base null -r 0 ../0.hg | |
447 | 1 changesets found |
|
447 | 1 changesets found | |
448 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
448 | $ hg -R test bundle --base 0 -r 1 ../1.hg | |
449 | 1 changesets found |
|
449 | 1 changesets found | |
450 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
450 | $ hg -R empty unbundle -u ../0.hg ../1.hg | |
451 | adding changesets |
|
451 | adding changesets | |
452 | adding manifests |
|
452 | adding manifests | |
453 | adding file changes |
|
453 | adding file changes | |
454 | added 1 changesets with 1 changes to 1 files |
|
454 | added 1 changesets with 1 changes to 1 files | |
455 | adding changesets |
|
455 | adding changesets | |
456 | adding manifests |
|
456 | adding manifests | |
457 | adding file changes |
|
457 | adding file changes | |
458 | added 1 changesets with 1 changes to 1 files |
|
458 | added 1 changesets with 1 changes to 1 files | |
459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
460 |
|
460 | |||
461 | View full contents of the bundle |
|
461 | View full contents of the bundle | |
462 | $ hg -R test bundle --base null -r 3 ../partial.hg |
|
462 | $ hg -R test bundle --base null -r 3 ../partial.hg | |
463 | 4 changesets found |
|
463 | 4 changesets found | |
464 | $ cd test |
|
464 | $ cd test | |
465 | $ hg -R ../../partial.hg log -r "bundle()" |
|
465 | $ hg -R ../../partial.hg log -r "bundle()" | |
466 | changeset: 0:f9ee2f85a263 |
|
466 | changeset: 0:f9ee2f85a263 | |
467 | user: test |
|
467 | user: test | |
468 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
468 | date: Thu Jan 01 00:00:00 1970 +0000 | |
469 | summary: 0.0 |
|
469 | summary: 0.0 | |
470 |
|
470 | |||
471 | changeset: 1:34c2bf6b0626 |
|
471 | changeset: 1:34c2bf6b0626 | |
472 | user: test |
|
472 | user: test | |
473 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
473 | date: Thu Jan 01 00:00:00 1970 +0000 | |
474 | summary: 0.1 |
|
474 | summary: 0.1 | |
475 |
|
475 | |||
476 | changeset: 2:e38ba6f5b7e0 |
|
476 | changeset: 2:e38ba6f5b7e0 | |
477 | user: test |
|
477 | user: test | |
478 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
478 | date: Thu Jan 01 00:00:00 1970 +0000 | |
479 | summary: 0.2 |
|
479 | summary: 0.2 | |
480 |
|
480 | |||
481 | changeset: 3:eebf5a27f8ca |
|
481 | changeset: 3:eebf5a27f8ca | |
482 | user: test |
|
482 | user: test | |
483 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
483 | date: Thu Jan 01 00:00:00 1970 +0000 | |
484 | summary: 0.3 |
|
484 | summary: 0.3 | |
485 |
|
485 | |||
486 | $ cd .. |
|
486 | $ cd .. | |
487 |
|
487 | |||
488 | test for 540d1059c802 |
|
488 | test for 540d1059c802 | |
489 |
|
489 | |||
490 | test for 540d1059c802 |
|
490 | test for 540d1059c802 | |
491 |
|
491 | |||
492 | $ hg init orig |
|
492 | $ hg init orig | |
493 | $ cd orig |
|
493 | $ cd orig | |
494 | $ echo foo > foo |
|
494 | $ echo foo > foo | |
495 | $ hg add foo |
|
495 | $ hg add foo | |
496 | $ hg ci -m 'add foo' |
|
496 | $ hg ci -m 'add foo' | |
497 |
|
497 | |||
498 | $ hg clone . ../copy |
|
498 | $ hg clone . ../copy | |
499 | updating to branch default |
|
499 | updating to branch default | |
500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
500 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
501 | $ hg tag foo |
|
501 | $ hg tag foo | |
502 |
|
502 | |||
503 | $ cd ../copy |
|
503 | $ cd ../copy | |
504 | $ echo >> foo |
|
504 | $ echo >> foo | |
505 | $ hg ci -m 'change foo' |
|
505 | $ hg ci -m 'change foo' | |
506 | $ hg bundle ../bundle.hg ../orig |
|
506 | $ hg bundle ../bundle.hg ../orig | |
507 | searching for changes |
|
507 | searching for changes | |
508 | 1 changesets found |
|
508 | 1 changesets found | |
509 |
|
509 | |||
510 | $ cd ../orig |
|
510 | $ cd ../orig | |
511 | $ hg incoming ../bundle.hg |
|
511 | $ hg incoming ../bundle.hg | |
512 | comparing with ../bundle.hg |
|
512 | comparing with ../bundle.hg | |
513 | searching for changes |
|
513 | searching for changes | |
514 | changeset: 2:ed1b79f46b9a |
|
514 | changeset: 2:ed1b79f46b9a | |
515 | tag: tip |
|
515 | tag: tip | |
516 | parent: 0:bbd179dfa0a7 |
|
516 | parent: 0:bbd179dfa0a7 | |
517 | user: test |
|
517 | user: test | |
518 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
518 | date: Thu Jan 01 00:00:00 1970 +0000 | |
519 | summary: change foo |
|
519 | summary: change foo | |
520 |
|
520 | |||
521 | $ cd .. |
|
521 | $ cd .. | |
522 |
|
522 | |||
523 | test bundle with # in the filename (issue2154): |
|
523 | test bundle with # in the filename (issue2154): | |
524 |
|
524 | |||
525 | $ cp bundle.hg 'test#bundle.hg' |
|
525 | $ cp bundle.hg 'test#bundle.hg' | |
526 | $ cd orig |
|
526 | $ cd orig | |
527 | $ hg incoming '../test#bundle.hg' |
|
527 | $ hg incoming '../test#bundle.hg' | |
528 | comparing with ../test |
|
528 | comparing with ../test | |
529 | abort: unknown revision 'bundle.hg'! |
|
529 | abort: unknown revision 'bundle.hg'! | |
530 | [255] |
|
530 | [255] | |
531 |
|
531 | |||
532 | note that percent encoding is not handled: |
|
532 | note that percent encoding is not handled: | |
533 |
|
533 | |||
534 | $ hg incoming ../test%23bundle.hg |
|
534 | $ hg incoming ../test%23bundle.hg | |
535 | abort: repository ../test%23bundle.hg not found! |
|
535 | abort: repository ../test%23bundle.hg not found! | |
536 | [255] |
|
536 | [255] | |
537 | $ cd .. |
|
537 | $ cd .. | |
538 |
|
538 | |||
539 | test to bundle revisions on the newly created branch (issue3828): |
|
539 | test to bundle revisions on the newly created branch (issue3828): | |
540 |
|
540 | |||
541 | $ hg -q clone -U test test-clone |
|
541 | $ hg -q clone -U test test-clone | |
542 | $ cd test |
|
542 | $ cd test | |
543 |
|
543 | |||
544 | $ hg -q branch foo |
|
544 | $ hg -q branch foo | |
545 | $ hg commit -m "create foo branch" |
|
545 | $ hg commit -m "create foo branch" | |
546 | $ hg -q outgoing ../test-clone |
|
546 | $ hg -q outgoing ../test-clone | |
547 | 9:b4f5acb1ee27 |
|
547 | 9:b4f5acb1ee27 | |
548 | $ hg -q bundle --branch foo foo.hg ../test-clone |
|
548 | $ hg -q bundle --branch foo foo.hg ../test-clone | |
549 | $ hg -R foo.hg -q log -r "bundle()" |
|
549 | $ hg -R foo.hg -q log -r "bundle()" | |
550 | 9:b4f5acb1ee27 |
|
550 | 9:b4f5acb1ee27 | |
551 |
|
551 | |||
552 | $ cd .. |
|
552 | $ cd .. | |
553 |
|
553 | |||
554 | test for http://mercurial.selenic.com/bts/issue1144 |
|
554 | test for http://mercurial.selenic.com/bts/issue1144 | |
555 |
|
555 | |||
556 | test that verify bundle does not traceback |
|
556 | test that verify bundle does not traceback | |
557 |
|
557 | |||
558 | partial history bundle, fails w/ unknown parent |
|
558 | partial history bundle, fails w/ unknown parent | |
559 |
|
559 | |||
560 | $ hg -R bundle.hg verify |
|
560 | $ hg -R bundle.hg verify | |
561 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! |
|
561 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! | |
562 | [255] |
|
562 | [255] | |
563 |
|
563 | |||
564 | full history bundle, refuses to verify non-local repo |
|
564 | full history bundle, refuses to verify non-local repo | |
565 |
|
565 | |||
566 | $ hg -R all.hg verify |
|
566 | $ hg -R all.hg verify | |
567 | abort: cannot verify bundle or remote repos |
|
567 | abort: cannot verify bundle or remote repos | |
568 | [255] |
|
568 | [255] | |
569 |
|
569 | |||
570 | but, regular verify must continue to work |
|
570 | but, regular verify must continue to work | |
571 |
|
571 | |||
572 | $ hg -R orig verify |
|
572 | $ hg -R orig verify | |
573 | checking changesets |
|
573 | checking changesets | |
574 | checking manifests |
|
574 | checking manifests | |
575 | crosschecking files in changesets and manifests |
|
575 | crosschecking files in changesets and manifests | |
576 | checking files |
|
576 | checking files | |
577 | 2 files, 2 changesets, 2 total revisions |
|
577 | 2 files, 2 changesets, 2 total revisions | |
578 |
|
578 | |||
579 | diff against bundle |
|
579 | diff against bundle | |
580 |
|
580 | |||
581 | $ hg init b |
|
581 | $ hg init b | |
582 | $ cd b |
|
582 | $ cd b | |
583 | $ hg -R ../all.hg diff -r tip |
|
583 | $ hg -R ../all.hg diff -r tip | |
584 | diff -r aa35859c02ea anotherfile |
|
584 | diff -r aa35859c02ea anotherfile | |
585 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
|
585 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 | |
586 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
586 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
587 | @@ -1,4 +0,0 @@ |
|
587 | @@ -1,4 +0,0 @@ | |
588 | -0 |
|
588 | -0 | |
589 | -1 |
|
589 | -1 | |
590 | -2 |
|
590 | -2 | |
591 | -3 |
|
591 | -3 | |
592 | $ cd .. |
|
592 | $ cd .. | |
593 |
|
593 | |||
594 | bundle single branch |
|
594 | bundle single branch | |
595 |
|
595 | |||
596 | $ hg init branchy |
|
596 | $ hg init branchy | |
597 | $ cd branchy |
|
597 | $ cd branchy | |
598 | $ echo a >a |
|
598 | $ echo a >a | |
599 | $ echo x >x |
|
599 | $ echo x >x | |
600 | $ hg ci -Ama |
|
600 | $ hg ci -Ama | |
601 | adding a |
|
601 | adding a | |
602 | adding x |
|
602 | adding x | |
603 | $ echo c >c |
|
603 | $ echo c >c | |
604 | $ echo xx >x |
|
604 | $ echo xx >x | |
605 | $ hg ci -Amc |
|
605 | $ hg ci -Amc | |
606 | adding c |
|
606 | adding c | |
607 | $ echo c1 >c1 |
|
607 | $ echo c1 >c1 | |
608 | $ hg ci -Amc1 |
|
608 | $ hg ci -Amc1 | |
609 | adding c1 |
|
609 | adding c1 | |
610 | $ hg up 0 |
|
610 | $ hg up 0 | |
611 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
611 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
612 | $ echo b >b |
|
612 | $ echo b >b | |
613 | $ hg ci -Amb |
|
613 | $ hg ci -Amb | |
614 | adding b |
|
614 | adding b | |
615 | created new head |
|
615 | created new head | |
616 | $ echo b1 >b1 |
|
616 | $ echo b1 >b1 | |
617 | $ echo xx >x |
|
617 | $ echo xx >x | |
618 | $ hg ci -Amb1 |
|
618 | $ hg ci -Amb1 | |
619 | adding b1 |
|
619 | adding b1 | |
620 | $ hg clone -q -r2 . part |
|
620 | $ hg clone -q -r2 . part | |
621 |
|
621 | |||
622 | == bundling via incoming |
|
622 | == bundling via incoming | |
623 |
|
623 | |||
624 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
624 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . | |
625 | comparing with . |
|
625 | comparing with . | |
626 | searching for changes |
|
626 | searching for changes | |
627 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
627 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a | |
628 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
628 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 | |
629 |
|
629 | |||
630 | == bundling |
|
630 | == bundling | |
631 |
|
631 | |||
632 | $ hg bundle bundle.hg part --debug --config progress.debug=true |
|
632 | $ hg bundle bundle.hg part --debug --config progress.debug=true | |
633 | query 1; heads |
|
633 | query 1; heads | |
634 | searching for changes |
|
634 | searching for changes | |
635 | all remote heads known locally |
|
635 | all remote heads known locally | |
636 | 2 changesets found |
|
636 | 2 changesets found | |
637 | list of changesets: |
|
637 | list of changesets: | |
638 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
638 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a | |
639 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
639 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 | |
640 | bundling: 1/2 changesets (50.00%) |
|
640 | bundling: 1/2 changesets (50.00%) | |
641 | bundling: 2/2 changesets (100.00%) |
|
641 | bundling: 2/2 changesets (100.00%) | |
642 | bundling: 1/2 manifests (50.00%) |
|
642 | bundling: 1/2 manifests (50.00%) | |
643 | bundling: 2/2 manifests (100.00%) |
|
643 | bundling: 2/2 manifests (100.00%) | |
644 | bundling: b 1/3 files (33.33%) |
|
644 | bundling: b 1/3 files (33.33%) | |
645 | bundling: b1 2/3 files (66.67%) |
|
645 | bundling: b1 2/3 files (66.67%) | |
646 | bundling: x 3/3 files (100.00%) |
|
646 | bundling: x 3/3 files (100.00%) | |
647 |
|
647 | |||
648 | == Test for issue3441 |
|
648 | == Test for issue3441 | |
649 |
|
649 | |||
650 | $ hg clone -q -r0 . part2 |
|
650 | $ hg clone -q -r0 . part2 | |
651 | $ hg -q -R part2 pull bundle.hg |
|
651 | $ hg -q -R part2 pull bundle.hg | |
652 | $ hg -R part2 verify |
|
652 | $ hg -R part2 verify | |
653 | checking changesets |
|
653 | checking changesets | |
654 | checking manifests |
|
654 | checking manifests | |
655 | crosschecking files in changesets and manifests |
|
655 | crosschecking files in changesets and manifests | |
656 | checking files |
|
656 | checking files | |
657 | 4 files, 3 changesets, 5 total revisions |
|
657 | 4 files, 3 changesets, 5 total revisions | |
658 |
|
658 | |||
659 | $ cd .. |
|
659 | $ cd .. |
@@ -1,719 +1,719 b'' | |||||
1 | Test exchange of common information using bundle2 |
|
1 | Test exchange of common information using bundle2 | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | $ getmainid() { |
|
4 | $ getmainid() { | |
5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
5 | > hg -R main log --template '{node}\n' --rev "$1" | |
6 | > } |
|
6 | > } | |
7 |
|
7 | |||
8 | enable obsolescence |
|
8 | enable obsolescence | |
9 |
|
9 | |||
10 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF |
|
10 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF | |
11 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" |
|
11 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" | |
12 | > hg debuglock |
|
12 | > hg debuglock | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | $ cat >> $HGRCPATH << EOF |
|
15 | $ cat >> $HGRCPATH << EOF | |
16 | > [experimental] |
|
16 | > [experimental] | |
17 | > evolution=createmarkers,exchange |
|
17 | > evolution=createmarkers,exchange | |
18 | > bundle2-exp=True |
|
18 | > bundle2-exp=True | |
19 | > bundle2-output-capture=True |
|
19 | > bundle2-output-capture=True | |
20 | > [ui] |
|
20 | > [ui] | |
21 | > ssh=dummyssh |
|
21 | > ssh=dummyssh | |
22 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
22 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
23 | > [web] |
|
23 | > [web] | |
24 | > push_ssl = false |
|
24 | > push_ssl = false | |
25 | > allow_push = * |
|
25 | > allow_push = * | |
26 | > [phases] |
|
26 | > [phases] | |
27 | > publish=False |
|
27 | > publish=False | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" |
|
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" |
|
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
31 |
> txnclose.env = sh -c "HG_LOCAL= p |
|
31 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" | |
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" |
|
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | The extension requires a repo (currently unused) |
|
35 | The extension requires a repo (currently unused) | |
36 |
|
36 | |||
37 | $ hg init main |
|
37 | $ hg init main | |
38 | $ cd main |
|
38 | $ cd main | |
39 | $ touch a |
|
39 | $ touch a | |
40 | $ hg add a |
|
40 | $ hg add a | |
41 | $ hg commit -m 'a' |
|
41 | $ hg commit -m 'a' | |
42 | pre-close-tip:3903775176ed draft |
|
42 | pre-close-tip:3903775176ed draft | |
43 | postclose-tip:3903775176ed draft |
|
43 | postclose-tip:3903775176ed draft | |
44 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
44 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
45 |
|
45 | |||
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
47 | adding changesets |
|
47 | adding changesets | |
48 | adding manifests |
|
48 | adding manifests | |
49 | adding file changes |
|
49 | adding file changes | |
50 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
50 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
51 | pre-close-tip:02de42196ebe draft |
|
51 | pre-close-tip:02de42196ebe draft | |
52 | postclose-tip:02de42196ebe draft |
|
52 | postclose-tip:02de42196ebe draft | |
53 | txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob) |
|
53 | txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob) | |
54 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) |
|
54 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) | |
55 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
55 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
56 |
|
56 | |||
57 | $ cd .. |
|
57 | $ cd .. | |
58 |
|
58 | |||
59 | Real world exchange |
|
59 | Real world exchange | |
60 | ===================== |
|
60 | ===================== | |
61 |
|
61 | |||
62 | Add more obsolescence information |
|
62 | Add more obsolescence information | |
63 |
|
63 | |||
64 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
|
64 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` | |
65 | pre-close-tip:02de42196ebe draft |
|
65 | pre-close-tip:02de42196ebe draft | |
66 | postclose-tip:02de42196ebe draft |
|
66 | postclose-tip:02de42196ebe draft | |
67 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
67 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
68 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` |
|
68 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` | |
69 | pre-close-tip:02de42196ebe draft |
|
69 | pre-close-tip:02de42196ebe draft | |
70 | postclose-tip:02de42196ebe draft |
|
70 | postclose-tip:02de42196ebe draft | |
71 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
71 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
72 |
|
72 | |||
73 | clone --pull |
|
73 | clone --pull | |
74 |
|
74 | |||
75 | $ hg -R main phase --public cd010b8cd998 |
|
75 | $ hg -R main phase --public cd010b8cd998 | |
76 | pre-close-tip:02de42196ebe draft |
|
76 | pre-close-tip:02de42196ebe draft | |
77 | postclose-tip:02de42196ebe draft |
|
77 | postclose-tip:02de42196ebe draft | |
78 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
78 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
79 | $ hg clone main other --pull --rev 9520eea781bc |
|
79 | $ hg clone main other --pull --rev 9520eea781bc | |
80 | adding changesets |
|
80 | adding changesets | |
81 | adding manifests |
|
81 | adding manifests | |
82 | adding file changes |
|
82 | adding file changes | |
83 | added 2 changesets with 2 changes to 2 files |
|
83 | added 2 changesets with 2 changes to 2 files | |
84 | 1 new obsolescence markers |
|
84 | 1 new obsolescence markers | |
85 | pre-close-tip:9520eea781bc draft |
|
85 | pre-close-tip:9520eea781bc draft | |
86 | postclose-tip:9520eea781bc draft |
|
86 | postclose-tip:9520eea781bc draft | |
87 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
87 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
88 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
88 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
89 | updating to branch default |
|
89 | updating to branch default | |
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ hg -R other log -G |
|
91 | $ hg -R other log -G | |
92 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
92 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
93 | | |
|
93 | | | |
94 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
94 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
95 |
|
95 | |||
96 | $ hg -R other debugobsolete |
|
96 | $ hg -R other debugobsolete | |
97 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
97 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
98 |
|
98 | |||
99 | pull |
|
99 | pull | |
100 |
|
100 | |||
101 | $ hg -R main phase --public 9520eea781bc |
|
101 | $ hg -R main phase --public 9520eea781bc | |
102 | pre-close-tip:02de42196ebe draft |
|
102 | pre-close-tip:02de42196ebe draft | |
103 | postclose-tip:02de42196ebe draft |
|
103 | postclose-tip:02de42196ebe draft | |
104 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
104 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
105 | $ hg -R other pull -r 24b6387c8c8c |
|
105 | $ hg -R other pull -r 24b6387c8c8c | |
106 | pulling from $TESTTMP/main (glob) |
|
106 | pulling from $TESTTMP/main (glob) | |
107 | searching for changes |
|
107 | searching for changes | |
108 | adding changesets |
|
108 | adding changesets | |
109 | adding manifests |
|
109 | adding manifests | |
110 | adding file changes |
|
110 | adding file changes | |
111 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
111 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
112 | 1 new obsolescence markers |
|
112 | 1 new obsolescence markers | |
113 | pre-close-tip:24b6387c8c8c draft |
|
113 | pre-close-tip:24b6387c8c8c draft | |
114 | postclose-tip:24b6387c8c8c draft |
|
114 | postclose-tip:24b6387c8c8c draft | |
115 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
115 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
116 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
116 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
117 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
117 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
118 | $ hg -R other log -G |
|
118 | $ hg -R other log -G | |
119 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
119 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
120 | | |
|
120 | | | |
121 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
121 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
122 | |/ |
|
122 | |/ | |
123 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
123 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
124 |
|
124 | |||
125 | $ hg -R other debugobsolete |
|
125 | $ hg -R other debugobsolete | |
126 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
126 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
127 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
127 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
128 |
|
128 | |||
129 | pull empty (with phase movement) |
|
129 | pull empty (with phase movement) | |
130 |
|
130 | |||
131 | $ hg -R main phase --public 24b6387c8c8c |
|
131 | $ hg -R main phase --public 24b6387c8c8c | |
132 | pre-close-tip:02de42196ebe draft |
|
132 | pre-close-tip:02de42196ebe draft | |
133 | postclose-tip:02de42196ebe draft |
|
133 | postclose-tip:02de42196ebe draft | |
134 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
134 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
135 | $ hg -R other pull -r 24b6387c8c8c |
|
135 | $ hg -R other pull -r 24b6387c8c8c | |
136 | pulling from $TESTTMP/main (glob) |
|
136 | pulling from $TESTTMP/main (glob) | |
137 | no changes found |
|
137 | no changes found | |
138 | pre-close-tip:24b6387c8c8c public |
|
138 | pre-close-tip:24b6387c8c8c public | |
139 | postclose-tip:24b6387c8c8c public |
|
139 | postclose-tip:24b6387c8c8c public | |
140 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
140 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
141 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
141 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
142 | $ hg -R other log -G |
|
142 | $ hg -R other log -G | |
143 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
143 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
144 | | |
|
144 | | | |
145 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
145 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
146 | |/ |
|
146 | |/ | |
147 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
147 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
148 |
|
148 | |||
149 | $ hg -R other debugobsolete |
|
149 | $ hg -R other debugobsolete | |
150 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
150 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
151 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
151 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
152 |
|
152 | |||
153 | pull empty |
|
153 | pull empty | |
154 |
|
154 | |||
155 | $ hg -R other pull -r 24b6387c8c8c |
|
155 | $ hg -R other pull -r 24b6387c8c8c | |
156 | pulling from $TESTTMP/main (glob) |
|
156 | pulling from $TESTTMP/main (glob) | |
157 | no changes found |
|
157 | no changes found | |
158 | pre-close-tip:24b6387c8c8c public |
|
158 | pre-close-tip:24b6387c8c8c public | |
159 | postclose-tip:24b6387c8c8c public |
|
159 | postclose-tip:24b6387c8c8c public | |
160 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
160 | txnclose hook: HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
161 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
161 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
162 | $ hg -R other log -G |
|
162 | $ hg -R other log -G | |
163 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
163 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
164 | | |
|
164 | | | |
165 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
165 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
166 | |/ |
|
166 | |/ | |
167 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
167 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
168 |
|
168 | |||
169 | $ hg -R other debugobsolete |
|
169 | $ hg -R other debugobsolete | |
170 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
170 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
171 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
171 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
172 |
|
172 | |||
173 | add extra data to test their exchange during push |
|
173 | add extra data to test their exchange during push | |
174 |
|
174 | |||
175 | $ hg -R main bookmark --rev eea13746799a book_eea1 |
|
175 | $ hg -R main bookmark --rev eea13746799a book_eea1 | |
176 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
|
176 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` | |
177 | pre-close-tip:02de42196ebe draft |
|
177 | pre-close-tip:02de42196ebe draft | |
178 | postclose-tip:02de42196ebe draft |
|
178 | postclose-tip:02de42196ebe draft | |
179 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
179 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
180 | $ hg -R main bookmark --rev 02de42196ebe book_02de |
|
180 | $ hg -R main bookmark --rev 02de42196ebe book_02de | |
181 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
|
181 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` | |
182 | pre-close-tip:02de42196ebe draft book_02de |
|
182 | pre-close-tip:02de42196ebe draft book_02de | |
183 | postclose-tip:02de42196ebe draft book_02de |
|
183 | postclose-tip:02de42196ebe draft book_02de | |
184 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
184 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
185 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
|
185 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc | |
186 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
|
186 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` | |
187 | pre-close-tip:02de42196ebe draft book_02de |
|
187 | pre-close-tip:02de42196ebe draft book_02de | |
188 | postclose-tip:02de42196ebe draft book_02de |
|
188 | postclose-tip:02de42196ebe draft book_02de | |
189 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
189 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
190 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
|
190 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd | |
191 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
|
191 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` | |
192 | pre-close-tip:02de42196ebe draft book_02de |
|
192 | pre-close-tip:02de42196ebe draft book_02de | |
193 | postclose-tip:02de42196ebe draft book_02de |
|
193 | postclose-tip:02de42196ebe draft book_02de | |
194 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
194 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
195 | $ hg -R main bookmark --rev 32af7686d403 book_32af |
|
195 | $ hg -R main bookmark --rev 32af7686d403 book_32af | |
196 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
|
196 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` | |
197 | pre-close-tip:02de42196ebe draft book_02de |
|
197 | pre-close-tip:02de42196ebe draft book_02de | |
198 | postclose-tip:02de42196ebe draft book_02de |
|
198 | postclose-tip:02de42196ebe draft book_02de | |
199 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) |
|
199 | txnclose hook: HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:* HG_TXNNAME=debugobsolete (glob) | |
200 |
|
200 | |||
201 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
|
201 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 | |
202 | $ hg -R other bookmark --rev cd010b8cd998 book_02de |
|
202 | $ hg -R other bookmark --rev cd010b8cd998 book_02de | |
203 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc |
|
203 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc | |
204 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd |
|
204 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd | |
205 | $ hg -R other bookmark --rev cd010b8cd998 book_32af |
|
205 | $ hg -R other bookmark --rev cd010b8cd998 book_32af | |
206 |
|
206 | |||
207 | $ hg -R main phase --public eea13746799a |
|
207 | $ hg -R main phase --public eea13746799a | |
208 | pre-close-tip:02de42196ebe draft book_02de |
|
208 | pre-close-tip:02de42196ebe draft book_02de | |
209 | postclose-tip:02de42196ebe draft book_02de |
|
209 | postclose-tip:02de42196ebe draft book_02de | |
210 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
210 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
211 |
|
211 | |||
212 | push |
|
212 | push | |
213 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
|
213 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 | |
214 | pushing to other |
|
214 | pushing to other | |
215 | searching for changes |
|
215 | searching for changes | |
216 | remote: adding changesets |
|
216 | remote: adding changesets | |
217 | remote: adding manifests |
|
217 | remote: adding manifests | |
218 | remote: adding file changes |
|
218 | remote: adding file changes | |
219 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
219 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
220 | remote: 1 new obsolescence markers |
|
220 | remote: 1 new obsolescence markers | |
221 | remote: pre-close-tip:eea13746799a public book_eea1 |
|
221 | remote: pre-close-tip:eea13746799a public book_eea1 | |
222 | remote: pushkey: lock state after "phases" |
|
222 | remote: pushkey: lock state after "phases" | |
223 | remote: lock: free |
|
223 | remote: lock: free | |
224 | remote: wlock: free |
|
224 | remote: wlock: free | |
225 | remote: pushkey: lock state after "bookmarks" |
|
225 | remote: pushkey: lock state after "bookmarks" | |
226 | remote: lock: free |
|
226 | remote: lock: free | |
227 | remote: wlock: free |
|
227 | remote: wlock: free | |
228 | remote: postclose-tip:eea13746799a public book_eea1 |
|
228 | remote: postclose-tip:eea13746799a public book_eea1 | |
229 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
229 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
230 | updating bookmark book_eea1 |
|
230 | updating bookmark book_eea1 | |
231 | pre-close-tip:02de42196ebe draft book_02de |
|
231 | pre-close-tip:02de42196ebe draft book_02de | |
232 | postclose-tip:02de42196ebe draft book_02de |
|
232 | postclose-tip:02de42196ebe draft book_02de | |
233 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
233 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
234 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) |
|
234 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) | |
235 | $ hg -R other log -G |
|
235 | $ hg -R other log -G | |
236 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
236 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
237 | |\ |
|
237 | |\ | |
238 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
238 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
239 | | | |
|
239 | | | | |
240 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
240 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
241 | |/ |
|
241 | |/ | |
242 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
|
242 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A | |
243 |
|
243 | |||
244 | $ hg -R other debugobsolete |
|
244 | $ hg -R other debugobsolete | |
245 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
245 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
246 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
246 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
247 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
247 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
248 |
|
248 | |||
249 | pull over ssh |
|
249 | pull over ssh | |
250 |
|
250 | |||
251 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
|
251 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de | |
252 | pulling from ssh://user@dummy/main |
|
252 | pulling from ssh://user@dummy/main | |
253 | searching for changes |
|
253 | searching for changes | |
254 | adding changesets |
|
254 | adding changesets | |
255 | adding manifests |
|
255 | adding manifests | |
256 | adding file changes |
|
256 | adding file changes | |
257 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
257 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
258 | 1 new obsolescence markers |
|
258 | 1 new obsolescence markers | |
259 | updating bookmark book_02de |
|
259 | updating bookmark book_02de | |
260 | pre-close-tip:02de42196ebe draft book_02de |
|
260 | pre-close-tip:02de42196ebe draft book_02de | |
261 | postclose-tip:02de42196ebe draft book_02de |
|
261 | postclose-tip:02de42196ebe draft book_02de | |
262 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
262 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
263 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main |
|
263 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main | |
264 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
264 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
265 | $ hg -R other debugobsolete |
|
265 | $ hg -R other debugobsolete | |
266 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
266 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
267 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
267 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
268 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
268 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
269 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
269 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
270 |
|
270 | |||
271 | pull over http |
|
271 | pull over http | |
272 |
|
272 | |||
273 | $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log |
|
273 | $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log | |
274 | $ cat main.pid >> $DAEMON_PIDS |
|
274 | $ cat main.pid >> $DAEMON_PIDS | |
275 |
|
275 | |||
276 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
|
276 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc | |
277 | pulling from http://localhost:$HGPORT/ |
|
277 | pulling from http://localhost:$HGPORT/ | |
278 | searching for changes |
|
278 | searching for changes | |
279 | adding changesets |
|
279 | adding changesets | |
280 | adding manifests |
|
280 | adding manifests | |
281 | adding file changes |
|
281 | adding file changes | |
282 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
282 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
283 | 1 new obsolescence markers |
|
283 | 1 new obsolescence markers | |
284 | updating bookmark book_42cc |
|
284 | updating bookmark book_42cc | |
285 | pre-close-tip:42ccdea3bb16 draft book_42cc |
|
285 | pre-close-tip:42ccdea3bb16 draft book_42cc | |
286 | postclose-tip:42ccdea3bb16 draft book_42cc |
|
286 | postclose-tip:42ccdea3bb16 draft book_42cc | |
287 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) |
|
287 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) | |
288 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ |
|
288 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ | |
289 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
289 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
290 | $ cat main-error.log |
|
290 | $ cat main-error.log | |
291 | $ hg -R other debugobsolete |
|
291 | $ hg -R other debugobsolete | |
292 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
292 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
293 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
293 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
294 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
294 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
295 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
295 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
296 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
296 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
297 |
|
297 | |||
298 | push over ssh |
|
298 | push over ssh | |
299 |
|
299 | |||
300 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
|
300 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd | |
301 | pushing to ssh://user@dummy/other |
|
301 | pushing to ssh://user@dummy/other | |
302 | searching for changes |
|
302 | searching for changes | |
303 | remote: adding changesets |
|
303 | remote: adding changesets | |
304 | remote: adding manifests |
|
304 | remote: adding manifests | |
305 | remote: adding file changes |
|
305 | remote: adding file changes | |
306 | remote: added 1 changesets with 1 changes to 1 files |
|
306 | remote: added 1 changesets with 1 changes to 1 files | |
307 | remote: 1 new obsolescence markers |
|
307 | remote: 1 new obsolescence markers | |
308 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd |
|
308 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd | |
309 | remote: pushkey: lock state after "bookmarks" |
|
309 | remote: pushkey: lock state after "bookmarks" | |
310 | remote: lock: free |
|
310 | remote: lock: free | |
311 | remote: wlock: free |
|
311 | remote: wlock: free | |
312 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
312 | remote: postclose-tip:5fddd98957c8 draft book_5fdd | |
313 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob) |
|
313 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob) | |
314 | updating bookmark book_5fdd |
|
314 | updating bookmark book_5fdd | |
315 | pre-close-tip:02de42196ebe draft book_02de |
|
315 | pre-close-tip:02de42196ebe draft book_02de | |
316 | postclose-tip:02de42196ebe draft book_02de |
|
316 | postclose-tip:02de42196ebe draft book_02de | |
317 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
317 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
318 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other |
|
318 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other | |
319 | $ hg -R other log -G |
|
319 | $ hg -R other log -G | |
320 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
320 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
321 | | |
|
321 | | | |
322 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
322 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
323 | | |
|
323 | | | |
324 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
324 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
325 | | | |
|
325 | | | | |
326 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
326 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
327 | | |/| |
|
327 | | |/| | |
328 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
328 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
329 | |/ / |
|
329 | |/ / | |
330 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
330 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
331 | |/ |
|
331 | |/ | |
332 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
|
332 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A | |
333 |
|
333 | |||
334 | $ hg -R other debugobsolete |
|
334 | $ hg -R other debugobsolete | |
335 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
335 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
336 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
337 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
337 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
338 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
338 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
339 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
339 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
340 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
340 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
341 |
|
341 | |||
342 | push over http |
|
342 | push over http | |
343 |
|
343 | |||
344 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
344 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
345 | $ cat other.pid >> $DAEMON_PIDS |
|
345 | $ cat other.pid >> $DAEMON_PIDS | |
346 |
|
346 | |||
347 | $ hg -R main phase --public 32af7686d403 |
|
347 | $ hg -R main phase --public 32af7686d403 | |
348 | pre-close-tip:02de42196ebe draft book_02de |
|
348 | pre-close-tip:02de42196ebe draft book_02de | |
349 | postclose-tip:02de42196ebe draft book_02de |
|
349 | postclose-tip:02de42196ebe draft book_02de | |
350 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) |
|
350 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=phase (glob) | |
351 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
|
351 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af | |
352 | pushing to http://localhost:$HGPORT2/ |
|
352 | pushing to http://localhost:$HGPORT2/ | |
353 | searching for changes |
|
353 | searching for changes | |
354 | remote: adding changesets |
|
354 | remote: adding changesets | |
355 | remote: adding manifests |
|
355 | remote: adding manifests | |
356 | remote: adding file changes |
|
356 | remote: adding file changes | |
357 | remote: added 1 changesets with 1 changes to 1 files |
|
357 | remote: added 1 changesets with 1 changes to 1 files | |
358 | remote: 1 new obsolescence markers |
|
358 | remote: 1 new obsolescence markers | |
359 | remote: pre-close-tip:32af7686d403 public book_32af |
|
359 | remote: pre-close-tip:32af7686d403 public book_32af | |
360 | remote: pushkey: lock state after "phases" |
|
360 | remote: pushkey: lock state after "phases" | |
361 | remote: lock: free |
|
361 | remote: lock: free | |
362 | remote: wlock: free |
|
362 | remote: wlock: free | |
363 | remote: pushkey: lock state after "bookmarks" |
|
363 | remote: pushkey: lock state after "bookmarks" | |
364 | remote: lock: free |
|
364 | remote: lock: free | |
365 | remote: wlock: free |
|
365 | remote: wlock: free | |
366 | remote: postclose-tip:32af7686d403 public book_32af |
|
366 | remote: postclose-tip:32af7686d403 public book_32af | |
367 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob) |
|
367 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob) | |
368 | updating bookmark book_32af |
|
368 | updating bookmark book_32af | |
369 | pre-close-tip:02de42196ebe draft book_02de |
|
369 | pre-close-tip:02de42196ebe draft book_02de | |
370 | postclose-tip:02de42196ebe draft book_02de |
|
370 | postclose-tip:02de42196ebe draft book_02de | |
371 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) |
|
371 | txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) | |
372 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ |
|
372 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ | |
373 | $ cat other-error.log |
|
373 | $ cat other-error.log | |
374 |
|
374 | |||
375 | Check final content. |
|
375 | Check final content. | |
376 |
|
376 | |||
377 | $ hg -R other log -G |
|
377 | $ hg -R other log -G | |
378 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
|
378 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | |
379 | | |
|
379 | | | |
380 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
380 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
381 | | |
|
381 | | | |
382 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
382 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
383 | | |
|
383 | | | |
384 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
384 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
385 | | | |
|
385 | | | | |
386 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
386 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
387 | | |/| |
|
387 | | |/| | |
388 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
388 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
389 | |/ / |
|
389 | |/ / | |
390 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
390 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
391 | |/ |
|
391 | |/ | |
392 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
392 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
393 |
|
393 | |||
394 | $ hg -R other debugobsolete |
|
394 | $ hg -R other debugobsolete | |
395 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
395 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
396 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
396 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
397 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
397 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
398 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
398 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
399 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
399 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
400 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
400 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
401 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
401 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
402 |
|
402 | |||
403 | (check that no 'pending' files remain) |
|
403 | (check that no 'pending' files remain) | |
404 |
|
404 | |||
405 | $ ls -1 other/.hg/bookmarks* |
|
405 | $ ls -1 other/.hg/bookmarks* | |
406 | other/.hg/bookmarks |
|
406 | other/.hg/bookmarks | |
407 | $ ls -1 other/.hg/store/phaseroots* |
|
407 | $ ls -1 other/.hg/store/phaseroots* | |
408 | other/.hg/store/phaseroots |
|
408 | other/.hg/store/phaseroots | |
409 | $ ls -1 other/.hg/store/00changelog.i* |
|
409 | $ ls -1 other/.hg/store/00changelog.i* | |
410 | other/.hg/store/00changelog.i |
|
410 | other/.hg/store/00changelog.i | |
411 |
|
411 | |||
412 | Error Handling |
|
412 | Error Handling | |
413 | ============== |
|
413 | ============== | |
414 |
|
414 | |||
415 | Check that errors are properly returned to the client during push. |
|
415 | Check that errors are properly returned to the client during push. | |
416 |
|
416 | |||
417 | Setting up |
|
417 | Setting up | |
418 |
|
418 | |||
419 | $ cat > failpush.py << EOF |
|
419 | $ cat > failpush.py << EOF | |
420 | > """A small extension that makes push fails when using bundle2 |
|
420 | > """A small extension that makes push fails when using bundle2 | |
421 | > |
|
421 | > | |
422 | > used to test error handling in bundle2 |
|
422 | > used to test error handling in bundle2 | |
423 | > """ |
|
423 | > """ | |
424 | > |
|
424 | > | |
425 | > from mercurial import util |
|
425 | > from mercurial import util | |
426 | > from mercurial import bundle2 |
|
426 | > from mercurial import bundle2 | |
427 | > from mercurial import exchange |
|
427 | > from mercurial import exchange | |
428 | > from mercurial import extensions |
|
428 | > from mercurial import extensions | |
429 | > |
|
429 | > | |
430 | > def _pushbundle2failpart(pushop, bundler): |
|
430 | > def _pushbundle2failpart(pushop, bundler): | |
431 | > reason = pushop.ui.config('failpush', 'reason', None) |
|
431 | > reason = pushop.ui.config('failpush', 'reason', None) | |
432 | > part = None |
|
432 | > part = None | |
433 | > if reason == 'abort': |
|
433 | > if reason == 'abort': | |
434 | > bundler.newpart('test:abort') |
|
434 | > bundler.newpart('test:abort') | |
435 | > if reason == 'unknown': |
|
435 | > if reason == 'unknown': | |
436 | > bundler.newpart('test:unknown') |
|
436 | > bundler.newpart('test:unknown') | |
437 | > if reason == 'race': |
|
437 | > if reason == 'race': | |
438 | > # 20 Bytes of crap |
|
438 | > # 20 Bytes of crap | |
439 | > bundler.newpart('check:heads', data='01234567890123456789') |
|
439 | > bundler.newpart('check:heads', data='01234567890123456789') | |
440 | > |
|
440 | > | |
441 | > @bundle2.parthandler("test:abort") |
|
441 | > @bundle2.parthandler("test:abort") | |
442 | > def handleabort(op, part): |
|
442 | > def handleabort(op, part): | |
443 | > raise util.Abort('Abandon ship!', hint="don't panic") |
|
443 | > raise util.Abort('Abandon ship!', hint="don't panic") | |
444 | > |
|
444 | > | |
445 | > def uisetup(ui): |
|
445 | > def uisetup(ui): | |
446 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart |
|
446 | > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart | |
447 | > exchange.b2partsgenorder.insert(0, 'failpart') |
|
447 | > exchange.b2partsgenorder.insert(0, 'failpart') | |
448 | > |
|
448 | > | |
449 | > EOF |
|
449 | > EOF | |
450 |
|
450 | |||
451 | $ cd main |
|
451 | $ cd main | |
452 | $ hg up tip |
|
452 | $ hg up tip | |
453 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
453 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
454 | $ echo 'I' > I |
|
454 | $ echo 'I' > I | |
455 | $ hg add I |
|
455 | $ hg add I | |
456 | $ hg ci -m 'I' |
|
456 | $ hg ci -m 'I' | |
457 | pre-close-tip:e7ec4e813ba6 draft |
|
457 | pre-close-tip:e7ec4e813ba6 draft | |
458 | postclose-tip:e7ec4e813ba6 draft |
|
458 | postclose-tip:e7ec4e813ba6 draft | |
459 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
459 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
460 | $ hg id |
|
460 | $ hg id | |
461 | e7ec4e813ba6 tip |
|
461 | e7ec4e813ba6 tip | |
462 | $ cd .. |
|
462 | $ cd .. | |
463 |
|
463 | |||
464 | $ cat << EOF >> $HGRCPATH |
|
464 | $ cat << EOF >> $HGRCPATH | |
465 | > [extensions] |
|
465 | > [extensions] | |
466 | > failpush=$TESTTMP/failpush.py |
|
466 | > failpush=$TESTTMP/failpush.py | |
467 | > EOF |
|
467 | > EOF | |
468 |
|
468 | |||
469 | $ killdaemons.py |
|
469 | $ killdaemons.py | |
470 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
470 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
471 | $ cat other.pid >> $DAEMON_PIDS |
|
471 | $ cat other.pid >> $DAEMON_PIDS | |
472 |
|
472 | |||
473 | Doing the actual push: Abort error |
|
473 | Doing the actual push: Abort error | |
474 |
|
474 | |||
475 | $ cat << EOF >> $HGRCPATH |
|
475 | $ cat << EOF >> $HGRCPATH | |
476 | > [failpush] |
|
476 | > [failpush] | |
477 | > reason = abort |
|
477 | > reason = abort | |
478 | > EOF |
|
478 | > EOF | |
479 |
|
479 | |||
480 | $ hg -R main push other -r e7ec4e813ba6 |
|
480 | $ hg -R main push other -r e7ec4e813ba6 | |
481 | pushing to other |
|
481 | pushing to other | |
482 | searching for changes |
|
482 | searching for changes | |
483 | abort: Abandon ship! |
|
483 | abort: Abandon ship! | |
484 | (don't panic) |
|
484 | (don't panic) | |
485 | [255] |
|
485 | [255] | |
486 |
|
486 | |||
487 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
487 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
488 | pushing to ssh://user@dummy/other |
|
488 | pushing to ssh://user@dummy/other | |
489 | searching for changes |
|
489 | searching for changes | |
490 | abort: Abandon ship! |
|
490 | abort: Abandon ship! | |
491 | (don't panic) |
|
491 | (don't panic) | |
492 | [255] |
|
492 | [255] | |
493 |
|
493 | |||
494 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
494 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
495 | pushing to http://localhost:$HGPORT2/ |
|
495 | pushing to http://localhost:$HGPORT2/ | |
496 | searching for changes |
|
496 | searching for changes | |
497 | abort: Abandon ship! |
|
497 | abort: Abandon ship! | |
498 | (don't panic) |
|
498 | (don't panic) | |
499 | [255] |
|
499 | [255] | |
500 |
|
500 | |||
501 |
|
501 | |||
502 | Doing the actual push: unknown mandatory parts |
|
502 | Doing the actual push: unknown mandatory parts | |
503 |
|
503 | |||
504 | $ cat << EOF >> $HGRCPATH |
|
504 | $ cat << EOF >> $HGRCPATH | |
505 | > [failpush] |
|
505 | > [failpush] | |
506 | > reason = unknown |
|
506 | > reason = unknown | |
507 | > EOF |
|
507 | > EOF | |
508 |
|
508 | |||
509 | $ hg -R main push other -r e7ec4e813ba6 |
|
509 | $ hg -R main push other -r e7ec4e813ba6 | |
510 | pushing to other |
|
510 | pushing to other | |
511 | searching for changes |
|
511 | searching for changes | |
512 | abort: missing support for test:unknown |
|
512 | abort: missing support for test:unknown | |
513 | [255] |
|
513 | [255] | |
514 |
|
514 | |||
515 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
515 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
516 | pushing to ssh://user@dummy/other |
|
516 | pushing to ssh://user@dummy/other | |
517 | searching for changes |
|
517 | searching for changes | |
518 | abort: missing support for test:unknown |
|
518 | abort: missing support for test:unknown | |
519 | [255] |
|
519 | [255] | |
520 |
|
520 | |||
521 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
521 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
522 | pushing to http://localhost:$HGPORT2/ |
|
522 | pushing to http://localhost:$HGPORT2/ | |
523 | searching for changes |
|
523 | searching for changes | |
524 | abort: missing support for test:unknown |
|
524 | abort: missing support for test:unknown | |
525 | [255] |
|
525 | [255] | |
526 |
|
526 | |||
527 | Doing the actual push: race |
|
527 | Doing the actual push: race | |
528 |
|
528 | |||
529 | $ cat << EOF >> $HGRCPATH |
|
529 | $ cat << EOF >> $HGRCPATH | |
530 | > [failpush] |
|
530 | > [failpush] | |
531 | > reason = race |
|
531 | > reason = race | |
532 | > EOF |
|
532 | > EOF | |
533 |
|
533 | |||
534 | $ hg -R main push other -r e7ec4e813ba6 |
|
534 | $ hg -R main push other -r e7ec4e813ba6 | |
535 | pushing to other |
|
535 | pushing to other | |
536 | searching for changes |
|
536 | searching for changes | |
537 | abort: push failed: |
|
537 | abort: push failed: | |
538 | 'repository changed while pushing - please try again' |
|
538 | 'repository changed while pushing - please try again' | |
539 | [255] |
|
539 | [255] | |
540 |
|
540 | |||
541 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
541 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
542 | pushing to ssh://user@dummy/other |
|
542 | pushing to ssh://user@dummy/other | |
543 | searching for changes |
|
543 | searching for changes | |
544 | abort: push failed: |
|
544 | abort: push failed: | |
545 | 'repository changed while pushing - please try again' |
|
545 | 'repository changed while pushing - please try again' | |
546 | [255] |
|
546 | [255] | |
547 |
|
547 | |||
548 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
548 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
549 | pushing to http://localhost:$HGPORT2/ |
|
549 | pushing to http://localhost:$HGPORT2/ | |
550 | searching for changes |
|
550 | searching for changes | |
551 | abort: push failed: |
|
551 | abort: push failed: | |
552 | 'repository changed while pushing - please try again' |
|
552 | 'repository changed while pushing - please try again' | |
553 | [255] |
|
553 | [255] | |
554 |
|
554 | |||
555 | Doing the actual push: hook abort |
|
555 | Doing the actual push: hook abort | |
556 |
|
556 | |||
557 | $ cat << EOF >> $HGRCPATH |
|
557 | $ cat << EOF >> $HGRCPATH | |
558 | > [failpush] |
|
558 | > [failpush] | |
559 | > reason = |
|
559 | > reason = | |
560 | > [hooks] |
|
560 | > [hooks] | |
561 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" |
|
561 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" | |
562 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" |
|
562 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" | |
563 | > EOF |
|
563 | > EOF | |
564 |
|
564 | |||
565 | $ killdaemons.py |
|
565 | $ killdaemons.py | |
566 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
566 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
567 | $ cat other.pid >> $DAEMON_PIDS |
|
567 | $ cat other.pid >> $DAEMON_PIDS | |
568 |
|
568 | |||
569 | $ hg -R main push other -r e7ec4e813ba6 |
|
569 | $ hg -R main push other -r e7ec4e813ba6 | |
570 | pushing to other |
|
570 | pushing to other | |
571 | searching for changes |
|
571 | searching for changes | |
572 | remote: adding changesets |
|
572 | remote: adding changesets | |
573 | remote: adding manifests |
|
573 | remote: adding manifests | |
574 | remote: adding file changes |
|
574 | remote: adding file changes | |
575 | remote: added 1 changesets with 1 changes to 1 files |
|
575 | remote: added 1 changesets with 1 changes to 1 files | |
576 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
576 | remote: pre-close-tip:e7ec4e813ba6 draft | |
577 | remote: You shall not pass! |
|
577 | remote: You shall not pass! | |
578 | remote: transaction abort! |
|
578 | remote: transaction abort! | |
579 | remote: Cleaning up the mess... |
|
579 | remote: Cleaning up the mess... | |
580 | remote: rollback completed |
|
580 | remote: rollback completed | |
581 | abort: pretxnclose.failpush hook exited with status 1 |
|
581 | abort: pretxnclose.failpush hook exited with status 1 | |
582 | [255] |
|
582 | [255] | |
583 |
|
583 | |||
584 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
584 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
585 | pushing to ssh://user@dummy/other |
|
585 | pushing to ssh://user@dummy/other | |
586 | searching for changes |
|
586 | searching for changes | |
587 | remote: adding changesets |
|
587 | remote: adding changesets | |
588 | remote: adding manifests |
|
588 | remote: adding manifests | |
589 | remote: adding file changes |
|
589 | remote: adding file changes | |
590 | remote: added 1 changesets with 1 changes to 1 files |
|
590 | remote: added 1 changesets with 1 changes to 1 files | |
591 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
591 | remote: pre-close-tip:e7ec4e813ba6 draft | |
592 | remote: You shall not pass! |
|
592 | remote: You shall not pass! | |
593 | remote: transaction abort! |
|
593 | remote: transaction abort! | |
594 | remote: Cleaning up the mess... |
|
594 | remote: Cleaning up the mess... | |
595 | remote: rollback completed |
|
595 | remote: rollback completed | |
596 | abort: pretxnclose.failpush hook exited with status 1 |
|
596 | abort: pretxnclose.failpush hook exited with status 1 | |
597 | [255] |
|
597 | [255] | |
598 |
|
598 | |||
599 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
599 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
600 | pushing to http://localhost:$HGPORT2/ |
|
600 | pushing to http://localhost:$HGPORT2/ | |
601 | searching for changes |
|
601 | searching for changes | |
602 | remote: adding changesets |
|
602 | remote: adding changesets | |
603 | remote: adding manifests |
|
603 | remote: adding manifests | |
604 | remote: adding file changes |
|
604 | remote: adding file changes | |
605 | remote: added 1 changesets with 1 changes to 1 files |
|
605 | remote: added 1 changesets with 1 changes to 1 files | |
606 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
606 | remote: pre-close-tip:e7ec4e813ba6 draft | |
607 | remote: You shall not pass! |
|
607 | remote: You shall not pass! | |
608 | remote: transaction abort! |
|
608 | remote: transaction abort! | |
609 | remote: Cleaning up the mess... |
|
609 | remote: Cleaning up the mess... | |
610 | remote: rollback completed |
|
610 | remote: rollback completed | |
611 | abort: pretxnclose.failpush hook exited with status 1 |
|
611 | abort: pretxnclose.failpush hook exited with status 1 | |
612 | [255] |
|
612 | [255] | |
613 |
|
613 | |||
614 | (check that no 'pending' files remain) |
|
614 | (check that no 'pending' files remain) | |
615 |
|
615 | |||
616 | $ ls -1 other/.hg/bookmarks* |
|
616 | $ ls -1 other/.hg/bookmarks* | |
617 | other/.hg/bookmarks |
|
617 | other/.hg/bookmarks | |
618 | $ ls -1 other/.hg/store/phaseroots* |
|
618 | $ ls -1 other/.hg/store/phaseroots* | |
619 | other/.hg/store/phaseroots |
|
619 | other/.hg/store/phaseroots | |
620 | $ ls -1 other/.hg/store/00changelog.i* |
|
620 | $ ls -1 other/.hg/store/00changelog.i* | |
621 | other/.hg/store/00changelog.i |
|
621 | other/.hg/store/00changelog.i | |
622 |
|
622 | |||
623 | Check error from hook during the unbundling process itself |
|
623 | Check error from hook during the unbundling process itself | |
624 |
|
624 | |||
625 | $ cat << EOF >> $HGRCPATH |
|
625 | $ cat << EOF >> $HGRCPATH | |
626 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" |
|
626 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" | |
627 | > EOF |
|
627 | > EOF | |
628 | $ killdaemons.py # reload http config |
|
628 | $ killdaemons.py # reload http config | |
629 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
629 | $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
630 | $ cat other.pid >> $DAEMON_PIDS |
|
630 | $ cat other.pid >> $DAEMON_PIDS | |
631 |
|
631 | |||
632 | $ hg -R main push other -r e7ec4e813ba6 |
|
632 | $ hg -R main push other -r e7ec4e813ba6 | |
633 | pushing to other |
|
633 | pushing to other | |
634 | searching for changes |
|
634 | searching for changes | |
635 | remote: adding changesets |
|
635 | remote: adding changesets | |
636 | remote: adding manifests |
|
636 | remote: adding manifests | |
637 | remote: adding file changes |
|
637 | remote: adding file changes | |
638 | remote: added 1 changesets with 1 changes to 1 files |
|
638 | remote: added 1 changesets with 1 changes to 1 files | |
639 | remote: Fail early! |
|
639 | remote: Fail early! | |
640 | remote: transaction abort! |
|
640 | remote: transaction abort! | |
641 | remote: Cleaning up the mess... |
|
641 | remote: Cleaning up the mess... | |
642 | remote: rollback completed |
|
642 | remote: rollback completed | |
643 | abort: pretxnchangegroup hook exited with status 1 |
|
643 | abort: pretxnchangegroup hook exited with status 1 | |
644 | [255] |
|
644 | [255] | |
645 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
645 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
646 | pushing to ssh://user@dummy/other |
|
646 | pushing to ssh://user@dummy/other | |
647 | searching for changes |
|
647 | searching for changes | |
648 | remote: adding changesets |
|
648 | remote: adding changesets | |
649 | remote: adding manifests |
|
649 | remote: adding manifests | |
650 | remote: adding file changes |
|
650 | remote: adding file changes | |
651 | remote: added 1 changesets with 1 changes to 1 files |
|
651 | remote: added 1 changesets with 1 changes to 1 files | |
652 | remote: Fail early! |
|
652 | remote: Fail early! | |
653 | remote: transaction abort! |
|
653 | remote: transaction abort! | |
654 | remote: Cleaning up the mess... |
|
654 | remote: Cleaning up the mess... | |
655 | remote: rollback completed |
|
655 | remote: rollback completed | |
656 | abort: pretxnchangegroup hook exited with status 1 |
|
656 | abort: pretxnchangegroup hook exited with status 1 | |
657 | [255] |
|
657 | [255] | |
658 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
658 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
659 | pushing to http://localhost:$HGPORT2/ |
|
659 | pushing to http://localhost:$HGPORT2/ | |
660 | searching for changes |
|
660 | searching for changes | |
661 | remote: adding changesets |
|
661 | remote: adding changesets | |
662 | remote: adding manifests |
|
662 | remote: adding manifests | |
663 | remote: adding file changes |
|
663 | remote: adding file changes | |
664 | remote: added 1 changesets with 1 changes to 1 files |
|
664 | remote: added 1 changesets with 1 changes to 1 files | |
665 | remote: Fail early! |
|
665 | remote: Fail early! | |
666 | remote: transaction abort! |
|
666 | remote: transaction abort! | |
667 | remote: Cleaning up the mess... |
|
667 | remote: Cleaning up the mess... | |
668 | remote: rollback completed |
|
668 | remote: rollback completed | |
669 | abort: pretxnchangegroup hook exited with status 1 |
|
669 | abort: pretxnchangegroup hook exited with status 1 | |
670 | [255] |
|
670 | [255] | |
671 |
|
671 | |||
672 | Check output capture control. |
|
672 | Check output capture control. | |
673 |
|
673 | |||
674 | (should be still forced for http, disabled for local and ssh) |
|
674 | (should be still forced for http, disabled for local and ssh) | |
675 |
|
675 | |||
676 | $ cat >> $HGRCPATH << EOF |
|
676 | $ cat >> $HGRCPATH << EOF | |
677 | > [experimental] |
|
677 | > [experimental] | |
678 | > bundle2-output-capture=False |
|
678 | > bundle2-output-capture=False | |
679 | > EOF |
|
679 | > EOF | |
680 |
|
680 | |||
681 | $ hg -R main push other -r e7ec4e813ba6 |
|
681 | $ hg -R main push other -r e7ec4e813ba6 | |
682 | pushing to other |
|
682 | pushing to other | |
683 | searching for changes |
|
683 | searching for changes | |
684 | adding changesets |
|
684 | adding changesets | |
685 | adding manifests |
|
685 | adding manifests | |
686 | adding file changes |
|
686 | adding file changes | |
687 | added 1 changesets with 1 changes to 1 files |
|
687 | added 1 changesets with 1 changes to 1 files | |
688 | Fail early! |
|
688 | Fail early! | |
689 | transaction abort! |
|
689 | transaction abort! | |
690 | Cleaning up the mess... |
|
690 | Cleaning up the mess... | |
691 | rollback completed |
|
691 | rollback completed | |
692 | abort: pretxnchangegroup hook exited with status 1 |
|
692 | abort: pretxnchangegroup hook exited with status 1 | |
693 | [255] |
|
693 | [255] | |
694 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
694 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
695 | pushing to ssh://user@dummy/other |
|
695 | pushing to ssh://user@dummy/other | |
696 | searching for changes |
|
696 | searching for changes | |
697 | remote: adding changesets |
|
697 | remote: adding changesets | |
698 | remote: adding manifests |
|
698 | remote: adding manifests | |
699 | remote: adding file changes |
|
699 | remote: adding file changes | |
700 | remote: added 1 changesets with 1 changes to 1 files |
|
700 | remote: added 1 changesets with 1 changes to 1 files | |
701 | remote: Fail early! |
|
701 | remote: Fail early! | |
702 | remote: transaction abort! |
|
702 | remote: transaction abort! | |
703 | remote: Cleaning up the mess... |
|
703 | remote: Cleaning up the mess... | |
704 | remote: rollback completed |
|
704 | remote: rollback completed | |
705 | abort: pretxnchangegroup hook exited with status 1 |
|
705 | abort: pretxnchangegroup hook exited with status 1 | |
706 | [255] |
|
706 | [255] | |
707 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
707 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
708 | pushing to http://localhost:$HGPORT2/ |
|
708 | pushing to http://localhost:$HGPORT2/ | |
709 | searching for changes |
|
709 | searching for changes | |
710 | remote: adding changesets |
|
710 | remote: adding changesets | |
711 | remote: adding manifests |
|
711 | remote: adding manifests | |
712 | remote: adding file changes |
|
712 | remote: adding file changes | |
713 | remote: added 1 changesets with 1 changes to 1 files |
|
713 | remote: added 1 changesets with 1 changes to 1 files | |
714 | remote: Fail early! |
|
714 | remote: Fail early! | |
715 | remote: transaction abort! |
|
715 | remote: transaction abort! | |
716 | remote: Cleaning up the mess... |
|
716 | remote: Cleaning up the mess... | |
717 | remote: rollback completed |
|
717 | remote: rollback completed | |
718 | abort: pretxnchangegroup hook exited with status 1 |
|
718 | abort: pretxnchangegroup hook exited with status 1 | |
719 | [255] |
|
719 | [255] |
@@ -1,261 +1,261 b'' | |||||
1 | Create an extension to test bundle2 with multiple changegroups |
|
1 | Create an extension to test bundle2 with multiple changegroups | |
2 |
|
2 | |||
3 | $ cat > bundle2.py <<EOF |
|
3 | $ cat > bundle2.py <<EOF | |
4 | > """ |
|
4 | > """ | |
5 | > """ |
|
5 | > """ | |
6 | > from mercurial import changegroup, exchange |
|
6 | > from mercurial import changegroup, exchange | |
7 | > |
|
7 | > | |
8 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, |
|
8 | > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None, | |
9 | > b2caps=None, heads=None, common=None, |
|
9 | > b2caps=None, heads=None, common=None, | |
10 | > **kwargs): |
|
10 | > **kwargs): | |
11 | > # Create two changegroups given the common changesets and heads for the |
|
11 | > # Create two changegroups given the common changesets and heads for the | |
12 | > # changegroup part we are being requested. Use the parent of each head |
|
12 | > # changegroup part we are being requested. Use the parent of each head | |
13 | > # in 'heads' as intermediate heads for the first changegroup. |
|
13 | > # in 'heads' as intermediate heads for the first changegroup. | |
14 | > intermediates = [repo[r].p1().node() for r in heads] |
|
14 | > intermediates = [repo[r].p1().node() for r in heads] | |
15 | > cg = changegroup.getchangegroup(repo, source, heads=intermediates, |
|
15 | > cg = changegroup.getchangegroup(repo, source, heads=intermediates, | |
16 | > common=common, bundlecaps=bundlecaps) |
|
16 | > common=common, bundlecaps=bundlecaps) | |
17 | > bundler.newpart('output', data='changegroup1') |
|
17 | > bundler.newpart('output', data='changegroup1') | |
18 | > bundler.newpart('changegroup', data=cg.getchunks()) |
|
18 | > bundler.newpart('changegroup', data=cg.getchunks()) | |
19 | > cg = changegroup.getchangegroup(repo, source, heads=heads, |
|
19 | > cg = changegroup.getchangegroup(repo, source, heads=heads, | |
20 | > common=common + intermediates, |
|
20 | > common=common + intermediates, | |
21 | > bundlecaps=bundlecaps) |
|
21 | > bundlecaps=bundlecaps) | |
22 | > bundler.newpart('output', data='changegroup2') |
|
22 | > bundler.newpart('output', data='changegroup2') | |
23 | > bundler.newpart('changegroup', data=cg.getchunks()) |
|
23 | > bundler.newpart('changegroup', data=cg.getchunks()) | |
24 | > |
|
24 | > | |
25 | > def _pull(repo, *args, **kwargs): |
|
25 | > def _pull(repo, *args, **kwargs): | |
26 | > pullop = _orig_pull(repo, *args, **kwargs) |
|
26 | > pullop = _orig_pull(repo, *args, **kwargs) | |
27 | > repo.ui.write('pullop.cgresult is %d\n' % pullop.cgresult) |
|
27 | > repo.ui.write('pullop.cgresult is %d\n' % pullop.cgresult) | |
28 | > return pullop |
|
28 | > return pullop | |
29 | > |
|
29 | > | |
30 | > _orig_pull = exchange.pull |
|
30 | > _orig_pull = exchange.pull | |
31 | > exchange.pull = _pull |
|
31 | > exchange.pull = _pull | |
32 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart |
|
32 | > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | $ cat >> $HGRCPATH << EOF |
|
35 | $ cat >> $HGRCPATH << EOF | |
36 | > [experimental] |
|
36 | > [experimental] | |
37 | > bundle2-exp=True |
|
37 | > bundle2-exp=True | |
38 | > [ui] |
|
38 | > [ui] | |
39 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
39 | > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
40 | > EOF |
|
40 | > EOF | |
41 |
|
41 | |||
42 | Start with a simple repository with a single commit |
|
42 | Start with a simple repository with a single commit | |
43 |
|
43 | |||
44 | $ hg init repo |
|
44 | $ hg init repo | |
45 | $ cd repo |
|
45 | $ cd repo | |
46 | $ cat > .hg/hgrc << EOF |
|
46 | $ cat > .hg/hgrc << EOF | |
47 | > [extensions] |
|
47 | > [extensions] | |
48 | > bundle2=$TESTTMP/bundle2.py |
|
48 | > bundle2=$TESTTMP/bundle2.py | |
49 | > EOF |
|
49 | > EOF | |
50 |
|
50 | |||
51 | $ echo A > A |
|
51 | $ echo A > A | |
52 | $ hg commit -A -m A -q |
|
52 | $ hg commit -A -m A -q | |
53 | $ cd .. |
|
53 | $ cd .. | |
54 |
|
54 | |||
55 | Clone |
|
55 | Clone | |
56 |
|
56 | |||
57 | $ hg clone -q repo clone |
|
57 | $ hg clone -q repo clone | |
58 |
|
58 | |||
59 | Add two linear commits |
|
59 | Add two linear commits | |
60 |
|
60 | |||
61 | $ cd repo |
|
61 | $ cd repo | |
62 | $ echo B > B |
|
62 | $ echo B > B | |
63 | $ hg commit -A -m B -q |
|
63 | $ hg commit -A -m B -q | |
64 | $ echo C > C |
|
64 | $ echo C > C | |
65 | $ hg commit -A -m C -q |
|
65 | $ hg commit -A -m C -q | |
66 |
|
66 | |||
67 | $ cd ../clone |
|
67 | $ cd ../clone | |
68 | $ cat >> .hg/hgrc <<EOF |
|
68 | $ cat >> .hg/hgrc <<EOF | |
69 | > [hooks] |
|
69 | > [hooks] | |
70 |
> pretxnchangegroup = sh -c " |
|
70 | > pretxnchangegroup = sh -c "printenv.py pretxnchangegroup" | |
71 |
> changegroup = sh -c " |
|
71 | > changegroup = sh -c "printenv.py changegroup" | |
72 |
> incoming = sh -c " |
|
72 | > incoming = sh -c "printenv.py incoming" | |
73 | > EOF |
|
73 | > EOF | |
74 |
|
74 | |||
75 | Pull the new commits in the clone |
|
75 | Pull the new commits in the clone | |
76 |
|
76 | |||
77 | $ hg pull |
|
77 | $ hg pull | |
78 | pulling from $TESTTMP/repo (glob) |
|
78 | pulling from $TESTTMP/repo (glob) | |
79 | searching for changes |
|
79 | searching for changes | |
80 | remote: changegroup1 |
|
80 | remote: changegroup1 | |
81 | adding changesets |
|
81 | adding changesets | |
82 | adding manifests |
|
82 | adding manifests | |
83 | adding file changes |
|
83 | adding file changes | |
84 | added 1 changesets with 1 changes to 1 files |
|
84 | added 1 changesets with 1 changes to 1 files | |
85 | pretxnchangegroup hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
85 | pretxnchangegroup hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
86 | remote: changegroup2 |
|
86 | remote: changegroup2 | |
87 | adding changesets |
|
87 | adding changesets | |
88 | adding manifests |
|
88 | adding manifests | |
89 | adding file changes |
|
89 | adding file changes | |
90 | added 1 changesets with 1 changes to 1 files |
|
90 | added 1 changesets with 1 changes to 1 files | |
91 | pretxnchangegroup hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
91 | pretxnchangegroup hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
92 | changegroup hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
92 | changegroup hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
93 | incoming hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
93 | incoming hook: HG_NODE=27547f69f25460a52fff66ad004e58da7ad3fb56 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
94 | changegroup hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
94 | changegroup hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
95 | incoming hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
95 | incoming hook: HG_NODE=f838bfaca5c7226600ebcfd84f3c3c13a28d3757 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
96 | pullop.cgresult is 1 |
|
96 | pullop.cgresult is 1 | |
97 | (run 'hg update' to get a working copy) |
|
97 | (run 'hg update' to get a working copy) | |
98 | $ hg update |
|
98 | $ hg update | |
99 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 | $ hg log -G |
|
100 | $ hg log -G | |
101 | @ 2:f838bfaca5c7 public test C |
|
101 | @ 2:f838bfaca5c7 public test C | |
102 | | |
|
102 | | | |
103 | o 1:27547f69f254 public test B |
|
103 | o 1:27547f69f254 public test B | |
104 | | |
|
104 | | | |
105 | o 0:4a2df7238c3b public test A |
|
105 | o 0:4a2df7238c3b public test A | |
106 |
|
106 | |||
107 | Add more changesets with multiple heads to the original repository |
|
107 | Add more changesets with multiple heads to the original repository | |
108 |
|
108 | |||
109 | $ cd ../repo |
|
109 | $ cd ../repo | |
110 | $ echo D > D |
|
110 | $ echo D > D | |
111 | $ hg commit -A -m D -q |
|
111 | $ hg commit -A -m D -q | |
112 | $ hg up -r 1 |
|
112 | $ hg up -r 1 | |
113 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
113 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
114 | $ echo E > E |
|
114 | $ echo E > E | |
115 | $ hg commit -A -m E -q |
|
115 | $ hg commit -A -m E -q | |
116 | $ echo F > F |
|
116 | $ echo F > F | |
117 | $ hg commit -A -m F -q |
|
117 | $ hg commit -A -m F -q | |
118 | $ hg up -r 1 |
|
118 | $ hg up -r 1 | |
119 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
119 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
120 | $ echo G > G |
|
120 | $ echo G > G | |
121 | $ hg commit -A -m G -q |
|
121 | $ hg commit -A -m G -q | |
122 | $ hg up -r 3 |
|
122 | $ hg up -r 3 | |
123 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
123 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
124 | $ echo H > H |
|
124 | $ echo H > H | |
125 | $ hg commit -A -m H -q |
|
125 | $ hg commit -A -m H -q | |
126 | $ hg log -G |
|
126 | $ hg log -G | |
127 | @ 7:5cd59d311f65 draft test H |
|
127 | @ 7:5cd59d311f65 draft test H | |
128 | | |
|
128 | | | |
129 | | o 6:1d14c3ce6ac0 draft test G |
|
129 | | o 6:1d14c3ce6ac0 draft test G | |
130 | | | |
|
130 | | | | |
131 | | | o 5:7f219660301f draft test F |
|
131 | | | o 5:7f219660301f draft test F | |
132 | | | | |
|
132 | | | | | |
133 | | | o 4:8a5212ebc852 draft test E |
|
133 | | | o 4:8a5212ebc852 draft test E | |
134 | | |/ |
|
134 | | |/ | |
135 | o | 3:b3325c91a4d9 draft test D |
|
135 | o | 3:b3325c91a4d9 draft test D | |
136 | | | |
|
136 | | | | |
137 | o | 2:f838bfaca5c7 draft test C |
|
137 | o | 2:f838bfaca5c7 draft test C | |
138 | |/ |
|
138 | |/ | |
139 | o 1:27547f69f254 draft test B |
|
139 | o 1:27547f69f254 draft test B | |
140 | | |
|
140 | | | |
141 | o 0:4a2df7238c3b draft test A |
|
141 | o 0:4a2df7238c3b draft test A | |
142 |
|
142 | |||
143 | New heads are reported during transfer and properly accounted for in |
|
143 | New heads are reported during transfer and properly accounted for in | |
144 | pullop.cgresult |
|
144 | pullop.cgresult | |
145 |
|
145 | |||
146 | $ cd ../clone |
|
146 | $ cd ../clone | |
147 | $ hg pull |
|
147 | $ hg pull | |
148 | pulling from $TESTTMP/repo (glob) |
|
148 | pulling from $TESTTMP/repo (glob) | |
149 | searching for changes |
|
149 | searching for changes | |
150 | remote: changegroup1 |
|
150 | remote: changegroup1 | |
151 | adding changesets |
|
151 | adding changesets | |
152 | adding manifests |
|
152 | adding manifests | |
153 | adding file changes |
|
153 | adding file changes | |
154 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
154 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
155 | pretxnchangegroup hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
155 | pretxnchangegroup hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
156 | remote: changegroup2 |
|
156 | remote: changegroup2 | |
157 | adding changesets |
|
157 | adding changesets | |
158 | adding manifests |
|
158 | adding manifests | |
159 | adding file changes |
|
159 | adding file changes | |
160 | added 3 changesets with 3 changes to 3 files (+1 heads) |
|
160 | added 3 changesets with 3 changes to 3 files (+1 heads) | |
161 | pretxnchangegroup hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
161 | pretxnchangegroup hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
162 | changegroup hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
162 | changegroup hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
163 | incoming hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
163 | incoming hook: HG_NODE=b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
164 | incoming hook: HG_NODE=8a5212ebc8527f9fb821601504794e3eb11a1ed3 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
164 | incoming hook: HG_NODE=8a5212ebc8527f9fb821601504794e3eb11a1ed3 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
165 | changegroup hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
165 | changegroup hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
166 | incoming hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
166 | incoming hook: HG_NODE=7f219660301fe4c8a116f714df5e769695cc2b46 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
167 | incoming hook: HG_NODE=1d14c3ce6ac0582d2809220d33e8cd7a696e0156 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
167 | incoming hook: HG_NODE=1d14c3ce6ac0582d2809220d33e8cd7a696e0156 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
168 | incoming hook: HG_NODE=5cd59d311f6508b8e0ed28a266756c859419c9f1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
168 | incoming hook: HG_NODE=5cd59d311f6508b8e0ed28a266756c859419c9f1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
169 | pullop.cgresult is 3 |
|
169 | pullop.cgresult is 3 | |
170 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
170 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
171 | $ hg log -G |
|
171 | $ hg log -G | |
172 | o 7:5cd59d311f65 public test H |
|
172 | o 7:5cd59d311f65 public test H | |
173 | | |
|
173 | | | |
174 | | o 6:1d14c3ce6ac0 public test G |
|
174 | | o 6:1d14c3ce6ac0 public test G | |
175 | | | |
|
175 | | | | |
176 | | | o 5:7f219660301f public test F |
|
176 | | | o 5:7f219660301f public test F | |
177 | | | | |
|
177 | | | | | |
178 | | | o 4:8a5212ebc852 public test E |
|
178 | | | o 4:8a5212ebc852 public test E | |
179 | | |/ |
|
179 | | |/ | |
180 | o | 3:b3325c91a4d9 public test D |
|
180 | o | 3:b3325c91a4d9 public test D | |
181 | | | |
|
181 | | | | |
182 | @ | 2:f838bfaca5c7 public test C |
|
182 | @ | 2:f838bfaca5c7 public test C | |
183 | |/ |
|
183 | |/ | |
184 | o 1:27547f69f254 public test B |
|
184 | o 1:27547f69f254 public test B | |
185 | | |
|
185 | | | |
186 | o 0:4a2df7238c3b public test A |
|
186 | o 0:4a2df7238c3b public test A | |
187 |
|
187 | |||
188 | Removing a head from the original repository by merging it |
|
188 | Removing a head from the original repository by merging it | |
189 |
|
189 | |||
190 | $ cd ../repo |
|
190 | $ cd ../repo | |
191 | $ hg merge -r 6 -q |
|
191 | $ hg merge -r 6 -q | |
192 | $ hg commit -m Merge |
|
192 | $ hg commit -m Merge | |
193 | $ echo I > I |
|
193 | $ echo I > I | |
194 | $ hg commit -A -m H -q |
|
194 | $ hg commit -A -m H -q | |
195 | $ hg log -G |
|
195 | $ hg log -G | |
196 | @ 9:9d18e5bd9ab0 draft test H |
|
196 | @ 9:9d18e5bd9ab0 draft test H | |
197 | | |
|
197 | | | |
198 | o 8:71bd7b46de72 draft test Merge |
|
198 | o 8:71bd7b46de72 draft test Merge | |
199 | |\ |
|
199 | |\ | |
200 | | o 7:5cd59d311f65 draft test H |
|
200 | | o 7:5cd59d311f65 draft test H | |
201 | | | |
|
201 | | | | |
202 | o | 6:1d14c3ce6ac0 draft test G |
|
202 | o | 6:1d14c3ce6ac0 draft test G | |
203 | | | |
|
203 | | | | |
204 | | | o 5:7f219660301f draft test F |
|
204 | | | o 5:7f219660301f draft test F | |
205 | | | | |
|
205 | | | | | |
206 | +---o 4:8a5212ebc852 draft test E |
|
206 | +---o 4:8a5212ebc852 draft test E | |
207 | | | |
|
207 | | | | |
208 | | o 3:b3325c91a4d9 draft test D |
|
208 | | o 3:b3325c91a4d9 draft test D | |
209 | | | |
|
209 | | | | |
210 | | o 2:f838bfaca5c7 draft test C |
|
210 | | o 2:f838bfaca5c7 draft test C | |
211 | |/ |
|
211 | |/ | |
212 | o 1:27547f69f254 draft test B |
|
212 | o 1:27547f69f254 draft test B | |
213 | | |
|
213 | | | |
214 | o 0:4a2df7238c3b draft test A |
|
214 | o 0:4a2df7238c3b draft test A | |
215 |
|
215 | |||
216 | Removed heads are reported during transfer and properly accounted for in |
|
216 | Removed heads are reported during transfer and properly accounted for in | |
217 | pullop.cgresult |
|
217 | pullop.cgresult | |
218 |
|
218 | |||
219 | $ cd ../clone |
|
219 | $ cd ../clone | |
220 | $ hg pull |
|
220 | $ hg pull | |
221 | pulling from $TESTTMP/repo (glob) |
|
221 | pulling from $TESTTMP/repo (glob) | |
222 | searching for changes |
|
222 | searching for changes | |
223 | remote: changegroup1 |
|
223 | remote: changegroup1 | |
224 | adding changesets |
|
224 | adding changesets | |
225 | adding manifests |
|
225 | adding manifests | |
226 | adding file changes |
|
226 | adding file changes | |
227 | added 1 changesets with 0 changes to 0 files (-1 heads) |
|
227 | added 1 changesets with 0 changes to 0 files (-1 heads) | |
228 | pretxnchangegroup hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
228 | pretxnchangegroup hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_PENDING=$TESTTMP/clone HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
229 | remote: changegroup2 |
|
229 | remote: changegroup2 | |
230 | adding changesets |
|
230 | adding changesets | |
231 | adding manifests |
|
231 | adding manifests | |
232 | adding file changes |
|
232 | adding file changes | |
233 | added 1 changesets with 1 changes to 1 files |
|
233 | added 1 changesets with 1 changes to 1 files | |
234 | pretxnchangegroup hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
234 | pretxnchangegroup hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PENDING=$TESTTMP/clone HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
235 | changegroup hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
235 | changegroup hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
236 | incoming hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
236 | incoming hook: HG_NODE=71bd7b46de72e69a32455bf88d04757d542e6cf4 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
237 | changegroup hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
237 | changegroup hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
238 | incoming hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) |
|
238 | incoming hook: HG_NODE=9d18e5bd9ab09337802595d49f1dad0c98df4d84 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/repo (glob) | |
239 | pullop.cgresult is -2 |
|
239 | pullop.cgresult is -2 | |
240 | (run 'hg update' to get a working copy) |
|
240 | (run 'hg update' to get a working copy) | |
241 | $ hg log -G |
|
241 | $ hg log -G | |
242 | o 9:9d18e5bd9ab0 public test H |
|
242 | o 9:9d18e5bd9ab0 public test H | |
243 | | |
|
243 | | | |
244 | o 8:71bd7b46de72 public test Merge |
|
244 | o 8:71bd7b46de72 public test Merge | |
245 | |\ |
|
245 | |\ | |
246 | | o 7:5cd59d311f65 public test H |
|
246 | | o 7:5cd59d311f65 public test H | |
247 | | | |
|
247 | | | | |
248 | o | 6:1d14c3ce6ac0 public test G |
|
248 | o | 6:1d14c3ce6ac0 public test G | |
249 | | | |
|
249 | | | | |
250 | | | o 5:7f219660301f public test F |
|
250 | | | o 5:7f219660301f public test F | |
251 | | | | |
|
251 | | | | | |
252 | +---o 4:8a5212ebc852 public test E |
|
252 | +---o 4:8a5212ebc852 public test E | |
253 | | | |
|
253 | | | | |
254 | | o 3:b3325c91a4d9 public test D |
|
254 | | o 3:b3325c91a4d9 public test D | |
255 | | | |
|
255 | | | | |
256 | | @ 2:f838bfaca5c7 public test C |
|
256 | | @ 2:f838bfaca5c7 public test C | |
257 | |/ |
|
257 | |/ | |
258 | o 1:27547f69f254 public test B |
|
258 | o 1:27547f69f254 public test B | |
259 | | |
|
259 | | | |
260 | o 0:4a2df7238c3b public test A |
|
260 | o 0:4a2df7238c3b public test A | |
261 |
|
261 |
@@ -1,707 +1,707 b'' | |||||
1 | commit hooks can see env vars |
|
1 | commit hooks can see env vars | |
2 | (and post-transaction one are run unlocked) |
|
2 | (and post-transaction one are run unlocked) | |
3 |
|
3 | |||
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > # drop me once bundle2 is the default, |
|
6 | > # drop me once bundle2 is the default, | |
7 | > # added to get test change early. |
|
7 | > # added to get test change early. | |
8 | > bundle2-exp = True |
|
8 | > bundle2-exp = True | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ cat > $TESTTMP/txnabort.checkargs.py <<EOF |
|
11 | $ cat > $TESTTMP/txnabort.checkargs.py <<EOF | |
12 | > def showargs(ui, repo, hooktype, **kwargs): |
|
12 | > def showargs(ui, repo, hooktype, **kwargs): | |
13 | > ui.write('%s python hook: %s\n' % (hooktype, ','.join(sorted(kwargs)))) |
|
13 | > ui.write('%s python hook: %s\n' % (hooktype, ','.join(sorted(kwargs)))) | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ hg init a |
|
16 | $ hg init a | |
17 | $ cd a |
|
17 | $ cd a | |
18 | $ cat > .hg/hgrc <<EOF |
|
18 | $ cat > .hg/hgrc <<EOF | |
19 | > [hooks] |
|
19 | > [hooks] | |
20 |
> commit = sh -c "HG_LOCAL= HG_TAG= p |
|
20 | > commit = sh -c "HG_LOCAL= HG_TAG= printenv.py commit" | |
21 |
> commit.b = sh -c "HG_LOCAL= HG_TAG= p |
|
21 | > commit.b = sh -c "HG_LOCAL= HG_TAG= printenv.py commit.b" | |
22 |
> precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= p |
|
22 | > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit" | |
23 |
> pretxncommit = sh -c "HG_LOCAL= HG_TAG= p |
|
23 | > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit" | |
24 | > pretxncommit.tip = hg -q tip |
|
24 | > pretxncommit.tip = hg -q tip | |
25 |
> pre-identify = |
|
25 | > pre-identify = printenv.py pre-identify 1 | |
26 |
> pre-cat = |
|
26 | > pre-cat = printenv.py pre-cat | |
27 |
> post-cat = |
|
27 | > post-cat = printenv.py post-cat | |
28 |
> pretxnopen = sh -c "HG_LOCAL= HG_TAG= p |
|
28 | > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen" | |
29 |
> pretxnclose = sh -c "HG_LOCAL= HG_TAG= p |
|
29 | > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose" | |
30 |
> txnclose = sh -c "HG_LOCAL= HG_TAG= p |
|
30 | > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose" | |
31 | > txnabort.0 = python:$TESTTMP/txnabort.checkargs.py:showargs |
|
31 | > txnabort.0 = python:$TESTTMP/txnabort.checkargs.py:showargs | |
32 |
> txnabort.1 = sh -c "HG_LOCAL= HG_TAG= p |
|
32 | > txnabort.1 = sh -c "HG_LOCAL= HG_TAG= printenv.py txnabort" | |
33 | > txnclose.checklock = sh -c "hg debuglock > /dev/null" |
|
33 | > txnclose.checklock = sh -c "hg debuglock > /dev/null" | |
34 | > EOF |
|
34 | > EOF | |
35 | $ echo a > a |
|
35 | $ echo a > a | |
36 | $ hg add a |
|
36 | $ hg add a | |
37 | $ hg commit -m a |
|
37 | $ hg commit -m a | |
38 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 |
|
38 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 | |
39 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
39 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
40 | pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a |
|
40 | pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a | |
41 | 0:cb9a9f314b8b |
|
41 | 0:cb9a9f314b8b | |
42 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
42 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
43 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
43 | txnclose hook: HG_PHASES_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
44 | commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 |
|
44 | commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
45 | commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 |
|
45 | commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 | |
46 |
|
46 | |||
47 | $ hg clone . ../b |
|
47 | $ hg clone . ../b | |
48 | updating to branch default |
|
48 | updating to branch default | |
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | $ cd ../b |
|
50 | $ cd ../b | |
51 |
|
51 | |||
52 | changegroup hooks can see env vars |
|
52 | changegroup hooks can see env vars | |
53 |
|
53 | |||
54 | $ cat > .hg/hgrc <<EOF |
|
54 | $ cat > .hg/hgrc <<EOF | |
55 | > [hooks] |
|
55 | > [hooks] | |
56 |
> prechangegroup = |
|
56 | > prechangegroup = printenv.py prechangegroup | |
57 |
> changegroup = |
|
57 | > changegroup = printenv.py changegroup | |
58 |
> incoming = |
|
58 | > incoming = printenv.py incoming | |
59 | > EOF |
|
59 | > EOF | |
60 |
|
60 | |||
61 | pretxncommit and commit hooks can see both parents of merge |
|
61 | pretxncommit and commit hooks can see both parents of merge | |
62 |
|
62 | |||
63 | $ cd ../a |
|
63 | $ cd ../a | |
64 | $ echo b >> a |
|
64 | $ echo b >> a | |
65 | $ hg commit -m a1 -d "1 0" |
|
65 | $ hg commit -m a1 -d "1 0" | |
66 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
66 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
67 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
67 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
68 | pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a |
|
68 | pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a | |
69 | 1:ab228980c14d |
|
69 | 1:ab228980c14d | |
70 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
70 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
71 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
71 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
72 | commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
72 | commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
73 | commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
73 | commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
74 | $ hg update -C 0 |
|
74 | $ hg update -C 0 | |
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 | $ echo b > b |
|
76 | $ echo b > b | |
77 | $ hg add b |
|
77 | $ hg add b | |
78 | $ hg commit -m b -d '1 0' |
|
78 | $ hg commit -m b -d '1 0' | |
79 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
79 | precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
80 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
80 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
81 | pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a |
|
81 | pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a | |
82 | 2:ee9deb46ab31 |
|
82 | 2:ee9deb46ab31 | |
83 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
83 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
84 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
84 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
85 | commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
85 | commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
86 | commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b |
|
86 | commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b | |
87 | created new head |
|
87 | created new head | |
88 | $ hg merge 1 |
|
88 | $ hg merge 1 | |
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
90 | (branch merge, don't forget to commit) |
|
90 | (branch merge, don't forget to commit) | |
91 | $ hg commit -m merge -d '2 0' |
|
91 | $ hg commit -m merge -d '2 0' | |
92 | precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd |
|
92 | precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
93 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
93 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
94 | pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a |
|
94 | pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a | |
95 | 3:07f3376c1e65 |
|
95 | 3:07f3376c1e65 | |
96 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
96 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
97 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
97 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
98 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd |
|
98 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
99 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd |
|
99 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
100 |
|
100 | |||
101 | test generic hooks |
|
101 | test generic hooks | |
102 |
|
102 | |||
103 | $ hg id |
|
103 | $ hg id | |
104 | pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[] |
|
104 | pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[] | |
105 | abort: pre-identify hook exited with status 1 |
|
105 | abort: pre-identify hook exited with status 1 | |
106 | [255] |
|
106 | [255] | |
107 | $ hg cat b |
|
107 | $ hg cat b | |
108 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] |
|
108 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] | |
109 | b |
|
109 | b | |
110 | post-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] HG_RESULT=0 |
|
110 | post-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] HG_RESULT=0 | |
111 |
|
111 | |||
112 | $ cd ../b |
|
112 | $ cd ../b | |
113 | $ hg pull ../a |
|
113 | $ hg pull ../a | |
114 | pulling from ../a |
|
114 | pulling from ../a | |
115 | searching for changes |
|
115 | searching for changes | |
116 | prechangegroup hook: HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
116 | prechangegroup hook: HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
117 | adding changesets |
|
117 | adding changesets | |
118 | adding manifests |
|
118 | adding manifests | |
119 | adding file changes |
|
119 | adding file changes | |
120 | added 3 changesets with 2 changes to 2 files |
|
120 | added 3 changesets with 2 changes to 2 files | |
121 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
121 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
122 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
122 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
123 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
123 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
124 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
124 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
125 | (run 'hg update' to get a working copy) |
|
125 | (run 'hg update' to get a working copy) | |
126 |
|
126 | |||
127 | tag hooks can see env vars |
|
127 | tag hooks can see env vars | |
128 |
|
128 | |||
129 | $ cd ../a |
|
129 | $ cd ../a | |
130 | $ cat >> .hg/hgrc <<EOF |
|
130 | $ cat >> .hg/hgrc <<EOF | |
131 |
> pretag = |
|
131 | > pretag = printenv.py pretag | |
132 |
> tag = sh -c "HG_PARENT1= HG_PARENT2= p |
|
132 | > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag" | |
133 | > EOF |
|
133 | > EOF | |
134 | $ hg tag -d '3 0' a |
|
134 | $ hg tag -d '3 0' a | |
135 | pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a |
|
135 | pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |
136 | precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
136 | precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
137 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
137 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
138 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a |
|
138 | pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a | |
139 | 4:539e4b31b6dc |
|
139 | 4:539e4b31b6dc | |
140 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
140 | pretxnclose hook: HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
141 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a |
|
141 | tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a | |
142 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
142 | txnclose hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
143 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
143 | commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
144 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 |
|
144 | commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 | |
145 | $ hg tag -l la |
|
145 | $ hg tag -l la | |
146 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
146 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
147 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
147 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
148 |
|
148 | |||
149 | pretag hook can forbid tagging |
|
149 | pretag hook can forbid tagging | |
150 |
|
150 | |||
151 |
$ echo "pretag.forbid = p |
|
151 | $ echo "pretag.forbid = printenv.py pretag.forbid 1" >> .hg/hgrc | |
152 | $ hg tag -d '4 0' fa |
|
152 | $ hg tag -d '4 0' fa | |
153 | pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa |
|
153 | pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
154 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa |
|
154 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
155 | abort: pretag.forbid hook exited with status 1 |
|
155 | abort: pretag.forbid hook exited with status 1 | |
156 | [255] |
|
156 | [255] | |
157 | $ hg tag -l fla |
|
157 | $ hg tag -l fla | |
158 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla |
|
158 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla | |
159 | pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla |
|
159 | pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla | |
160 | abort: pretag.forbid hook exited with status 1 |
|
160 | abort: pretag.forbid hook exited with status 1 | |
161 | [255] |
|
161 | [255] | |
162 |
|
162 | |||
163 | pretxncommit hook can see changeset, can roll back txn, changeset no |
|
163 | pretxncommit hook can see changeset, can roll back txn, changeset no | |
164 | more there after |
|
164 | more there after | |
165 |
|
165 | |||
166 | $ echo "pretxncommit.forbid0 = hg tip -q" >> .hg/hgrc |
|
166 | $ echo "pretxncommit.forbid0 = hg tip -q" >> .hg/hgrc | |
167 |
$ echo "pretxncommit.forbid1 = p |
|
167 | $ echo "pretxncommit.forbid1 = printenv.py pretxncommit.forbid 1" >> .hg/hgrc | |
168 | $ echo z > z |
|
168 | $ echo z > z | |
169 | $ hg add z |
|
169 | $ hg add z | |
170 | $ hg -q tip |
|
170 | $ hg -q tip | |
171 | 4:539e4b31b6dc |
|
171 | 4:539e4b31b6dc | |
172 | $ hg commit -m 'fail' -d '4 0' |
|
172 | $ hg commit -m 'fail' -d '4 0' | |
173 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
|
173 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
174 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
174 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
175 | pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a |
|
175 | pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a | |
176 | 5:6f611f8018c1 |
|
176 | 5:6f611f8018c1 | |
177 | 5:6f611f8018c1 |
|
177 | 5:6f611f8018c1 | |
178 | pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a |
|
178 | pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a | |
179 | transaction abort! |
|
179 | transaction abort! | |
180 | txnabort python hook: txnid,txnname |
|
180 | txnabort python hook: txnid,txnname | |
181 | txnabort hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) |
|
181 | txnabort hook: HG_TXNID=TXN:* HG_TXNNAME=commit (glob) | |
182 | rollback completed |
|
182 | rollback completed | |
183 | abort: pretxncommit.forbid1 hook exited with status 1 |
|
183 | abort: pretxncommit.forbid1 hook exited with status 1 | |
184 | [255] |
|
184 | [255] | |
185 | $ hg -q tip |
|
185 | $ hg -q tip | |
186 | 4:539e4b31b6dc |
|
186 | 4:539e4b31b6dc | |
187 |
|
187 | |||
188 | (Check that no 'changelog.i.a' file were left behind) |
|
188 | (Check that no 'changelog.i.a' file were left behind) | |
189 |
|
189 | |||
190 | $ ls -1 .hg/store/ |
|
190 | $ ls -1 .hg/store/ | |
191 | 00changelog.i |
|
191 | 00changelog.i | |
192 | 00manifest.i |
|
192 | 00manifest.i | |
193 | data |
|
193 | data | |
194 | fncache |
|
194 | fncache | |
195 | journal.phaseroots |
|
195 | journal.phaseroots | |
196 | phaseroots |
|
196 | phaseroots | |
197 | undo |
|
197 | undo | |
198 | undo.backup.fncache |
|
198 | undo.backup.fncache | |
199 | undo.backupfiles |
|
199 | undo.backupfiles | |
200 | undo.phaseroots |
|
200 | undo.phaseroots | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | precommit hook can prevent commit |
|
203 | precommit hook can prevent commit | |
204 |
|
204 | |||
205 |
$ echo "precommit.forbid = p |
|
205 | $ echo "precommit.forbid = printenv.py precommit.forbid 1" >> .hg/hgrc | |
206 | $ hg commit -m 'fail' -d '4 0' |
|
206 | $ hg commit -m 'fail' -d '4 0' | |
207 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
|
207 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
208 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
|
208 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
209 | abort: precommit.forbid hook exited with status 1 |
|
209 | abort: precommit.forbid hook exited with status 1 | |
210 | [255] |
|
210 | [255] | |
211 | $ hg -q tip |
|
211 | $ hg -q tip | |
212 | 4:539e4b31b6dc |
|
212 | 4:539e4b31b6dc | |
213 |
|
213 | |||
214 | preupdate hook can prevent update |
|
214 | preupdate hook can prevent update | |
215 |
|
215 | |||
216 |
$ echo "preupdate = p |
|
216 | $ echo "preupdate = printenv.py preupdate" >> .hg/hgrc | |
217 | $ hg update 1 |
|
217 | $ hg update 1 | |
218 | preupdate hook: HG_PARENT1=ab228980c14d |
|
218 | preupdate hook: HG_PARENT1=ab228980c14d | |
219 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
219 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
220 |
|
220 | |||
221 | update hook |
|
221 | update hook | |
222 |
|
222 | |||
223 |
$ echo "update = p |
|
223 | $ echo "update = printenv.py update" >> .hg/hgrc | |
224 | $ hg update |
|
224 | $ hg update | |
225 | preupdate hook: HG_PARENT1=539e4b31b6dc |
|
225 | preupdate hook: HG_PARENT1=539e4b31b6dc | |
226 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc |
|
226 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
227 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
227 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
228 |
|
228 | |||
229 | pushkey hook |
|
229 | pushkey hook | |
230 |
|
230 | |||
231 |
$ echo "pushkey = p |
|
231 | $ echo "pushkey = printenv.py pushkey" >> .hg/hgrc | |
232 | $ cd ../b |
|
232 | $ cd ../b | |
233 | $ hg bookmark -r null foo |
|
233 | $ hg bookmark -r null foo | |
234 | $ hg push -B foo ../a |
|
234 | $ hg push -B foo ../a | |
235 | pushing to ../a |
|
235 | pushing to ../a | |
236 | searching for changes |
|
236 | searching for changes | |
237 | no changes found |
|
237 | no changes found | |
238 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) |
|
238 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) | |
239 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
239 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
240 | pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 |
|
240 | pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 | |
241 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
241 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
242 | exporting bookmark foo |
|
242 | exporting bookmark foo | |
243 | [1] |
|
243 | [1] | |
244 | $ cd ../a |
|
244 | $ cd ../a | |
245 |
|
245 | |||
246 | listkeys hook |
|
246 | listkeys hook | |
247 |
|
247 | |||
248 |
$ echo "listkeys = p |
|
248 | $ echo "listkeys = printenv.py listkeys" >> .hg/hgrc | |
249 | $ hg bookmark -r null bar |
|
249 | $ hg bookmark -r null bar | |
250 | $ cd ../b |
|
250 | $ cd ../b | |
251 | $ hg pull -B bar ../a |
|
251 | $ hg pull -B bar ../a | |
252 | pulling from ../a |
|
252 | pulling from ../a | |
253 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} |
|
253 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} | |
254 | no changes found |
|
254 | no changes found | |
255 | listkeys hook: HG_NAMESPACE=phase HG_VALUES={} |
|
255 | listkeys hook: HG_NAMESPACE=phase HG_VALUES={} | |
256 | adding remote bookmark bar |
|
256 | adding remote bookmark bar | |
257 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
257 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
258 | $ cd ../a |
|
258 | $ cd ../a | |
259 |
|
259 | |||
260 | test that prepushkey can prevent incoming keys |
|
260 | test that prepushkey can prevent incoming keys | |
261 |
|
261 | |||
262 |
$ echo "prepushkey = p |
|
262 | $ echo "prepushkey = printenv.py prepushkey.forbid 1" >> .hg/hgrc | |
263 | $ cd ../b |
|
263 | $ cd ../b | |
264 | $ hg bookmark -r null baz |
|
264 | $ hg bookmark -r null baz | |
265 | $ hg push -B baz ../a |
|
265 | $ hg push -B baz ../a | |
266 | pushing to ../a |
|
266 | pushing to ../a | |
267 | searching for changes |
|
267 | searching for changes | |
268 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
268 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
269 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} |
|
269 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} | |
270 | no changes found |
|
270 | no changes found | |
271 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) |
|
271 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) | |
272 | prepushkey.forbid hook: HG_BUNDLE2=1 HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:* HG_URL=push (glob) |
|
272 | prepushkey.forbid hook: HG_BUNDLE2=1 HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:* HG_URL=push (glob) | |
273 | pushkey-abort: prepushkey hook exited with status 1 |
|
273 | pushkey-abort: prepushkey hook exited with status 1 | |
274 | pretxnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
274 | pretxnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
275 | txnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) |
|
275 | txnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
276 | exporting bookmark baz failed! |
|
276 | exporting bookmark baz failed! | |
277 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
277 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
278 | [1] |
|
278 | [1] | |
279 | $ cd ../a |
|
279 | $ cd ../a | |
280 |
|
280 | |||
281 | test that prelistkeys can prevent listing keys |
|
281 | test that prelistkeys can prevent listing keys | |
282 |
|
282 | |||
283 |
$ echo "prelistkeys = p |
|
283 | $ echo "prelistkeys = printenv.py prelistkeys.forbid 1" >> .hg/hgrc | |
284 | $ hg bookmark -r null quux |
|
284 | $ hg bookmark -r null quux | |
285 | $ cd ../b |
|
285 | $ cd ../b | |
286 | $ hg pull -B quux ../a |
|
286 | $ hg pull -B quux ../a | |
287 | pulling from ../a |
|
287 | pulling from ../a | |
288 | prelistkeys.forbid hook: HG_NAMESPACE=bookmarks |
|
288 | prelistkeys.forbid hook: HG_NAMESPACE=bookmarks | |
289 | abort: prelistkeys hook exited with status 1 |
|
289 | abort: prelistkeys hook exited with status 1 | |
290 | [255] |
|
290 | [255] | |
291 | $ cd ../a |
|
291 | $ cd ../a | |
292 | $ rm .hg/hgrc |
|
292 | $ rm .hg/hgrc | |
293 |
|
293 | |||
294 | prechangegroup hook can prevent incoming changes |
|
294 | prechangegroup hook can prevent incoming changes | |
295 |
|
295 | |||
296 | $ cd ../b |
|
296 | $ cd ../b | |
297 | $ hg -q tip |
|
297 | $ hg -q tip | |
298 | 3:07f3376c1e65 |
|
298 | 3:07f3376c1e65 | |
299 | $ cat > .hg/hgrc <<EOF |
|
299 | $ cat > .hg/hgrc <<EOF | |
300 | > [hooks] |
|
300 | > [hooks] | |
301 |
> prechangegroup.forbid = |
|
301 | > prechangegroup.forbid = printenv.py prechangegroup.forbid 1 | |
302 | > EOF |
|
302 | > EOF | |
303 | $ hg pull ../a |
|
303 | $ hg pull ../a | |
304 | pulling from ../a |
|
304 | pulling from ../a | |
305 | searching for changes |
|
305 | searching for changes | |
306 | prechangegroup.forbid hook: HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
306 | prechangegroup.forbid hook: HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
307 | abort: prechangegroup.forbid hook exited with status 1 |
|
307 | abort: prechangegroup.forbid hook exited with status 1 | |
308 | [255] |
|
308 | [255] | |
309 |
|
309 | |||
310 | pretxnchangegroup hook can see incoming changes, can roll back txn, |
|
310 | pretxnchangegroup hook can see incoming changes, can roll back txn, | |
311 | incoming changes no longer there after |
|
311 | incoming changes no longer there after | |
312 |
|
312 | |||
313 | $ cat > .hg/hgrc <<EOF |
|
313 | $ cat > .hg/hgrc <<EOF | |
314 | > [hooks] |
|
314 | > [hooks] | |
315 | > pretxnchangegroup.forbid0 = hg tip -q |
|
315 | > pretxnchangegroup.forbid0 = hg tip -q | |
316 |
> pretxnchangegroup.forbid1 = |
|
316 | > pretxnchangegroup.forbid1 = printenv.py pretxnchangegroup.forbid 1 | |
317 | > EOF |
|
317 | > EOF | |
318 | $ hg pull ../a |
|
318 | $ hg pull ../a | |
319 | pulling from ../a |
|
319 | pulling from ../a | |
320 | searching for changes |
|
320 | searching for changes | |
321 | adding changesets |
|
321 | adding changesets | |
322 | adding manifests |
|
322 | adding manifests | |
323 | adding file changes |
|
323 | adding file changes | |
324 | added 1 changesets with 1 changes to 1 files |
|
324 | added 1 changesets with 1 changes to 1 files | |
325 | 4:539e4b31b6dc |
|
325 | 4:539e4b31b6dc | |
326 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) |
|
326 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=file:$TESTTMP/a (glob) | |
327 | transaction abort! |
|
327 | transaction abort! | |
328 | rollback completed |
|
328 | rollback completed | |
329 | abort: pretxnchangegroup.forbid1 hook exited with status 1 |
|
329 | abort: pretxnchangegroup.forbid1 hook exited with status 1 | |
330 | [255] |
|
330 | [255] | |
331 | $ hg -q tip |
|
331 | $ hg -q tip | |
332 | 3:07f3376c1e65 |
|
332 | 3:07f3376c1e65 | |
333 |
|
333 | |||
334 | outgoing hooks can see env vars |
|
334 | outgoing hooks can see env vars | |
335 |
|
335 | |||
336 | $ rm .hg/hgrc |
|
336 | $ rm .hg/hgrc | |
337 | $ cat > ../a/.hg/hgrc <<EOF |
|
337 | $ cat > ../a/.hg/hgrc <<EOF | |
338 | > [hooks] |
|
338 | > [hooks] | |
339 |
> preoutgoing = |
|
339 | > preoutgoing = printenv.py preoutgoing | |
340 |
> outgoing = |
|
340 | > outgoing = printenv.py outgoing | |
341 | > EOF |
|
341 | > EOF | |
342 | $ hg pull ../a |
|
342 | $ hg pull ../a | |
343 | pulling from ../a |
|
343 | pulling from ../a | |
344 | searching for changes |
|
344 | searching for changes | |
345 | preoutgoing hook: HG_SOURCE=pull |
|
345 | preoutgoing hook: HG_SOURCE=pull | |
346 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull |
|
346 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull | |
347 | adding changesets |
|
347 | adding changesets | |
348 | adding manifests |
|
348 | adding manifests | |
349 | adding file changes |
|
349 | adding file changes | |
350 | added 1 changesets with 1 changes to 1 files |
|
350 | added 1 changesets with 1 changes to 1 files | |
351 | adding remote bookmark quux |
|
351 | adding remote bookmark quux | |
352 | (run 'hg update' to get a working copy) |
|
352 | (run 'hg update' to get a working copy) | |
353 | $ hg rollback |
|
353 | $ hg rollback | |
354 | repository tip rolled back to revision 3 (undo pull) |
|
354 | repository tip rolled back to revision 3 (undo pull) | |
355 |
|
355 | |||
356 | preoutgoing hook can prevent outgoing changes |
|
356 | preoutgoing hook can prevent outgoing changes | |
357 |
|
357 | |||
358 |
$ echo "preoutgoing.forbid = p |
|
358 | $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> ../a/.hg/hgrc | |
359 | $ hg pull ../a |
|
359 | $ hg pull ../a | |
360 | pulling from ../a |
|
360 | pulling from ../a | |
361 | searching for changes |
|
361 | searching for changes | |
362 | preoutgoing hook: HG_SOURCE=pull |
|
362 | preoutgoing hook: HG_SOURCE=pull | |
363 | preoutgoing.forbid hook: HG_SOURCE=pull |
|
363 | preoutgoing.forbid hook: HG_SOURCE=pull | |
364 | abort: preoutgoing.forbid hook exited with status 1 |
|
364 | abort: preoutgoing.forbid hook exited with status 1 | |
365 | [255] |
|
365 | [255] | |
366 |
|
366 | |||
367 | outgoing hooks work for local clones |
|
367 | outgoing hooks work for local clones | |
368 |
|
368 | |||
369 | $ cd .. |
|
369 | $ cd .. | |
370 | $ cat > a/.hg/hgrc <<EOF |
|
370 | $ cat > a/.hg/hgrc <<EOF | |
371 | > [hooks] |
|
371 | > [hooks] | |
372 |
> preoutgoing = |
|
372 | > preoutgoing = printenv.py preoutgoing | |
373 |
> outgoing = |
|
373 | > outgoing = printenv.py outgoing | |
374 | > EOF |
|
374 | > EOF | |
375 | $ hg clone a c |
|
375 | $ hg clone a c | |
376 | preoutgoing hook: HG_SOURCE=clone |
|
376 | preoutgoing hook: HG_SOURCE=clone | |
377 | outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone |
|
377 | outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone | |
378 | updating to branch default |
|
378 | updating to branch default | |
379 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
379 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
380 | $ rm -rf c |
|
380 | $ rm -rf c | |
381 |
|
381 | |||
382 | preoutgoing hook can prevent outgoing changes for local clones |
|
382 | preoutgoing hook can prevent outgoing changes for local clones | |
383 |
|
383 | |||
384 |
$ echo "preoutgoing.forbid = p |
|
384 | $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> a/.hg/hgrc | |
385 | $ hg clone a zzz |
|
385 | $ hg clone a zzz | |
386 | preoutgoing hook: HG_SOURCE=clone |
|
386 | preoutgoing hook: HG_SOURCE=clone | |
387 | preoutgoing.forbid hook: HG_SOURCE=clone |
|
387 | preoutgoing.forbid hook: HG_SOURCE=clone | |
388 | abort: preoutgoing.forbid hook exited with status 1 |
|
388 | abort: preoutgoing.forbid hook exited with status 1 | |
389 | [255] |
|
389 | [255] | |
390 |
|
390 | |||
391 | $ cd "$TESTTMP/b" |
|
391 | $ cd "$TESTTMP/b" | |
392 |
|
392 | |||
393 | $ cat > hooktests.py <<EOF |
|
393 | $ cat > hooktests.py <<EOF | |
394 | > from mercurial import util |
|
394 | > from mercurial import util | |
395 | > |
|
395 | > | |
396 | > uncallable = 0 |
|
396 | > uncallable = 0 | |
397 | > |
|
397 | > | |
398 | > def printargs(args): |
|
398 | > def printargs(args): | |
399 | > args.pop('ui', None) |
|
399 | > args.pop('ui', None) | |
400 | > args.pop('repo', None) |
|
400 | > args.pop('repo', None) | |
401 | > a = list(args.items()) |
|
401 | > a = list(args.items()) | |
402 | > a.sort() |
|
402 | > a.sort() | |
403 | > print 'hook args:' |
|
403 | > print 'hook args:' | |
404 | > for k, v in a: |
|
404 | > for k, v in a: | |
405 | > print ' ', k, v |
|
405 | > print ' ', k, v | |
406 | > |
|
406 | > | |
407 | > def passhook(**args): |
|
407 | > def passhook(**args): | |
408 | > printargs(args) |
|
408 | > printargs(args) | |
409 | > |
|
409 | > | |
410 | > def failhook(**args): |
|
410 | > def failhook(**args): | |
411 | > printargs(args) |
|
411 | > printargs(args) | |
412 | > return True |
|
412 | > return True | |
413 | > |
|
413 | > | |
414 | > class LocalException(Exception): |
|
414 | > class LocalException(Exception): | |
415 | > pass |
|
415 | > pass | |
416 | > |
|
416 | > | |
417 | > def raisehook(**args): |
|
417 | > def raisehook(**args): | |
418 | > raise LocalException('exception from hook') |
|
418 | > raise LocalException('exception from hook') | |
419 | > |
|
419 | > | |
420 | > def aborthook(**args): |
|
420 | > def aborthook(**args): | |
421 | > raise util.Abort('raise abort from hook') |
|
421 | > raise util.Abort('raise abort from hook') | |
422 | > |
|
422 | > | |
423 | > def brokenhook(**args): |
|
423 | > def brokenhook(**args): | |
424 | > return 1 + {} |
|
424 | > return 1 + {} | |
425 | > |
|
425 | > | |
426 | > def verbosehook(ui, **args): |
|
426 | > def verbosehook(ui, **args): | |
427 | > ui.note('verbose output from hook\n') |
|
427 | > ui.note('verbose output from hook\n') | |
428 | > |
|
428 | > | |
429 | > def printtags(ui, repo, **args): |
|
429 | > def printtags(ui, repo, **args): | |
430 | > print sorted(repo.tags()) |
|
430 | > print sorted(repo.tags()) | |
431 | > |
|
431 | > | |
432 | > class container: |
|
432 | > class container: | |
433 | > unreachable = 1 |
|
433 | > unreachable = 1 | |
434 | > EOF |
|
434 | > EOF | |
435 |
|
435 | |||
436 | test python hooks |
|
436 | test python hooks | |
437 |
|
437 | |||
438 | #if windows |
|
438 | #if windows | |
439 | $ PYTHONPATH="$TESTTMP/b;$PYTHONPATH" |
|
439 | $ PYTHONPATH="$TESTTMP/b;$PYTHONPATH" | |
440 | #else |
|
440 | #else | |
441 | $ PYTHONPATH="$TESTTMP/b:$PYTHONPATH" |
|
441 | $ PYTHONPATH="$TESTTMP/b:$PYTHONPATH" | |
442 | #endif |
|
442 | #endif | |
443 | $ export PYTHONPATH |
|
443 | $ export PYTHONPATH | |
444 |
|
444 | |||
445 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
445 | $ echo '[hooks]' > ../a/.hg/hgrc | |
446 | $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc |
|
446 | $ echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc | |
447 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
447 | $ hg pull ../a 2>&1 | grep 'raised an exception' | |
448 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' |
|
448 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' | |
449 |
|
449 | |||
450 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
450 | $ echo '[hooks]' > ../a/.hg/hgrc | |
451 | $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc |
|
451 | $ echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc | |
452 | $ hg pull ../a 2>&1 | grep 'raised an exception' |
|
452 | $ hg pull ../a 2>&1 | grep 'raised an exception' | |
453 | error: preoutgoing.raise hook raised an exception: exception from hook |
|
453 | error: preoutgoing.raise hook raised an exception: exception from hook | |
454 |
|
454 | |||
455 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
455 | $ echo '[hooks]' > ../a/.hg/hgrc | |
456 | $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc |
|
456 | $ echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc | |
457 | $ hg pull ../a |
|
457 | $ hg pull ../a | |
458 | pulling from ../a |
|
458 | pulling from ../a | |
459 | searching for changes |
|
459 | searching for changes | |
460 | error: preoutgoing.abort hook failed: raise abort from hook |
|
460 | error: preoutgoing.abort hook failed: raise abort from hook | |
461 | abort: raise abort from hook |
|
461 | abort: raise abort from hook | |
462 | [255] |
|
462 | [255] | |
463 |
|
463 | |||
464 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
464 | $ echo '[hooks]' > ../a/.hg/hgrc | |
465 | $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc |
|
465 | $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc | |
466 | $ hg pull ../a |
|
466 | $ hg pull ../a | |
467 | pulling from ../a |
|
467 | pulling from ../a | |
468 | searching for changes |
|
468 | searching for changes | |
469 | hook args: |
|
469 | hook args: | |
470 | hooktype preoutgoing |
|
470 | hooktype preoutgoing | |
471 | source pull |
|
471 | source pull | |
472 | abort: preoutgoing.fail hook failed |
|
472 | abort: preoutgoing.fail hook failed | |
473 | [255] |
|
473 | [255] | |
474 |
|
474 | |||
475 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
475 | $ echo '[hooks]' > ../a/.hg/hgrc | |
476 | $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc |
|
476 | $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc | |
477 | $ hg pull ../a |
|
477 | $ hg pull ../a | |
478 | pulling from ../a |
|
478 | pulling from ../a | |
479 | searching for changes |
|
479 | searching for changes | |
480 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) |
|
480 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) | |
481 | [255] |
|
481 | [255] | |
482 |
|
482 | |||
483 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
483 | $ echo '[hooks]' > ../a/.hg/hgrc | |
484 | $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc |
|
484 | $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc | |
485 | $ hg pull ../a |
|
485 | $ hg pull ../a | |
486 | pulling from ../a |
|
486 | pulling from ../a | |
487 | searching for changes |
|
487 | searching for changes | |
488 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) |
|
488 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) | |
489 | [255] |
|
489 | [255] | |
490 |
|
490 | |||
491 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
491 | $ echo '[hooks]' > ../a/.hg/hgrc | |
492 | $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc |
|
492 | $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc | |
493 | $ hg pull ../a |
|
493 | $ hg pull ../a | |
494 | pulling from ../a |
|
494 | pulling from ../a | |
495 | searching for changes |
|
495 | searching for changes | |
496 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) |
|
496 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) | |
497 | [255] |
|
497 | [255] | |
498 |
|
498 | |||
499 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
499 | $ echo '[hooks]' > ../a/.hg/hgrc | |
500 | $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc |
|
500 | $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc | |
501 | $ hg pull ../a |
|
501 | $ hg pull ../a | |
502 | pulling from ../a |
|
502 | pulling from ../a | |
503 | searching for changes |
|
503 | searching for changes | |
504 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) |
|
504 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) | |
505 | [255] |
|
505 | [255] | |
506 |
|
506 | |||
507 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
507 | $ echo '[hooks]' > ../a/.hg/hgrc | |
508 | $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc |
|
508 | $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc | |
509 | $ hg pull ../a |
|
509 | $ hg pull ../a | |
510 | pulling from ../a |
|
510 | pulling from ../a | |
511 | searching for changes |
|
511 | searching for changes | |
512 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) |
|
512 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) | |
513 | [255] |
|
513 | [255] | |
514 |
|
514 | |||
515 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
515 | $ echo '[hooks]' > ../a/.hg/hgrc | |
516 | $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc |
|
516 | $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc | |
517 | $ hg pull ../a |
|
517 | $ hg pull ../a | |
518 | pulling from ../a |
|
518 | pulling from ../a | |
519 | searching for changes |
|
519 | searching for changes | |
520 | hook args: |
|
520 | hook args: | |
521 | hooktype preoutgoing |
|
521 | hooktype preoutgoing | |
522 | source pull |
|
522 | source pull | |
523 | adding changesets |
|
523 | adding changesets | |
524 | adding manifests |
|
524 | adding manifests | |
525 | adding file changes |
|
525 | adding file changes | |
526 | added 1 changesets with 1 changes to 1 files |
|
526 | added 1 changesets with 1 changes to 1 files | |
527 | adding remote bookmark quux |
|
527 | adding remote bookmark quux | |
528 | (run 'hg update' to get a working copy) |
|
528 | (run 'hg update' to get a working copy) | |
529 |
|
529 | |||
530 | make sure --traceback works |
|
530 | make sure --traceback works | |
531 |
|
531 | |||
532 | $ echo '[hooks]' > .hg/hgrc |
|
532 | $ echo '[hooks]' > .hg/hgrc | |
533 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc |
|
533 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc | |
534 |
|
534 | |||
535 | $ echo aa > a |
|
535 | $ echo aa > a | |
536 | $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback' |
|
536 | $ hg --traceback commit -d '0 0' -ma 2>&1 | grep '^Traceback' | |
537 | Traceback (most recent call last): |
|
537 | Traceback (most recent call last): | |
538 |
|
538 | |||
539 | $ cd .. |
|
539 | $ cd .. | |
540 | $ hg init c |
|
540 | $ hg init c | |
541 | $ cd c |
|
541 | $ cd c | |
542 |
|
542 | |||
543 | $ cat > hookext.py <<EOF |
|
543 | $ cat > hookext.py <<EOF | |
544 | > def autohook(**args): |
|
544 | > def autohook(**args): | |
545 | > print "Automatically installed hook" |
|
545 | > print "Automatically installed hook" | |
546 | > |
|
546 | > | |
547 | > def reposetup(ui, repo): |
|
547 | > def reposetup(ui, repo): | |
548 | > repo.ui.setconfig("hooks", "commit.auto", autohook) |
|
548 | > repo.ui.setconfig("hooks", "commit.auto", autohook) | |
549 | > EOF |
|
549 | > EOF | |
550 | $ echo '[extensions]' >> .hg/hgrc |
|
550 | $ echo '[extensions]' >> .hg/hgrc | |
551 | $ echo 'hookext = hookext.py' >> .hg/hgrc |
|
551 | $ echo 'hookext = hookext.py' >> .hg/hgrc | |
552 |
|
552 | |||
553 | $ touch foo |
|
553 | $ touch foo | |
554 | $ hg add foo |
|
554 | $ hg add foo | |
555 | $ hg ci -d '0 0' -m 'add foo' |
|
555 | $ hg ci -d '0 0' -m 'add foo' | |
556 | Automatically installed hook |
|
556 | Automatically installed hook | |
557 | $ echo >> foo |
|
557 | $ echo >> foo | |
558 | $ hg ci --debug -d '0 0' -m 'change foo' |
|
558 | $ hg ci --debug -d '0 0' -m 'change foo' | |
559 | committing files: |
|
559 | committing files: | |
560 | foo |
|
560 | foo | |
561 | committing manifest |
|
561 | committing manifest | |
562 | committing changelog |
|
562 | committing changelog | |
563 | calling hook commit.auto: hgext_hookext.autohook |
|
563 | calling hook commit.auto: hgext_hookext.autohook | |
564 | Automatically installed hook |
|
564 | Automatically installed hook | |
565 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 |
|
565 | committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708 | |
566 |
|
566 | |||
567 | $ hg showconfig hooks |
|
567 | $ hg showconfig hooks | |
568 | hooks.commit.auto=<function autohook at *> (glob) |
|
568 | hooks.commit.auto=<function autohook at *> (glob) | |
569 |
|
569 | |||
570 | test python hook configured with python:[file]:[hook] syntax |
|
570 | test python hook configured with python:[file]:[hook] syntax | |
571 |
|
571 | |||
572 | $ cd .. |
|
572 | $ cd .. | |
573 | $ mkdir d |
|
573 | $ mkdir d | |
574 | $ cd d |
|
574 | $ cd d | |
575 | $ hg init repo |
|
575 | $ hg init repo | |
576 | $ mkdir hooks |
|
576 | $ mkdir hooks | |
577 |
|
577 | |||
578 | $ cd hooks |
|
578 | $ cd hooks | |
579 | $ cat > testhooks.py <<EOF |
|
579 | $ cat > testhooks.py <<EOF | |
580 | > def testhook(**args): |
|
580 | > def testhook(**args): | |
581 | > print 'hook works' |
|
581 | > print 'hook works' | |
582 | > EOF |
|
582 | > EOF | |
583 | $ echo '[hooks]' > ../repo/.hg/hgrc |
|
583 | $ echo '[hooks]' > ../repo/.hg/hgrc | |
584 | $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc |
|
584 | $ echo "pre-commit.test = python:`pwd`/testhooks.py:testhook" >> ../repo/.hg/hgrc | |
585 |
|
585 | |||
586 | $ cd ../repo |
|
586 | $ cd ../repo | |
587 | $ hg commit -d '0 0' |
|
587 | $ hg commit -d '0 0' | |
588 | hook works |
|
588 | hook works | |
589 | nothing changed |
|
589 | nothing changed | |
590 | [1] |
|
590 | [1] | |
591 |
|
591 | |||
592 | $ echo '[hooks]' > .hg/hgrc |
|
592 | $ echo '[hooks]' > .hg/hgrc | |
593 | $ echo "update.ne = python:`pwd`/nonexistent.py:testhook" >> .hg/hgrc |
|
593 | $ echo "update.ne = python:`pwd`/nonexistent.py:testhook" >> .hg/hgrc | |
594 | $ echo "pre-identify.npmd = python:`pwd`/:no_python_module_dir" >> .hg/hgrc |
|
594 | $ echo "pre-identify.npmd = python:`pwd`/:no_python_module_dir" >> .hg/hgrc | |
595 |
|
595 | |||
596 | $ hg up null |
|
596 | $ hg up null | |
597 | loading update.ne hook failed: |
|
597 | loading update.ne hook failed: | |
598 | abort: No such file or directory: $TESTTMP/d/repo/nonexistent.py |
|
598 | abort: No such file or directory: $TESTTMP/d/repo/nonexistent.py | |
599 | [255] |
|
599 | [255] | |
600 |
|
600 | |||
601 | $ hg id |
|
601 | $ hg id | |
602 | loading pre-identify.npmd hook failed: |
|
602 | loading pre-identify.npmd hook failed: | |
603 | abort: No module named repo! |
|
603 | abort: No module named repo! | |
604 | [255] |
|
604 | [255] | |
605 |
|
605 | |||
606 | $ cd ../../b |
|
606 | $ cd ../../b | |
607 |
|
607 | |||
608 | make sure --traceback works on hook import failure |
|
608 | make sure --traceback works on hook import failure | |
609 |
|
609 | |||
610 | $ cat > importfail.py <<EOF |
|
610 | $ cat > importfail.py <<EOF | |
611 | > import somebogusmodule |
|
611 | > import somebogusmodule | |
612 | > # dereference something in the module to force demandimport to load it |
|
612 | > # dereference something in the module to force demandimport to load it | |
613 | > somebogusmodule.whatever |
|
613 | > somebogusmodule.whatever | |
614 | > EOF |
|
614 | > EOF | |
615 |
|
615 | |||
616 | $ echo '[hooks]' > .hg/hgrc |
|
616 | $ echo '[hooks]' > .hg/hgrc | |
617 | $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc |
|
617 | $ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc | |
618 |
|
618 | |||
619 | $ echo a >> a |
|
619 | $ echo a >> a | |
620 | $ hg --traceback commit -ma 2>&1 | egrep -v '^( +File| [a-zA-Z(])' |
|
620 | $ hg --traceback commit -ma 2>&1 | egrep -v '^( +File| [a-zA-Z(])' | |
621 | exception from first failed import attempt: |
|
621 | exception from first failed import attempt: | |
622 | Traceback (most recent call last): |
|
622 | Traceback (most recent call last): | |
623 | ImportError: No module named somebogusmodule |
|
623 | ImportError: No module named somebogusmodule | |
624 | exception from second failed import attempt: |
|
624 | exception from second failed import attempt: | |
625 | Traceback (most recent call last): |
|
625 | Traceback (most recent call last): | |
626 | ImportError: No module named hgext_importfail |
|
626 | ImportError: No module named hgext_importfail | |
627 | Traceback (most recent call last): |
|
627 | Traceback (most recent call last): | |
628 | Abort: precommit.importfail hook is invalid (import of "importfail" failed) |
|
628 | Abort: precommit.importfail hook is invalid (import of "importfail" failed) | |
629 | abort: precommit.importfail hook is invalid (import of "importfail" failed) |
|
629 | abort: precommit.importfail hook is invalid (import of "importfail" failed) | |
630 |
|
630 | |||
631 | Issue1827: Hooks Update & Commit not completely post operation |
|
631 | Issue1827: Hooks Update & Commit not completely post operation | |
632 |
|
632 | |||
633 | commit and update hooks should run after command completion. The largefiles |
|
633 | commit and update hooks should run after command completion. The largefiles | |
634 | use demonstrates a recursive wlock, showing the hook doesn't run until the |
|
634 | use demonstrates a recursive wlock, showing the hook doesn't run until the | |
635 | final release (and dirstate flush). |
|
635 | final release (and dirstate flush). | |
636 |
|
636 | |||
637 | $ echo '[hooks]' > .hg/hgrc |
|
637 | $ echo '[hooks]' > .hg/hgrc | |
638 | $ echo 'commit = hg id' >> .hg/hgrc |
|
638 | $ echo 'commit = hg id' >> .hg/hgrc | |
639 | $ echo 'update = hg id' >> .hg/hgrc |
|
639 | $ echo 'update = hg id' >> .hg/hgrc | |
640 | $ echo bb > a |
|
640 | $ echo bb > a | |
641 | $ hg ci -ma |
|
641 | $ hg ci -ma | |
642 | 223eafe2750c tip |
|
642 | 223eafe2750c tip | |
643 | $ hg up 0 --config extensions.largefiles= |
|
643 | $ hg up 0 --config extensions.largefiles= | |
644 | cb9a9f314b8b |
|
644 | cb9a9f314b8b | |
645 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
645 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
646 |
|
646 | |||
647 | make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui |
|
647 | make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui | |
648 | that is passed to pre/post hooks |
|
648 | that is passed to pre/post hooks | |
649 |
|
649 | |||
650 | $ echo '[hooks]' > .hg/hgrc |
|
650 | $ echo '[hooks]' > .hg/hgrc | |
651 | $ echo 'pre-identify = python:hooktests.verbosehook' >> .hg/hgrc |
|
651 | $ echo 'pre-identify = python:hooktests.verbosehook' >> .hg/hgrc | |
652 | $ hg id |
|
652 | $ hg id | |
653 | cb9a9f314b8b |
|
653 | cb9a9f314b8b | |
654 | $ hg id --verbose |
|
654 | $ hg id --verbose | |
655 | calling hook pre-identify: hooktests.verbosehook |
|
655 | calling hook pre-identify: hooktests.verbosehook | |
656 | verbose output from hook |
|
656 | verbose output from hook | |
657 | cb9a9f314b8b |
|
657 | cb9a9f314b8b | |
658 |
|
658 | |||
659 | Ensure hooks can be prioritized |
|
659 | Ensure hooks can be prioritized | |
660 |
|
660 | |||
661 | $ echo '[hooks]' > .hg/hgrc |
|
661 | $ echo '[hooks]' > .hg/hgrc | |
662 | $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc |
|
662 | $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc | |
663 | $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc |
|
663 | $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc | |
664 | $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc |
|
664 | $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc | |
665 | $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc |
|
665 | $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc | |
666 | $ hg id --verbose |
|
666 | $ hg id --verbose | |
667 | calling hook pre-identify.b: hooktests.verbosehook |
|
667 | calling hook pre-identify.b: hooktests.verbosehook | |
668 | verbose output from hook |
|
668 | verbose output from hook | |
669 | calling hook pre-identify.a: hooktests.verbosehook |
|
669 | calling hook pre-identify.a: hooktests.verbosehook | |
670 | verbose output from hook |
|
670 | verbose output from hook | |
671 | calling hook pre-identify.c: hooktests.verbosehook |
|
671 | calling hook pre-identify.c: hooktests.verbosehook | |
672 | verbose output from hook |
|
672 | verbose output from hook | |
673 | cb9a9f314b8b |
|
673 | cb9a9f314b8b | |
674 |
|
674 | |||
675 | new tags must be visible in pretxncommit (issue3210) |
|
675 | new tags must be visible in pretxncommit (issue3210) | |
676 |
|
676 | |||
677 | $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc |
|
677 | $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc | |
678 | $ hg tag -f foo |
|
678 | $ hg tag -f foo | |
679 | ['a', 'foo', 'tip'] |
|
679 | ['a', 'foo', 'tip'] | |
680 |
|
680 | |||
681 | new commits must be visible in pretxnchangegroup (issue3428) |
|
681 | new commits must be visible in pretxnchangegroup (issue3428) | |
682 |
|
682 | |||
683 | $ cd .. |
|
683 | $ cd .. | |
684 | $ hg init to |
|
684 | $ hg init to | |
685 | $ echo '[hooks]' >> to/.hg/hgrc |
|
685 | $ echo '[hooks]' >> to/.hg/hgrc | |
686 | $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc |
|
686 | $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc | |
687 | $ echo a >> to/a |
|
687 | $ echo a >> to/a | |
688 | $ hg --cwd to ci -Ama |
|
688 | $ hg --cwd to ci -Ama | |
689 | adding a |
|
689 | adding a | |
690 | $ hg clone to from |
|
690 | $ hg clone to from | |
691 | updating to branch default |
|
691 | updating to branch default | |
692 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
692 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
693 | $ echo aa >> from/a |
|
693 | $ echo aa >> from/a | |
694 | $ hg --cwd from ci -mb |
|
694 | $ hg --cwd from ci -mb | |
695 | $ hg --cwd from push |
|
695 | $ hg --cwd from push | |
696 | pushing to $TESTTMP/to (glob) |
|
696 | pushing to $TESTTMP/to (glob) | |
697 | searching for changes |
|
697 | searching for changes | |
698 | adding changesets |
|
698 | adding changesets | |
699 | adding manifests |
|
699 | adding manifests | |
700 | adding file changes |
|
700 | adding file changes | |
701 | added 1 changesets with 1 changes to 1 files |
|
701 | added 1 changesets with 1 changes to 1 files | |
702 | changeset: 1:9836a07b9b9d |
|
702 | changeset: 1:9836a07b9b9d | |
703 | tag: tip |
|
703 | tag: tip | |
704 | user: test |
|
704 | user: test | |
705 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
705 | date: Thu Jan 01 00:00:00 1970 +0000 | |
706 | summary: b |
|
706 | summary: b | |
707 |
|
707 |
@@ -1,333 +1,333 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | This test is a duplicate of 'test-http.t', feel free to factor out |
|
3 | This test is a duplicate of 'test-http.t', feel free to factor out | |
4 | parts that are not bundle1/bundle2 specific. |
|
4 | parts that are not bundle1/bundle2 specific. | |
5 |
|
5 | |||
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > # This test is dedicated to interaction through old bundle |
|
8 | > # This test is dedicated to interaction through old bundle | |
9 | > bundle2-exp = False |
|
9 | > bundle2-exp = False | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ hg init test |
|
12 | $ hg init test | |
13 | $ cd test |
|
13 | $ cd test | |
14 | $ echo foo>foo |
|
14 | $ echo foo>foo | |
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
15 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
16 | $ echo foo>foo.d/foo |
|
16 | $ echo foo>foo.d/foo | |
17 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
17 | $ echo bar>foo.d/bAr.hg.d/BaR | |
18 | $ echo bar>foo.d/baR.d.hg/bAR |
|
18 | $ echo bar>foo.d/baR.d.hg/bAR | |
19 | $ hg commit -A -m 1 |
|
19 | $ hg commit -A -m 1 | |
20 | adding foo |
|
20 | adding foo | |
21 | adding foo.d/bAr.hg.d/BaR |
|
21 | adding foo.d/bAr.hg.d/BaR | |
22 | adding foo.d/baR.d.hg/bAR |
|
22 | adding foo.d/baR.d.hg/bAR | |
23 | adding foo.d/foo |
|
23 | adding foo.d/foo | |
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
24 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
25 | $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid |
|
25 | $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid | |
26 |
|
26 | |||
27 | Test server address cannot be reused |
|
27 | Test server address cannot be reused | |
28 |
|
28 | |||
29 | #if windows |
|
29 | #if windows | |
30 | $ hg serve -p $HGPORT1 2>&1 |
|
30 | $ hg serve -p $HGPORT1 2>&1 | |
31 | abort: cannot start server at ':$HGPORT1': * (glob) |
|
31 | abort: cannot start server at ':$HGPORT1': * (glob) | |
32 | [255] |
|
32 | [255] | |
33 | #else |
|
33 | #else | |
34 | $ hg serve -p $HGPORT1 2>&1 |
|
34 | $ hg serve -p $HGPORT1 2>&1 | |
35 | abort: cannot start server at ':$HGPORT1': Address already in use |
|
35 | abort: cannot start server at ':$HGPORT1': Address already in use | |
36 | [255] |
|
36 | [255] | |
37 | #endif |
|
37 | #endif | |
38 | $ cd .. |
|
38 | $ cd .. | |
39 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
39 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
40 |
|
40 | |||
41 | clone via stream |
|
41 | clone via stream | |
42 |
|
42 | |||
43 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 |
|
43 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | |
44 | streaming all changes |
|
44 | streaming all changes | |
45 | 6 files to transfer, 606 bytes of data |
|
45 | 6 files to transfer, 606 bytes of data | |
46 | transferred * bytes in * seconds (*/sec) (glob) |
|
46 | transferred * bytes in * seconds (*/sec) (glob) | |
47 | searching for changes |
|
47 | searching for changes | |
48 | no changes found |
|
48 | no changes found | |
49 | updating to branch default |
|
49 | updating to branch default | |
50 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
50 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
51 | $ hg verify -R copy |
|
51 | $ hg verify -R copy | |
52 | checking changesets |
|
52 | checking changesets | |
53 | checking manifests |
|
53 | checking manifests | |
54 | crosschecking files in changesets and manifests |
|
54 | crosschecking files in changesets and manifests | |
55 | checking files |
|
55 | checking files | |
56 | 4 files, 1 changesets, 4 total revisions |
|
56 | 4 files, 1 changesets, 4 total revisions | |
57 |
|
57 | |||
58 | try to clone via stream, should use pull instead |
|
58 | try to clone via stream, should use pull instead | |
59 |
|
59 | |||
60 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 |
|
60 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 | |
61 | requesting all changes |
|
61 | requesting all changes | |
62 | adding changesets |
|
62 | adding changesets | |
63 | adding manifests |
|
63 | adding manifests | |
64 | adding file changes |
|
64 | adding file changes | |
65 | added 1 changesets with 4 changes to 4 files |
|
65 | added 1 changesets with 4 changes to 4 files | |
66 | updating to branch default |
|
66 | updating to branch default | |
67 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
68 |
|
68 | |||
69 | clone via pull |
|
69 | clone via pull | |
70 |
|
70 | |||
71 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
71 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
72 | requesting all changes |
|
72 | requesting all changes | |
73 | adding changesets |
|
73 | adding changesets | |
74 | adding manifests |
|
74 | adding manifests | |
75 | adding file changes |
|
75 | adding file changes | |
76 | added 1 changesets with 4 changes to 4 files |
|
76 | added 1 changesets with 4 changes to 4 files | |
77 | updating to branch default |
|
77 | updating to branch default | |
78 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | $ hg verify -R copy-pull |
|
79 | $ hg verify -R copy-pull | |
80 | checking changesets |
|
80 | checking changesets | |
81 | checking manifests |
|
81 | checking manifests | |
82 | crosschecking files in changesets and manifests |
|
82 | crosschecking files in changesets and manifests | |
83 | checking files |
|
83 | checking files | |
84 | 4 files, 1 changesets, 4 total revisions |
|
84 | 4 files, 1 changesets, 4 total revisions | |
85 | $ cd test |
|
85 | $ cd test | |
86 | $ echo bar > bar |
|
86 | $ echo bar > bar | |
87 | $ hg commit -A -d '1 0' -m 2 |
|
87 | $ hg commit -A -d '1 0' -m 2 | |
88 | adding bar |
|
88 | adding bar | |
89 | $ cd .. |
|
89 | $ cd .. | |
90 |
|
90 | |||
91 | clone over http with --update |
|
91 | clone over http with --update | |
92 |
|
92 | |||
93 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
93 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
94 | requesting all changes |
|
94 | requesting all changes | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
97 | adding file changes |
|
97 | adding file changes | |
98 | added 2 changesets with 5 changes to 5 files |
|
98 | added 2 changesets with 5 changes to 5 files | |
99 | updating to branch default |
|
99 | updating to branch default | |
100 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 | $ hg log -r . -R updated |
|
101 | $ hg log -r . -R updated | |
102 | changeset: 0:8b6053c928fe |
|
102 | changeset: 0:8b6053c928fe | |
103 | user: test |
|
103 | user: test | |
104 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
104 | date: Thu Jan 01 00:00:00 1970 +0000 | |
105 | summary: 1 |
|
105 | summary: 1 | |
106 |
|
106 | |||
107 | $ rm -rf updated |
|
107 | $ rm -rf updated | |
108 |
|
108 | |||
109 | incoming via HTTP |
|
109 | incoming via HTTP | |
110 |
|
110 | |||
111 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
111 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
112 | adding changesets |
|
112 | adding changesets | |
113 | adding manifests |
|
113 | adding manifests | |
114 | adding file changes |
|
114 | adding file changes | |
115 | added 1 changesets with 4 changes to 4 files |
|
115 | added 1 changesets with 4 changes to 4 files | |
116 | updating to branch default |
|
116 | updating to branch default | |
117 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 | $ cd partial |
|
118 | $ cd partial | |
119 | $ touch LOCAL |
|
119 | $ touch LOCAL | |
120 | $ hg ci -qAm LOCAL |
|
120 | $ hg ci -qAm LOCAL | |
121 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
121 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
122 | comparing with http://localhost:$HGPORT1/ |
|
122 | comparing with http://localhost:$HGPORT1/ | |
123 | searching for changes |
|
123 | searching for changes | |
124 | 2 |
|
124 | 2 | |
125 | $ cd .. |
|
125 | $ cd .. | |
126 |
|
126 | |||
127 | pull |
|
127 | pull | |
128 |
|
128 | |||
129 | $ cd copy-pull |
|
129 | $ cd copy-pull | |
130 | $ echo '[hooks]' >> .hg/hgrc |
|
130 | $ echo '[hooks]' >> .hg/hgrc | |
131 |
$ echo "changegroup = p |
|
131 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc | |
132 | $ hg pull |
|
132 | $ hg pull | |
133 | pulling from http://localhost:$HGPORT1/ |
|
133 | pulling from http://localhost:$HGPORT1/ | |
134 | searching for changes |
|
134 | searching for changes | |
135 | adding changesets |
|
135 | adding changesets | |
136 | adding manifests |
|
136 | adding manifests | |
137 | adding file changes |
|
137 | adding file changes | |
138 | added 1 changesets with 1 changes to 1 files |
|
138 | added 1 changesets with 1 changes to 1 files | |
139 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) |
|
139 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) | |
140 | (run 'hg update' to get a working copy) |
|
140 | (run 'hg update' to get a working copy) | |
141 | $ cd .. |
|
141 | $ cd .. | |
142 |
|
142 | |||
143 | clone from invalid URL |
|
143 | clone from invalid URL | |
144 |
|
144 | |||
145 | $ hg clone http://localhost:$HGPORT/bad |
|
145 | $ hg clone http://localhost:$HGPORT/bad | |
146 | abort: HTTP Error 404: Not Found |
|
146 | abort: HTTP Error 404: Not Found | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 | test http authentication |
|
149 | test http authentication | |
150 | + use the same server to test server side streaming preference |
|
150 | + use the same server to test server side streaming preference | |
151 |
|
151 | |||
152 | $ cd test |
|
152 | $ cd test | |
153 | $ cat << EOT > userpass.py |
|
153 | $ cat << EOT > userpass.py | |
154 | > import base64 |
|
154 | > import base64 | |
155 | > from mercurial.hgweb import common |
|
155 | > from mercurial.hgweb import common | |
156 | > def perform_authentication(hgweb, req, op): |
|
156 | > def perform_authentication(hgweb, req, op): | |
157 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
157 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
158 | > if not auth: |
|
158 | > if not auth: | |
159 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
159 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
160 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
160 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
161 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
161 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
162 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
162 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
163 | > def extsetup(): |
|
163 | > def extsetup(): | |
164 | > common.permhooks.insert(0, perform_authentication) |
|
164 | > common.permhooks.insert(0, perform_authentication) | |
165 | > EOT |
|
165 | > EOT | |
166 | $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \ |
|
166 | $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \ | |
167 | > --config server.preferuncompressed=True \ |
|
167 | > --config server.preferuncompressed=True \ | |
168 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
168 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
169 | $ cat pid >> $DAEMON_PIDS |
|
169 | $ cat pid >> $DAEMON_PIDS | |
170 |
|
170 | |||
171 | $ cat << EOF > get_pass.py |
|
171 | $ cat << EOF > get_pass.py | |
172 | > import getpass |
|
172 | > import getpass | |
173 | > def newgetpass(arg): |
|
173 | > def newgetpass(arg): | |
174 | > return "pass" |
|
174 | > return "pass" | |
175 | > getpass.getpass = newgetpass |
|
175 | > getpass.getpass = newgetpass | |
176 | > EOF |
|
176 | > EOF | |
177 |
|
177 | |||
178 | $ hg id http://localhost:$HGPORT2/ |
|
178 | $ hg id http://localhost:$HGPORT2/ | |
179 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
179 | abort: http authorization required for http://localhost:$HGPORT2/ | |
180 | [255] |
|
180 | [255] | |
181 | $ hg id http://localhost:$HGPORT2/ |
|
181 | $ hg id http://localhost:$HGPORT2/ | |
182 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
182 | abort: http authorization required for http://localhost:$HGPORT2/ | |
183 | [255] |
|
183 | [255] | |
184 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
184 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
185 | http authorization required for http://localhost:$HGPORT2/ |
|
185 | http authorization required for http://localhost:$HGPORT2/ | |
186 | realm: mercurial |
|
186 | realm: mercurial | |
187 | user: user |
|
187 | user: user | |
188 | password: 5fed3813f7f5 |
|
188 | password: 5fed3813f7f5 | |
189 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
189 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
190 | 5fed3813f7f5 |
|
190 | 5fed3813f7f5 | |
191 | $ echo '[auth]' >> .hg/hgrc |
|
191 | $ echo '[auth]' >> .hg/hgrc | |
192 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
192 | $ echo 'l.schemes=http' >> .hg/hgrc | |
193 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
193 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
194 | $ echo 'l.username=user' >> .hg/hgrc |
|
194 | $ echo 'l.username=user' >> .hg/hgrc | |
195 | $ echo 'l.password=pass' >> .hg/hgrc |
|
195 | $ echo 'l.password=pass' >> .hg/hgrc | |
196 | $ hg id http://localhost:$HGPORT2/ |
|
196 | $ hg id http://localhost:$HGPORT2/ | |
197 | 5fed3813f7f5 |
|
197 | 5fed3813f7f5 | |
198 | $ hg id http://localhost:$HGPORT2/ |
|
198 | $ hg id http://localhost:$HGPORT2/ | |
199 | 5fed3813f7f5 |
|
199 | 5fed3813f7f5 | |
200 | $ hg id http://user@localhost:$HGPORT2/ |
|
200 | $ hg id http://user@localhost:$HGPORT2/ | |
201 | 5fed3813f7f5 |
|
201 | 5fed3813f7f5 | |
202 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
202 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
203 | streaming all changes |
|
203 | streaming all changes | |
204 | 7 files to transfer, 916 bytes of data |
|
204 | 7 files to transfer, 916 bytes of data | |
205 | transferred * bytes in * seconds (*/sec) (glob) |
|
205 | transferred * bytes in * seconds (*/sec) (glob) | |
206 | searching for changes |
|
206 | searching for changes | |
207 | no changes found |
|
207 | no changes found | |
208 | updating to branch default |
|
208 | updating to branch default | |
209 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
209 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
210 | --pull should override server's preferuncompressed |
|
210 | --pull should override server's preferuncompressed | |
211 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
211 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
212 | requesting all changes |
|
212 | requesting all changes | |
213 | adding changesets |
|
213 | adding changesets | |
214 | adding manifests |
|
214 | adding manifests | |
215 | adding file changes |
|
215 | adding file changes | |
216 | added 2 changesets with 5 changes to 5 files |
|
216 | added 2 changesets with 5 changes to 5 files | |
217 | updating to branch default |
|
217 | updating to branch default | |
218 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
218 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
219 |
|
219 | |||
220 | $ hg id http://user2@localhost:$HGPORT2/ |
|
220 | $ hg id http://user2@localhost:$HGPORT2/ | |
221 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
221 | abort: http authorization required for http://localhost:$HGPORT2/ | |
222 | [255] |
|
222 | [255] | |
223 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
223 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
224 | abort: HTTP Error 403: no |
|
224 | abort: HTTP Error 403: no | |
225 | [255] |
|
225 | [255] | |
226 |
|
226 | |||
227 | $ hg -R dest tag -r tip top |
|
227 | $ hg -R dest tag -r tip top | |
228 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
228 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ | |
229 | pushing to http://user:***@localhost:$HGPORT2/ |
|
229 | pushing to http://user:***@localhost:$HGPORT2/ | |
230 | searching for changes |
|
230 | searching for changes | |
231 | remote: adding changesets |
|
231 | remote: adding changesets | |
232 | remote: adding manifests |
|
232 | remote: adding manifests | |
233 | remote: adding file changes |
|
233 | remote: adding file changes | |
234 | remote: added 1 changesets with 1 changes to 1 files |
|
234 | remote: added 1 changesets with 1 changes to 1 files | |
235 | $ hg rollback -q |
|
235 | $ hg rollback -q | |
236 |
|
236 | |||
237 | $ cut -c38- ../access.log |
|
237 | $ cut -c38- ../access.log | |
238 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
238 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
239 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
239 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
240 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
240 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
241 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
241 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
242 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
242 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
243 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
243 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
244 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
244 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
245 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
245 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
246 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
246 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
247 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
247 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
248 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
248 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
249 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
249 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
250 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
250 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
251 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
251 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
252 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
252 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
253 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
253 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
254 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
254 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
255 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
255 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
256 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
256 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
257 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
257 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
258 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
258 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
259 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
259 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
260 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
260 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
261 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
261 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
262 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
262 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
263 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
263 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
264 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
264 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
265 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
265 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
266 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
266 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
267 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
267 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
268 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
268 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
269 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
269 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
270 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
270 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
271 | "GET /?cmd=stream_out HTTP/1.1" 401 - |
|
271 | "GET /?cmd=stream_out HTTP/1.1" 401 - | |
272 | "GET /?cmd=stream_out HTTP/1.1" 200 - |
|
272 | "GET /?cmd=stream_out HTTP/1.1" 200 - | |
273 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
273 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
274 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
274 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d | |
275 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
275 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
276 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
276 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks |
|
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks | |
278 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
278 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
279 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D |
|
279 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D | |
280 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
280 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d | |
281 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
281 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
282 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
282 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
283 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
283 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
284 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
284 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
285 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
285 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
286 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
286 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
287 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
287 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
288 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces |
|
288 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces | |
289 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
289 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
290 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
290 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 | |
291 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases |
|
291 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases | |
292 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
292 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
293 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
293 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
294 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
294 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
295 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
295 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
296 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
296 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
297 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524 |
|
297 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524 | |
298 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
298 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
299 |
|
299 | |||
300 | $ cd .. |
|
300 | $ cd .. | |
301 |
|
301 | |||
302 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
302 | clone of serve with repo in root and unserved subrepo (issue2970) | |
303 |
|
303 | |||
304 | $ hg --cwd test init sub |
|
304 | $ hg --cwd test init sub | |
305 | $ echo empty > test/sub/empty |
|
305 | $ echo empty > test/sub/empty | |
306 | $ hg --cwd test/sub add empty |
|
306 | $ hg --cwd test/sub add empty | |
307 | $ hg --cwd test/sub commit -qm 'add empty' |
|
307 | $ hg --cwd test/sub commit -qm 'add empty' | |
308 | $ hg --cwd test/sub tag -r 0 something |
|
308 | $ hg --cwd test/sub tag -r 0 something | |
309 | $ echo sub = sub > test/.hgsub |
|
309 | $ echo sub = sub > test/.hgsub | |
310 | $ hg --cwd test add .hgsub |
|
310 | $ hg --cwd test add .hgsub | |
311 | $ hg --cwd test commit -qm 'add subrepo' |
|
311 | $ hg --cwd test commit -qm 'add subrepo' | |
312 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
312 | $ hg clone http://localhost:$HGPORT noslash-clone | |
313 | requesting all changes |
|
313 | requesting all changes | |
314 | adding changesets |
|
314 | adding changesets | |
315 | adding manifests |
|
315 | adding manifests | |
316 | adding file changes |
|
316 | adding file changes | |
317 | added 3 changesets with 7 changes to 7 files |
|
317 | added 3 changesets with 7 changes to 7 files | |
318 | updating to branch default |
|
318 | updating to branch default | |
319 | abort: HTTP Error 404: Not Found |
|
319 | abort: HTTP Error 404: Not Found | |
320 | [255] |
|
320 | [255] | |
321 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
321 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
322 | requesting all changes |
|
322 | requesting all changes | |
323 | adding changesets |
|
323 | adding changesets | |
324 | adding manifests |
|
324 | adding manifests | |
325 | adding file changes |
|
325 | adding file changes | |
326 | added 3 changesets with 7 changes to 7 files |
|
326 | added 3 changesets with 7 changes to 7 files | |
327 | updating to branch default |
|
327 | updating to branch default | |
328 | abort: HTTP Error 404: Not Found |
|
328 | abort: HTTP Error 404: Not Found | |
329 | [255] |
|
329 | [255] | |
330 |
|
330 | |||
331 | check error log |
|
331 | check error log | |
332 |
|
332 | |||
333 | $ cat error.log |
|
333 | $ cat error.log |
@@ -1,323 +1,323 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo foo>foo |
|
5 | $ echo foo>foo | |
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
6 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
7 | $ echo foo>foo.d/foo |
|
7 | $ echo foo>foo.d/foo | |
8 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
8 | $ echo bar>foo.d/bAr.hg.d/BaR | |
9 | $ echo bar>foo.d/baR.d.hg/bAR |
|
9 | $ echo bar>foo.d/baR.d.hg/bAR | |
10 | $ hg commit -A -m 1 |
|
10 | $ hg commit -A -m 1 | |
11 | adding foo |
|
11 | adding foo | |
12 | adding foo.d/bAr.hg.d/BaR |
|
12 | adding foo.d/bAr.hg.d/BaR | |
13 | adding foo.d/baR.d.hg/bAR |
|
13 | adding foo.d/baR.d.hg/bAR | |
14 | adding foo.d/foo |
|
14 | adding foo.d/foo | |
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log |
|
15 | $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log | |
16 | $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid |
|
16 | $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid | |
17 |
|
17 | |||
18 | Test server address cannot be reused |
|
18 | Test server address cannot be reused | |
19 |
|
19 | |||
20 | #if windows |
|
20 | #if windows | |
21 | $ hg serve -p $HGPORT1 2>&1 |
|
21 | $ hg serve -p $HGPORT1 2>&1 | |
22 | abort: cannot start server at ':$HGPORT1': * (glob) |
|
22 | abort: cannot start server at ':$HGPORT1': * (glob) | |
23 | [255] |
|
23 | [255] | |
24 | #else |
|
24 | #else | |
25 | $ hg serve -p $HGPORT1 2>&1 |
|
25 | $ hg serve -p $HGPORT1 2>&1 | |
26 | abort: cannot start server at ':$HGPORT1': Address already in use |
|
26 | abort: cannot start server at ':$HGPORT1': Address already in use | |
27 | [255] |
|
27 | [255] | |
28 | #endif |
|
28 | #endif | |
29 | $ cd .. |
|
29 | $ cd .. | |
30 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS |
|
30 | $ cat hg1.pid hg2.pid >> $DAEMON_PIDS | |
31 |
|
31 | |||
32 | clone via stream |
|
32 | clone via stream | |
33 |
|
33 | |||
34 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 |
|
34 | $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | |
35 | streaming all changes |
|
35 | streaming all changes | |
36 | 6 files to transfer, 606 bytes of data |
|
36 | 6 files to transfer, 606 bytes of data | |
37 | transferred * bytes in * seconds (*/sec) (glob) |
|
37 | transferred * bytes in * seconds (*/sec) (glob) | |
38 | searching for changes |
|
38 | searching for changes | |
39 | no changes found |
|
39 | no changes found | |
40 | updating to branch default |
|
40 | updating to branch default | |
41 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | $ hg verify -R copy |
|
42 | $ hg verify -R copy | |
43 | checking changesets |
|
43 | checking changesets | |
44 | checking manifests |
|
44 | checking manifests | |
45 | crosschecking files in changesets and manifests |
|
45 | crosschecking files in changesets and manifests | |
46 | checking files |
|
46 | checking files | |
47 | 4 files, 1 changesets, 4 total revisions |
|
47 | 4 files, 1 changesets, 4 total revisions | |
48 |
|
48 | |||
49 | try to clone via stream, should use pull instead |
|
49 | try to clone via stream, should use pull instead | |
50 |
|
50 | |||
51 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 |
|
51 | $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2 | |
52 | requesting all changes |
|
52 | requesting all changes | |
53 | adding changesets |
|
53 | adding changesets | |
54 | adding manifests |
|
54 | adding manifests | |
55 | adding file changes |
|
55 | adding file changes | |
56 | added 1 changesets with 4 changes to 4 files |
|
56 | added 1 changesets with 4 changes to 4 files | |
57 | updating to branch default |
|
57 | updating to branch default | |
58 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
58 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
59 |
|
59 | |||
60 | clone via pull |
|
60 | clone via pull | |
61 |
|
61 | |||
62 | $ hg clone http://localhost:$HGPORT1/ copy-pull |
|
62 | $ hg clone http://localhost:$HGPORT1/ copy-pull | |
63 | requesting all changes |
|
63 | requesting all changes | |
64 | adding changesets |
|
64 | adding changesets | |
65 | adding manifests |
|
65 | adding manifests | |
66 | adding file changes |
|
66 | adding file changes | |
67 | added 1 changesets with 4 changes to 4 files |
|
67 | added 1 changesets with 4 changes to 4 files | |
68 | updating to branch default |
|
68 | updating to branch default | |
69 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
69 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 | $ hg verify -R copy-pull |
|
70 | $ hg verify -R copy-pull | |
71 | checking changesets |
|
71 | checking changesets | |
72 | checking manifests |
|
72 | checking manifests | |
73 | crosschecking files in changesets and manifests |
|
73 | crosschecking files in changesets and manifests | |
74 | checking files |
|
74 | checking files | |
75 | 4 files, 1 changesets, 4 total revisions |
|
75 | 4 files, 1 changesets, 4 total revisions | |
76 | $ cd test |
|
76 | $ cd test | |
77 | $ echo bar > bar |
|
77 | $ echo bar > bar | |
78 | $ hg commit -A -d '1 0' -m 2 |
|
78 | $ hg commit -A -d '1 0' -m 2 | |
79 | adding bar |
|
79 | adding bar | |
80 | $ cd .. |
|
80 | $ cd .. | |
81 |
|
81 | |||
82 | clone over http with --update |
|
82 | clone over http with --update | |
83 |
|
83 | |||
84 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 |
|
84 | $ hg clone http://localhost:$HGPORT1/ updated --update 0 | |
85 | requesting all changes |
|
85 | requesting all changes | |
86 | adding changesets |
|
86 | adding changesets | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | added 2 changesets with 5 changes to 5 files |
|
89 | added 2 changesets with 5 changes to 5 files | |
90 | updating to branch default |
|
90 | updating to branch default | |
91 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | $ hg log -r . -R updated |
|
92 | $ hg log -r . -R updated | |
93 | changeset: 0:8b6053c928fe |
|
93 | changeset: 0:8b6053c928fe | |
94 | user: test |
|
94 | user: test | |
95 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
95 | date: Thu Jan 01 00:00:00 1970 +0000 | |
96 | summary: 1 |
|
96 | summary: 1 | |
97 |
|
97 | |||
98 | $ rm -rf updated |
|
98 | $ rm -rf updated | |
99 |
|
99 | |||
100 | incoming via HTTP |
|
100 | incoming via HTTP | |
101 |
|
101 | |||
102 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial |
|
102 | $ hg clone http://localhost:$HGPORT1/ --rev 0 partial | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 1 changesets with 4 changes to 4 files |
|
106 | added 1 changesets with 4 changes to 4 files | |
107 | updating to branch default |
|
107 | updating to branch default | |
108 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
109 | $ cd partial |
|
109 | $ cd partial | |
110 | $ touch LOCAL |
|
110 | $ touch LOCAL | |
111 | $ hg ci -qAm LOCAL |
|
111 | $ hg ci -qAm LOCAL | |
112 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' |
|
112 | $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n' | |
113 | comparing with http://localhost:$HGPORT1/ |
|
113 | comparing with http://localhost:$HGPORT1/ | |
114 | searching for changes |
|
114 | searching for changes | |
115 | 2 |
|
115 | 2 | |
116 | $ cd .. |
|
116 | $ cd .. | |
117 |
|
117 | |||
118 | pull |
|
118 | pull | |
119 |
|
119 | |||
120 | $ cd copy-pull |
|
120 | $ cd copy-pull | |
121 | $ echo '[hooks]' >> .hg/hgrc |
|
121 | $ echo '[hooks]' >> .hg/hgrc | |
122 |
$ echo "changegroup = p |
|
122 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc | |
123 | $ hg pull |
|
123 | $ hg pull | |
124 | pulling from http://localhost:$HGPORT1/ |
|
124 | pulling from http://localhost:$HGPORT1/ | |
125 | searching for changes |
|
125 | searching for changes | |
126 | adding changesets |
|
126 | adding changesets | |
127 | adding manifests |
|
127 | adding manifests | |
128 | adding file changes |
|
128 | adding file changes | |
129 | added 1 changesets with 1 changes to 1 files |
|
129 | added 1 changesets with 1 changes to 1 files | |
130 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) |
|
130 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob) | |
131 | (run 'hg update' to get a working copy) |
|
131 | (run 'hg update' to get a working copy) | |
132 | $ cd .. |
|
132 | $ cd .. | |
133 |
|
133 | |||
134 | clone from invalid URL |
|
134 | clone from invalid URL | |
135 |
|
135 | |||
136 | $ hg clone http://localhost:$HGPORT/bad |
|
136 | $ hg clone http://localhost:$HGPORT/bad | |
137 | abort: HTTP Error 404: Not Found |
|
137 | abort: HTTP Error 404: Not Found | |
138 | [255] |
|
138 | [255] | |
139 |
|
139 | |||
140 | test http authentication |
|
140 | test http authentication | |
141 | + use the same server to test server side streaming preference |
|
141 | + use the same server to test server side streaming preference | |
142 |
|
142 | |||
143 | $ cd test |
|
143 | $ cd test | |
144 | $ cat << EOT > userpass.py |
|
144 | $ cat << EOT > userpass.py | |
145 | > import base64 |
|
145 | > import base64 | |
146 | > from mercurial.hgweb import common |
|
146 | > from mercurial.hgweb import common | |
147 | > def perform_authentication(hgweb, req, op): |
|
147 | > def perform_authentication(hgweb, req, op): | |
148 | > auth = req.env.get('HTTP_AUTHORIZATION') |
|
148 | > auth = req.env.get('HTTP_AUTHORIZATION') | |
149 | > if not auth: |
|
149 | > if not auth: | |
150 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', |
|
150 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who', | |
151 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) |
|
151 | > [('WWW-Authenticate', 'Basic Realm="mercurial"')]) | |
152 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: |
|
152 | > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']: | |
153 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') |
|
153 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no') | |
154 | > def extsetup(): |
|
154 | > def extsetup(): | |
155 | > common.permhooks.insert(0, perform_authentication) |
|
155 | > common.permhooks.insert(0, perform_authentication) | |
156 | > EOT |
|
156 | > EOT | |
157 | $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \ |
|
157 | $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \ | |
158 | > --config server.preferuncompressed=True \ |
|
158 | > --config server.preferuncompressed=True \ | |
159 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log |
|
159 | > --config web.push_ssl=False --config web.allow_push=* -A ../access.log | |
160 | $ cat pid >> $DAEMON_PIDS |
|
160 | $ cat pid >> $DAEMON_PIDS | |
161 |
|
161 | |||
162 | $ cat << EOF > get_pass.py |
|
162 | $ cat << EOF > get_pass.py | |
163 | > import getpass |
|
163 | > import getpass | |
164 | > def newgetpass(arg): |
|
164 | > def newgetpass(arg): | |
165 | > return "pass" |
|
165 | > return "pass" | |
166 | > getpass.getpass = newgetpass |
|
166 | > getpass.getpass = newgetpass | |
167 | > EOF |
|
167 | > EOF | |
168 |
|
168 | |||
169 | $ hg id http://localhost:$HGPORT2/ |
|
169 | $ hg id http://localhost:$HGPORT2/ | |
170 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
170 | abort: http authorization required for http://localhost:$HGPORT2/ | |
171 | [255] |
|
171 | [255] | |
172 | $ hg id http://localhost:$HGPORT2/ |
|
172 | $ hg id http://localhost:$HGPORT2/ | |
173 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
173 | abort: http authorization required for http://localhost:$HGPORT2/ | |
174 | [255] |
|
174 | [255] | |
175 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ |
|
175 | $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/ | |
176 | http authorization required for http://localhost:$HGPORT2/ |
|
176 | http authorization required for http://localhost:$HGPORT2/ | |
177 | realm: mercurial |
|
177 | realm: mercurial | |
178 | user: user |
|
178 | user: user | |
179 | password: 5fed3813f7f5 |
|
179 | password: 5fed3813f7f5 | |
180 | $ hg id http://user:pass@localhost:$HGPORT2/ |
|
180 | $ hg id http://user:pass@localhost:$HGPORT2/ | |
181 | 5fed3813f7f5 |
|
181 | 5fed3813f7f5 | |
182 | $ echo '[auth]' >> .hg/hgrc |
|
182 | $ echo '[auth]' >> .hg/hgrc | |
183 | $ echo 'l.schemes=http' >> .hg/hgrc |
|
183 | $ echo 'l.schemes=http' >> .hg/hgrc | |
184 | $ echo 'l.prefix=lo' >> .hg/hgrc |
|
184 | $ echo 'l.prefix=lo' >> .hg/hgrc | |
185 | $ echo 'l.username=user' >> .hg/hgrc |
|
185 | $ echo 'l.username=user' >> .hg/hgrc | |
186 | $ echo 'l.password=pass' >> .hg/hgrc |
|
186 | $ echo 'l.password=pass' >> .hg/hgrc | |
187 | $ hg id http://localhost:$HGPORT2/ |
|
187 | $ hg id http://localhost:$HGPORT2/ | |
188 | 5fed3813f7f5 |
|
188 | 5fed3813f7f5 | |
189 | $ hg id http://localhost:$HGPORT2/ |
|
189 | $ hg id http://localhost:$HGPORT2/ | |
190 | 5fed3813f7f5 |
|
190 | 5fed3813f7f5 | |
191 | $ hg id http://user@localhost:$HGPORT2/ |
|
191 | $ hg id http://user@localhost:$HGPORT2/ | |
192 | 5fed3813f7f5 |
|
192 | 5fed3813f7f5 | |
193 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 |
|
193 | $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1 | |
194 | streaming all changes |
|
194 | streaming all changes | |
195 | 7 files to transfer, 916 bytes of data |
|
195 | 7 files to transfer, 916 bytes of data | |
196 | transferred * bytes in * seconds (*/sec) (glob) |
|
196 | transferred * bytes in * seconds (*/sec) (glob) | |
197 | searching for changes |
|
197 | searching for changes | |
198 | no changes found |
|
198 | no changes found | |
199 | updating to branch default |
|
199 | updating to branch default | |
200 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
200 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
201 | --pull should override server's preferuncompressed |
|
201 | --pull should override server's preferuncompressed | |
202 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 |
|
202 | $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1 | |
203 | requesting all changes |
|
203 | requesting all changes | |
204 | adding changesets |
|
204 | adding changesets | |
205 | adding manifests |
|
205 | adding manifests | |
206 | adding file changes |
|
206 | adding file changes | |
207 | added 2 changesets with 5 changes to 5 files |
|
207 | added 2 changesets with 5 changes to 5 files | |
208 | updating to branch default |
|
208 | updating to branch default | |
209 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
209 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
210 |
|
210 | |||
211 | $ hg id http://user2@localhost:$HGPORT2/ |
|
211 | $ hg id http://user2@localhost:$HGPORT2/ | |
212 | abort: http authorization required for http://localhost:$HGPORT2/ |
|
212 | abort: http authorization required for http://localhost:$HGPORT2/ | |
213 | [255] |
|
213 | [255] | |
214 | $ hg id http://user:pass2@localhost:$HGPORT2/ |
|
214 | $ hg id http://user:pass2@localhost:$HGPORT2/ | |
215 | abort: HTTP Error 403: no |
|
215 | abort: HTTP Error 403: no | |
216 | [255] |
|
216 | [255] | |
217 |
|
217 | |||
218 | $ hg -R dest tag -r tip top |
|
218 | $ hg -R dest tag -r tip top | |
219 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ |
|
219 | $ hg -R dest push http://user:pass@localhost:$HGPORT2/ | |
220 | pushing to http://user:***@localhost:$HGPORT2/ |
|
220 | pushing to http://user:***@localhost:$HGPORT2/ | |
221 | searching for changes |
|
221 | searching for changes | |
222 | remote: adding changesets |
|
222 | remote: adding changesets | |
223 | remote: adding manifests |
|
223 | remote: adding manifests | |
224 | remote: adding file changes |
|
224 | remote: adding file changes | |
225 | remote: added 1 changesets with 1 changes to 1 files |
|
225 | remote: added 1 changesets with 1 changes to 1 files | |
226 | $ hg rollback -q |
|
226 | $ hg rollback -q | |
227 |
|
227 | |||
228 | $ cut -c38- ../access.log |
|
228 | $ cut -c38- ../access.log | |
229 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
229 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
230 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
230 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
231 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
231 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
232 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
232 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
233 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
233 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
234 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
234 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
235 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
235 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
236 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
236 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
237 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
237 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
238 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
238 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
239 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
239 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
240 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
240 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
241 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
241 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
242 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
242 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
243 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
243 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
244 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
244 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
245 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
245 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
246 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
246 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
247 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
247 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
248 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
248 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
249 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
249 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
250 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
250 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
251 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
251 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
252 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
252 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
253 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
253 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
254 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
254 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
255 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
255 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
256 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
256 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
257 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
257 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
258 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces |
|
258 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces | |
259 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
259 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
260 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
260 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
261 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
261 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
262 | "GET /?cmd=stream_out HTTP/1.1" 401 - |
|
262 | "GET /?cmd=stream_out HTTP/1.1" 401 - | |
263 | "GET /?cmd=stream_out HTTP/1.1" 200 - |
|
263 | "GET /?cmd=stream_out HTTP/1.1" 200 - | |
264 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d |
|
264 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d | |
265 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks |
|
265 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks | |
266 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
266 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
267 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
267 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
268 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D |
|
268 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D | |
269 | "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks |
|
269 | "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks | |
270 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks |
|
270 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks | |
271 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
271 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
272 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
272 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
273 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
273 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
274 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
274 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
275 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
275 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
276 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip |
|
276 | "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip | |
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces |
|
277 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces | |
278 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces |
|
278 | "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces | |
279 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
279 | "GET /?cmd=capabilities HTTP/1.1" 200 - | |
280 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 |
|
280 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 | |
281 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases |
|
281 | "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases | |
282 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
282 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
283 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
284 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
284 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
285 | "GET /?cmd=branchmap HTTP/1.1" 200 - |
|
285 | "GET /?cmd=branchmap HTTP/1.1" 200 - | |
286 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks |
|
286 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks | |
287 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 |
|
287 | "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 | |
288 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases |
|
288 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases | |
289 |
|
289 | |||
290 | $ cd .. |
|
290 | $ cd .. | |
291 |
|
291 | |||
292 | clone of serve with repo in root and unserved subrepo (issue2970) |
|
292 | clone of serve with repo in root and unserved subrepo (issue2970) | |
293 |
|
293 | |||
294 | $ hg --cwd test init sub |
|
294 | $ hg --cwd test init sub | |
295 | $ echo empty > test/sub/empty |
|
295 | $ echo empty > test/sub/empty | |
296 | $ hg --cwd test/sub add empty |
|
296 | $ hg --cwd test/sub add empty | |
297 | $ hg --cwd test/sub commit -qm 'add empty' |
|
297 | $ hg --cwd test/sub commit -qm 'add empty' | |
298 | $ hg --cwd test/sub tag -r 0 something |
|
298 | $ hg --cwd test/sub tag -r 0 something | |
299 | $ echo sub = sub > test/.hgsub |
|
299 | $ echo sub = sub > test/.hgsub | |
300 | $ hg --cwd test add .hgsub |
|
300 | $ hg --cwd test add .hgsub | |
301 | $ hg --cwd test commit -qm 'add subrepo' |
|
301 | $ hg --cwd test commit -qm 'add subrepo' | |
302 | $ hg clone http://localhost:$HGPORT noslash-clone |
|
302 | $ hg clone http://localhost:$HGPORT noslash-clone | |
303 | requesting all changes |
|
303 | requesting all changes | |
304 | adding changesets |
|
304 | adding changesets | |
305 | adding manifests |
|
305 | adding manifests | |
306 | adding file changes |
|
306 | adding file changes | |
307 | added 3 changesets with 7 changes to 7 files |
|
307 | added 3 changesets with 7 changes to 7 files | |
308 | updating to branch default |
|
308 | updating to branch default | |
309 | abort: HTTP Error 404: Not Found |
|
309 | abort: HTTP Error 404: Not Found | |
310 | [255] |
|
310 | [255] | |
311 | $ hg clone http://localhost:$HGPORT/ slash-clone |
|
311 | $ hg clone http://localhost:$HGPORT/ slash-clone | |
312 | requesting all changes |
|
312 | requesting all changes | |
313 | adding changesets |
|
313 | adding changesets | |
314 | adding manifests |
|
314 | adding manifests | |
315 | adding file changes |
|
315 | adding file changes | |
316 | added 3 changesets with 7 changes to 7 files |
|
316 | added 3 changesets with 7 changes to 7 files | |
317 | updating to branch default |
|
317 | updating to branch default | |
318 | abort: HTTP Error 404: Not Found |
|
318 | abort: HTTP Error 404: Not Found | |
319 | [255] |
|
319 | [255] | |
320 |
|
320 | |||
321 | check error log |
|
321 | check error log | |
322 |
|
322 | |||
323 | $ cat error.log |
|
323 | $ cat error.log |
@@ -1,403 +1,403 b'' | |||||
1 | #require serve ssl |
|
1 | #require serve ssl | |
2 |
|
2 | |||
3 | Proper https client requires the built-in ssl from Python 2.6. |
|
3 | Proper https client requires the built-in ssl from Python 2.6. | |
4 |
|
4 | |||
5 | Certificates created with: |
|
5 | Certificates created with: | |
6 | printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \ |
|
6 | printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \ | |
7 | openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem |
|
7 | openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem | |
8 | Can be dumped with: |
|
8 | Can be dumped with: | |
9 | openssl x509 -in pub.pem -text |
|
9 | openssl x509 -in pub.pem -text | |
10 |
|
10 | |||
11 | $ cat << EOT > priv.pem |
|
11 | $ cat << EOT > priv.pem | |
12 | > -----BEGIN PRIVATE KEY----- |
|
12 | > -----BEGIN PRIVATE KEY----- | |
13 | > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH |
|
13 | > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH | |
14 | > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8 |
|
14 | > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8 | |
15 | > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc |
|
15 | > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc | |
16 | > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG |
|
16 | > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG | |
17 | > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR |
|
17 | > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR | |
18 | > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy |
|
18 | > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy | |
19 | > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh |
|
19 | > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh | |
20 | > HY8gUVkVRVs= |
|
20 | > HY8gUVkVRVs= | |
21 | > -----END PRIVATE KEY----- |
|
21 | > -----END PRIVATE KEY----- | |
22 | > EOT |
|
22 | > EOT | |
23 |
|
23 | |||
24 | $ cat << EOT > pub.pem |
|
24 | $ cat << EOT > pub.pem | |
25 | > -----BEGIN CERTIFICATE----- |
|
25 | > -----BEGIN CERTIFICATE----- | |
26 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV |
|
26 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV | |
27 | > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw |
|
27 | > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw | |
28 | > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0 |
|
28 | > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0 | |
29 | > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL |
|
29 | > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL | |
30 | > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX |
|
30 | > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX | |
31 | > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm |
|
31 | > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm | |
32 | > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw |
|
32 | > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw | |
33 | > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl |
|
33 | > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl | |
34 | > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c= |
|
34 | > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c= | |
35 | > -----END CERTIFICATE----- |
|
35 | > -----END CERTIFICATE----- | |
36 | > EOT |
|
36 | > EOT | |
37 | $ cat priv.pem pub.pem >> server.pem |
|
37 | $ cat priv.pem pub.pem >> server.pem | |
38 | $ PRIV=`pwd`/server.pem |
|
38 | $ PRIV=`pwd`/server.pem | |
39 |
|
39 | |||
40 | $ cat << EOT > pub-other.pem |
|
40 | $ cat << EOT > pub-other.pem | |
41 | > -----BEGIN CERTIFICATE----- |
|
41 | > -----BEGIN CERTIFICATE----- | |
42 | > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV |
|
42 | > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV | |
43 | > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw |
|
43 | > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw | |
44 | > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0 |
|
44 | > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0 | |
45 | > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL |
|
45 | > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL | |
46 | > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo |
|
46 | > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo | |
47 | > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN |
|
47 | > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN | |
48 | > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw |
|
48 | > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw | |
49 | > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6 |
|
49 | > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6 | |
50 | > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig= |
|
50 | > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig= | |
51 | > -----END CERTIFICATE----- |
|
51 | > -----END CERTIFICATE----- | |
52 | > EOT |
|
52 | > EOT | |
53 |
|
53 | |||
54 | pub.pem patched with other notBefore / notAfter: |
|
54 | pub.pem patched with other notBefore / notAfter: | |
55 |
|
55 | |||
56 | $ cat << EOT > pub-not-yet.pem |
|
56 | $ cat << EOT > pub-not-yet.pem | |
57 | > -----BEGIN CERTIFICATE----- |
|
57 | > -----BEGIN CERTIFICATE----- | |
58 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs |
|
58 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs | |
59 | > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw |
|
59 | > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw | |
60 | > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv |
|
60 | > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv | |
61 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK |
|
61 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK | |
62 | > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA |
|
62 | > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA | |
63 | > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T |
|
63 | > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T | |
64 | > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb |
|
64 | > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb | |
65 | > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0= |
|
65 | > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0= | |
66 | > -----END CERTIFICATE----- |
|
66 | > -----END CERTIFICATE----- | |
67 | > EOT |
|
67 | > EOT | |
68 | $ cat priv.pem pub-not-yet.pem > server-not-yet.pem |
|
68 | $ cat priv.pem pub-not-yet.pem > server-not-yet.pem | |
69 |
|
69 | |||
70 | $ cat << EOT > pub-expired.pem |
|
70 | $ cat << EOT > pub-expired.pem | |
71 | > -----BEGIN CERTIFICATE----- |
|
71 | > -----BEGIN CERTIFICATE----- | |
72 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs |
|
72 | > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs | |
73 | > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx |
|
73 | > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx | |
74 | > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv |
|
74 | > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv | |
75 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK |
|
75 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK | |
76 | > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA |
|
76 | > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA | |
77 | > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T |
|
77 | > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T | |
78 | > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt |
|
78 | > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt | |
79 | > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ= |
|
79 | > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ= | |
80 | > -----END CERTIFICATE----- |
|
80 | > -----END CERTIFICATE----- | |
81 | > EOT |
|
81 | > EOT | |
82 | $ cat priv.pem pub-expired.pem > server-expired.pem |
|
82 | $ cat priv.pem pub-expired.pem > server-expired.pem | |
83 |
|
83 | |||
84 | Client certificates created with: |
|
84 | Client certificates created with: | |
85 | openssl genrsa -aes128 -passout pass:1234 -out client-key.pem 512 |
|
85 | openssl genrsa -aes128 -passout pass:1234 -out client-key.pem 512 | |
86 | openssl rsa -in client-key.pem -passin pass:1234 -out client-key-decrypted.pem |
|
86 | openssl rsa -in client-key.pem -passin pass:1234 -out client-key-decrypted.pem | |
87 | printf '.\n.\n.\n.\n.\n.\nhg-client@localhost\n.\n.\n' | \ |
|
87 | printf '.\n.\n.\n.\n.\n.\nhg-client@localhost\n.\n.\n' | \ | |
88 | openssl req -new -key client-key.pem -passin pass:1234 -out client-csr.pem |
|
88 | openssl req -new -key client-key.pem -passin pass:1234 -out client-csr.pem | |
89 | openssl x509 -req -days 9000 -in client-csr.pem -CA pub.pem -CAkey priv.pem \ |
|
89 | openssl x509 -req -days 9000 -in client-csr.pem -CA pub.pem -CAkey priv.pem \ | |
90 | -set_serial 01 -out client-cert.pem |
|
90 | -set_serial 01 -out client-cert.pem | |
91 |
|
91 | |||
92 | $ cat << EOT > client-key.pem |
|
92 | $ cat << EOT > client-key.pem | |
93 | > -----BEGIN RSA PRIVATE KEY----- |
|
93 | > -----BEGIN RSA PRIVATE KEY----- | |
94 | > Proc-Type: 4,ENCRYPTED |
|
94 | > Proc-Type: 4,ENCRYPTED | |
95 | > DEK-Info: AES-128-CBC,C8B8F103A61A336FB0716D1C0F8BB2E8 |
|
95 | > DEK-Info: AES-128-CBC,C8B8F103A61A336FB0716D1C0F8BB2E8 | |
96 | > |
|
96 | > | |
97 | > JolMlCFjEW3q3JJjO9z99NJWeJbFgF5DpUOkfSCxH56hxxtZb9x++rBvBZkxX1bF |
|
97 | > JolMlCFjEW3q3JJjO9z99NJWeJbFgF5DpUOkfSCxH56hxxtZb9x++rBvBZkxX1bF | |
98 | > BAIe+iI90+jdCLwxbILWuFcrJUaLC5WmO14XDKYVmr2eW9e4MiCYOlO0Q6a9rDFS |
|
98 | > BAIe+iI90+jdCLwxbILWuFcrJUaLC5WmO14XDKYVmr2eW9e4MiCYOlO0Q6a9rDFS | |
99 | > jctRCfvubOXFHbBGLH8uKEMpXEkP7Lc60FiIukqjuQEivJjrQirVtZCGwyk3qUi7 |
|
99 | > jctRCfvubOXFHbBGLH8uKEMpXEkP7Lc60FiIukqjuQEivJjrQirVtZCGwyk3qUi7 | |
100 | > Eyh4Lo63IKGu8T1Bkmn2kaMvFhu7nC/CQLBjSq0YYI1tmCOkVb/3tPrz8oqgDJp2 |
|
100 | > Eyh4Lo63IKGu8T1Bkmn2kaMvFhu7nC/CQLBjSq0YYI1tmCOkVb/3tPrz8oqgDJp2 | |
101 | > u7bLS3q0xDNZ52nVrKIoZC/UlRXGlPyzPpa70/jPIdfCbkwDaBpRVXc+62Pj2n5/ |
|
101 | > u7bLS3q0xDNZ52nVrKIoZC/UlRXGlPyzPpa70/jPIdfCbkwDaBpRVXc+62Pj2n5/ | |
102 | > CnO2xaKwfOG6pDvanBhFD72vuBOkAYlFZPiEku4sc2WlNggsSWCPCIFwzmiHjKIl |
|
102 | > CnO2xaKwfOG6pDvanBhFD72vuBOkAYlFZPiEku4sc2WlNggsSWCPCIFwzmiHjKIl | |
103 | > bWmdoTq3nb7sNfnBbV0OCa7fS1dFwCm4R1NC7ELENu0= |
|
103 | > bWmdoTq3nb7sNfnBbV0OCa7fS1dFwCm4R1NC7ELENu0= | |
104 | > -----END RSA PRIVATE KEY----- |
|
104 | > -----END RSA PRIVATE KEY----- | |
105 | > EOT |
|
105 | > EOT | |
106 |
|
106 | |||
107 | $ cat << EOT > client-key-decrypted.pem |
|
107 | $ cat << EOT > client-key-decrypted.pem | |
108 | > -----BEGIN RSA PRIVATE KEY----- |
|
108 | > -----BEGIN RSA PRIVATE KEY----- | |
109 | > MIIBOgIBAAJBAJs4LS3glAYU92bg5kPgRPNW84ewB0fWJfAKccCp1ACHAdZPeaKb |
|
109 | > MIIBOgIBAAJBAJs4LS3glAYU92bg5kPgRPNW84ewB0fWJfAKccCp1ACHAdZPeaKb | |
110 | > FCinVMYKAVbVqBkyrZ/Tyr8aSfMz4xO4+KsCAwEAAQJAeKDr25+Q6jkZHEbkLRP6 |
|
110 | > FCinVMYKAVbVqBkyrZ/Tyr8aSfMz4xO4+KsCAwEAAQJAeKDr25+Q6jkZHEbkLRP6 | |
111 | > AfMtR+Ixhk6TJT24sbZKIC2V8KuJTDEvUhLU0CAr1nH79bDqiSsecOiVCr2HHyfT |
|
111 | > AfMtR+Ixhk6TJT24sbZKIC2V8KuJTDEvUhLU0CAr1nH79bDqiSsecOiVCr2HHyfT | |
112 | > AQIhAM2C5rHbTs9R3PkywFEqq1gU3ztCnpiWglO7/cIkuGBhAiEAwVpMSAf77kop |
|
112 | > AQIhAM2C5rHbTs9R3PkywFEqq1gU3ztCnpiWglO7/cIkuGBhAiEAwVpMSAf77kop | |
113 | > 4h/1kWsgMALQTJNsXd4CEUK4BOxvJIsCIQCbarVAKBQvoT81jfX27AfscsxnKnh5 |
|
113 | > 4h/1kWsgMALQTJNsXd4CEUK4BOxvJIsCIQCbarVAKBQvoT81jfX27AfscsxnKnh5 | |
114 | > +MjSvkanvdFZwQIgbbcTefwt1LV4trtz2SR0i0nNcOZmo40Kl0jIquKO3qkCIH01 |
|
114 | > +MjSvkanvdFZwQIgbbcTefwt1LV4trtz2SR0i0nNcOZmo40Kl0jIquKO3qkCIH01 | |
115 | > mJHzZr3+jQqeIFtr5P+Xqi30DJxgrnEobbJ0KFjY |
|
115 | > mJHzZr3+jQqeIFtr5P+Xqi30DJxgrnEobbJ0KFjY | |
116 | > -----END RSA PRIVATE KEY----- |
|
116 | > -----END RSA PRIVATE KEY----- | |
117 | > EOT |
|
117 | > EOT | |
118 |
|
118 | |||
119 | $ cat << EOT > client-cert.pem |
|
119 | $ cat << EOT > client-cert.pem | |
120 | > -----BEGIN CERTIFICATE----- |
|
120 | > -----BEGIN CERTIFICATE----- | |
121 | > MIIBPjCB6QIBATANBgkqhkiG9w0BAQsFADAxMRIwEAYDVQQDDAlsb2NhbGhvc3Qx |
|
121 | > MIIBPjCB6QIBATANBgkqhkiG9w0BAQsFADAxMRIwEAYDVQQDDAlsb2NhbGhvc3Qx | |
122 | > GzAZBgkqhkiG9w0BCQEWDGhnQGxvY2FsaG9zdDAeFw0xNTA1MDcwNjI5NDVaFw0z |
|
122 | > GzAZBgkqhkiG9w0BCQEWDGhnQGxvY2FsaG9zdDAeFw0xNTA1MDcwNjI5NDVaFw0z | |
123 | > OTEyMjcwNjI5NDVaMCQxIjAgBgkqhkiG9w0BCQEWE2hnLWNsaWVudEBsb2NhbGhv |
|
123 | > OTEyMjcwNjI5NDVaMCQxIjAgBgkqhkiG9w0BCQEWE2hnLWNsaWVudEBsb2NhbGhv | |
124 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAmzgtLeCUBhT3ZuDmQ+BE81bzh7AH |
|
124 | > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAmzgtLeCUBhT3ZuDmQ+BE81bzh7AH | |
125 | > R9Yl8ApxwKnUAIcB1k95opsUKKdUxgoBVtWoGTKtn9PKvxpJ8zPjE7j4qwIDAQAB |
|
125 | > R9Yl8ApxwKnUAIcB1k95opsUKKdUxgoBVtWoGTKtn9PKvxpJ8zPjE7j4qwIDAQAB | |
126 | > MA0GCSqGSIb3DQEBCwUAA0EAfBTqBG5pYhuGk+ZnyUufgS+d7Nk/sZAZjNdCAEj/ |
|
126 | > MA0GCSqGSIb3DQEBCwUAA0EAfBTqBG5pYhuGk+ZnyUufgS+d7Nk/sZAZjNdCAEj/ | |
127 | > NFPo5fR1jM6jlEWoWbeg298+SkjV7tfO+2nt0otUFkdM6A== |
|
127 | > NFPo5fR1jM6jlEWoWbeg298+SkjV7tfO+2nt0otUFkdM6A== | |
128 | > -----END CERTIFICATE----- |
|
128 | > -----END CERTIFICATE----- | |
129 | > EOT |
|
129 | > EOT | |
130 |
|
130 | |||
131 | $ hg init test |
|
131 | $ hg init test | |
132 | $ cd test |
|
132 | $ cd test | |
133 | $ echo foo>foo |
|
133 | $ echo foo>foo | |
134 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg |
|
134 | $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg | |
135 | $ echo foo>foo.d/foo |
|
135 | $ echo foo>foo.d/foo | |
136 | $ echo bar>foo.d/bAr.hg.d/BaR |
|
136 | $ echo bar>foo.d/bAr.hg.d/BaR | |
137 | $ echo bar>foo.d/baR.d.hg/bAR |
|
137 | $ echo bar>foo.d/baR.d.hg/bAR | |
138 | $ hg commit -A -m 1 |
|
138 | $ hg commit -A -m 1 | |
139 | adding foo |
|
139 | adding foo | |
140 | adding foo.d/bAr.hg.d/BaR |
|
140 | adding foo.d/bAr.hg.d/BaR | |
141 | adding foo.d/baR.d.hg/bAR |
|
141 | adding foo.d/baR.d.hg/bAR | |
142 | adding foo.d/foo |
|
142 | adding foo.d/foo | |
143 | $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV |
|
143 | $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV | |
144 | $ cat ../hg0.pid >> $DAEMON_PIDS |
|
144 | $ cat ../hg0.pid >> $DAEMON_PIDS | |
145 |
|
145 | |||
146 | cacert not found |
|
146 | cacert not found | |
147 |
|
147 | |||
148 | $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/ |
|
148 | $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/ | |
149 | abort: could not find web.cacerts: no-such.pem |
|
149 | abort: could not find web.cacerts: no-such.pem | |
150 | [255] |
|
150 | [255] | |
151 |
|
151 | |||
152 | Test server address cannot be reused |
|
152 | Test server address cannot be reused | |
153 |
|
153 | |||
154 | #if windows |
|
154 | #if windows | |
155 | $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 |
|
155 | $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 | |
156 | abort: cannot start server at ':$HGPORT': |
|
156 | abort: cannot start server at ':$HGPORT': | |
157 | [255] |
|
157 | [255] | |
158 | #else |
|
158 | #else | |
159 | $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 |
|
159 | $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 | |
160 | abort: cannot start server at ':$HGPORT': Address already in use |
|
160 | abort: cannot start server at ':$HGPORT': Address already in use | |
161 | [255] |
|
161 | [255] | |
162 | #endif |
|
162 | #endif | |
163 | $ cd .. |
|
163 | $ cd .. | |
164 |
|
164 | |||
165 | OS X has a dummy CA cert that enables use of the system CA store when using |
|
165 | OS X has a dummy CA cert that enables use of the system CA store when using | |
166 | Apple's OpenSSL. This trick do not work with plain OpenSSL. |
|
166 | Apple's OpenSSL. This trick do not work with plain OpenSSL. | |
167 |
|
167 | |||
168 | $ DISABLEOSXDUMMYCERT= |
|
168 | $ DISABLEOSXDUMMYCERT= | |
169 | #if defaultcacerts |
|
169 | #if defaultcacerts | |
170 | $ hg clone https://localhost:$HGPORT/ copy-pull |
|
170 | $ hg clone https://localhost:$HGPORT/ copy-pull | |
171 | abort: error: *certificate verify failed* (glob) |
|
171 | abort: error: *certificate verify failed* (glob) | |
172 | [255] |
|
172 | [255] | |
173 |
|
173 | |||
174 | $ DISABLEOSXDUMMYCERT="--config=web.cacerts=!" |
|
174 | $ DISABLEOSXDUMMYCERT="--config=web.cacerts=!" | |
175 | #endif |
|
175 | #endif | |
176 |
|
176 | |||
177 | clone via pull |
|
177 | clone via pull | |
178 |
|
178 | |||
179 | $ hg clone https://localhost:$HGPORT/ copy-pull $DISABLEOSXDUMMYCERT |
|
179 | $ hg clone https://localhost:$HGPORT/ copy-pull $DISABLEOSXDUMMYCERT | |
180 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
180 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
181 | requesting all changes |
|
181 | requesting all changes | |
182 | adding changesets |
|
182 | adding changesets | |
183 | adding manifests |
|
183 | adding manifests | |
184 | adding file changes |
|
184 | adding file changes | |
185 | added 1 changesets with 4 changes to 4 files |
|
185 | added 1 changesets with 4 changes to 4 files | |
186 | updating to branch default |
|
186 | updating to branch default | |
187 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
187 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
188 | $ hg verify -R copy-pull |
|
188 | $ hg verify -R copy-pull | |
189 | checking changesets |
|
189 | checking changesets | |
190 | checking manifests |
|
190 | checking manifests | |
191 | crosschecking files in changesets and manifests |
|
191 | crosschecking files in changesets and manifests | |
192 | checking files |
|
192 | checking files | |
193 | 4 files, 1 changesets, 4 total revisions |
|
193 | 4 files, 1 changesets, 4 total revisions | |
194 | $ cd test |
|
194 | $ cd test | |
195 | $ echo bar > bar |
|
195 | $ echo bar > bar | |
196 | $ hg commit -A -d '1 0' -m 2 |
|
196 | $ hg commit -A -d '1 0' -m 2 | |
197 | adding bar |
|
197 | adding bar | |
198 | $ cd .. |
|
198 | $ cd .. | |
199 |
|
199 | |||
200 | pull without cacert |
|
200 | pull without cacert | |
201 |
|
201 | |||
202 | $ cd copy-pull |
|
202 | $ cd copy-pull | |
203 | $ echo '[hooks]' >> .hg/hgrc |
|
203 | $ echo '[hooks]' >> .hg/hgrc | |
204 |
$ echo "changegroup = p |
|
204 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc | |
205 | $ hg pull $DISABLEOSXDUMMYCERT |
|
205 | $ hg pull $DISABLEOSXDUMMYCERT | |
206 | pulling from https://localhost:$HGPORT/ |
|
206 | pulling from https://localhost:$HGPORT/ | |
207 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
207 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
208 | searching for changes |
|
208 | searching for changes | |
209 | adding changesets |
|
209 | adding changesets | |
210 | adding manifests |
|
210 | adding manifests | |
211 | adding file changes |
|
211 | adding file changes | |
212 | added 1 changesets with 1 changes to 1 files |
|
212 | added 1 changesets with 1 changes to 1 files | |
213 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=https://localhost:$HGPORT/ (glob) |
|
213 | changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=https://localhost:$HGPORT/ (glob) | |
214 | (run 'hg update' to get a working copy) |
|
214 | (run 'hg update' to get a working copy) | |
215 | $ cd .. |
|
215 | $ cd .. | |
216 |
|
216 | |||
217 | cacert configured in local repo |
|
217 | cacert configured in local repo | |
218 |
|
218 | |||
219 | $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu |
|
219 | $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu | |
220 | $ echo "[web]" >> copy-pull/.hg/hgrc |
|
220 | $ echo "[web]" >> copy-pull/.hg/hgrc | |
221 | $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc |
|
221 | $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc | |
222 | $ hg -R copy-pull pull --traceback |
|
222 | $ hg -R copy-pull pull --traceback | |
223 | pulling from https://localhost:$HGPORT/ |
|
223 | pulling from https://localhost:$HGPORT/ | |
224 | searching for changes |
|
224 | searching for changes | |
225 | no changes found |
|
225 | no changes found | |
226 | $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc |
|
226 | $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc | |
227 |
|
227 | |||
228 | cacert configured globally, also testing expansion of environment |
|
228 | cacert configured globally, also testing expansion of environment | |
229 | variables in the filename |
|
229 | variables in the filename | |
230 |
|
230 | |||
231 | $ echo "[web]" >> $HGRCPATH |
|
231 | $ echo "[web]" >> $HGRCPATH | |
232 | $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH |
|
232 | $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH | |
233 | $ P=`pwd` hg -R copy-pull pull |
|
233 | $ P=`pwd` hg -R copy-pull pull | |
234 | pulling from https://localhost:$HGPORT/ |
|
234 | pulling from https://localhost:$HGPORT/ | |
235 | searching for changes |
|
235 | searching for changes | |
236 | no changes found |
|
236 | no changes found | |
237 | $ P=`pwd` hg -R copy-pull pull --insecure |
|
237 | $ P=`pwd` hg -R copy-pull pull --insecure | |
238 | pulling from https://localhost:$HGPORT/ |
|
238 | pulling from https://localhost:$HGPORT/ | |
239 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
239 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
240 | searching for changes |
|
240 | searching for changes | |
241 | no changes found |
|
241 | no changes found | |
242 |
|
242 | |||
243 | cacert mismatch |
|
243 | cacert mismatch | |
244 |
|
244 | |||
245 | $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ |
|
245 | $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ | |
246 | pulling from https://127.0.0.1:$HGPORT/ |
|
246 | pulling from https://127.0.0.1:$HGPORT/ | |
247 | abort: 127.0.0.1 certificate error: certificate is for localhost |
|
247 | abort: 127.0.0.1 certificate error: certificate is for localhost | |
248 | (configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely) |
|
248 | (configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely) | |
249 | [255] |
|
249 | [255] | |
250 | $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure |
|
250 | $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure | |
251 | pulling from https://127.0.0.1:$HGPORT/ |
|
251 | pulling from https://127.0.0.1:$HGPORT/ | |
252 | warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
252 | warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
253 | searching for changes |
|
253 | searching for changes | |
254 | no changes found |
|
254 | no changes found | |
255 | $ hg -R copy-pull pull --config web.cacerts=pub-other.pem |
|
255 | $ hg -R copy-pull pull --config web.cacerts=pub-other.pem | |
256 | pulling from https://localhost:$HGPORT/ |
|
256 | pulling from https://localhost:$HGPORT/ | |
257 | abort: error: *certificate verify failed* (glob) |
|
257 | abort: error: *certificate verify failed* (glob) | |
258 | [255] |
|
258 | [255] | |
259 | $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure |
|
259 | $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure | |
260 | pulling from https://localhost:$HGPORT/ |
|
260 | pulling from https://localhost:$HGPORT/ | |
261 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
261 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
262 | searching for changes |
|
262 | searching for changes | |
263 | no changes found |
|
263 | no changes found | |
264 |
|
264 | |||
265 | Test server cert which isn't valid yet |
|
265 | Test server cert which isn't valid yet | |
266 |
|
266 | |||
267 | $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem |
|
267 | $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem | |
268 | $ cat hg1.pid >> $DAEMON_PIDS |
|
268 | $ cat hg1.pid >> $DAEMON_PIDS | |
269 | $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/ |
|
269 | $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/ | |
270 | pulling from https://localhost:$HGPORT1/ |
|
270 | pulling from https://localhost:$HGPORT1/ | |
271 | abort: error: *certificate verify failed* (glob) |
|
271 | abort: error: *certificate verify failed* (glob) | |
272 | [255] |
|
272 | [255] | |
273 |
|
273 | |||
274 | Test server cert which no longer is valid |
|
274 | Test server cert which no longer is valid | |
275 |
|
275 | |||
276 | $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem |
|
276 | $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem | |
277 | $ cat hg2.pid >> $DAEMON_PIDS |
|
277 | $ cat hg2.pid >> $DAEMON_PIDS | |
278 | $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/ |
|
278 | $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/ | |
279 | pulling from https://localhost:$HGPORT2/ |
|
279 | pulling from https://localhost:$HGPORT2/ | |
280 | abort: error: *certificate verify failed* (glob) |
|
280 | abort: error: *certificate verify failed* (glob) | |
281 | [255] |
|
281 | [255] | |
282 |
|
282 | |||
283 | Fingerprints |
|
283 | Fingerprints | |
284 |
|
284 | |||
285 | $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc |
|
285 | $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc | |
286 | $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc |
|
286 | $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc | |
287 | $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc |
|
287 | $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc | |
288 |
|
288 | |||
289 | - works without cacerts |
|
289 | - works without cacerts | |
290 | $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! |
|
290 | $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=! | |
291 | 5fed3813f7f5 |
|
291 | 5fed3813f7f5 | |
292 |
|
292 | |||
293 | - fails when cert doesn't match hostname (port is ignored) |
|
293 | - fails when cert doesn't match hostname (port is ignored) | |
294 | $ hg -R copy-pull id https://localhost:$HGPORT1/ |
|
294 | $ hg -R copy-pull id https://localhost:$HGPORT1/ | |
295 | abort: certificate for localhost has unexpected fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b |
|
295 | abort: certificate for localhost has unexpected fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b | |
296 | (check hostfingerprint configuration) |
|
296 | (check hostfingerprint configuration) | |
297 | [255] |
|
297 | [255] | |
298 |
|
298 | |||
299 |
|
299 | |||
300 | - ignores that certificate doesn't match hostname |
|
300 | - ignores that certificate doesn't match hostname | |
301 | $ hg -R copy-pull id https://127.0.0.1:$HGPORT/ |
|
301 | $ hg -R copy-pull id https://127.0.0.1:$HGPORT/ | |
302 | 5fed3813f7f5 |
|
302 | 5fed3813f7f5 | |
303 |
|
303 | |||
304 | HGPORT1 is reused below for tinyproxy tests. Kill that server. |
|
304 | HGPORT1 is reused below for tinyproxy tests. Kill that server. | |
305 | $ killdaemons.py hg1.pid |
|
305 | $ killdaemons.py hg1.pid | |
306 |
|
306 | |||
307 | Prepare for connecting through proxy |
|
307 | Prepare for connecting through proxy | |
308 |
|
308 | |||
309 | $ tinyproxy.py $HGPORT1 localhost >proxy.log </dev/null 2>&1 & |
|
309 | $ tinyproxy.py $HGPORT1 localhost >proxy.log </dev/null 2>&1 & | |
310 | $ while [ ! -f proxy.pid ]; do sleep 0; done |
|
310 | $ while [ ! -f proxy.pid ]; do sleep 0; done | |
311 | $ cat proxy.pid >> $DAEMON_PIDS |
|
311 | $ cat proxy.pid >> $DAEMON_PIDS | |
312 |
|
312 | |||
313 | $ echo "[http_proxy]" >> copy-pull/.hg/hgrc |
|
313 | $ echo "[http_proxy]" >> copy-pull/.hg/hgrc | |
314 | $ echo "always=True" >> copy-pull/.hg/hgrc |
|
314 | $ echo "always=True" >> copy-pull/.hg/hgrc | |
315 | $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc |
|
315 | $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc | |
316 | $ echo "localhost =" >> copy-pull/.hg/hgrc |
|
316 | $ echo "localhost =" >> copy-pull/.hg/hgrc | |
317 |
|
317 | |||
318 | Test unvalidated https through proxy |
|
318 | Test unvalidated https through proxy | |
319 |
|
319 | |||
320 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback |
|
320 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback | |
321 | pulling from https://localhost:$HGPORT/ |
|
321 | pulling from https://localhost:$HGPORT/ | |
322 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) |
|
322 | warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) | |
323 | searching for changes |
|
323 | searching for changes | |
324 | no changes found |
|
324 | no changes found | |
325 |
|
325 | |||
326 | Test https with cacert and fingerprint through proxy |
|
326 | Test https with cacert and fingerprint through proxy | |
327 |
|
327 | |||
328 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem |
|
328 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem | |
329 | pulling from https://localhost:$HGPORT/ |
|
329 | pulling from https://localhost:$HGPORT/ | |
330 | searching for changes |
|
330 | searching for changes | |
331 | no changes found |
|
331 | no changes found | |
332 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/ |
|
332 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/ | |
333 | pulling from https://127.0.0.1:$HGPORT/ |
|
333 | pulling from https://127.0.0.1:$HGPORT/ | |
334 | searching for changes |
|
334 | searching for changes | |
335 | no changes found |
|
335 | no changes found | |
336 |
|
336 | |||
337 | Test https with cert problems through proxy |
|
337 | Test https with cert problems through proxy | |
338 |
|
338 | |||
339 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem |
|
339 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem | |
340 | pulling from https://localhost:$HGPORT/ |
|
340 | pulling from https://localhost:$HGPORT/ | |
341 | abort: error: *certificate verify failed* (glob) |
|
341 | abort: error: *certificate verify failed* (glob) | |
342 | [255] |
|
342 | [255] | |
343 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/ |
|
343 | $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/ | |
344 | pulling from https://localhost:$HGPORT2/ |
|
344 | pulling from https://localhost:$HGPORT2/ | |
345 | abort: error: *certificate verify failed* (glob) |
|
345 | abort: error: *certificate verify failed* (glob) | |
346 | [255] |
|
346 | [255] | |
347 |
|
347 | |||
348 |
|
348 | |||
349 | $ killdaemons.py hg0.pid |
|
349 | $ killdaemons.py hg0.pid | |
350 |
|
350 | |||
351 | #if sslcontext |
|
351 | #if sslcontext | |
352 |
|
352 | |||
353 | Start patched hgweb that requires client certificates: |
|
353 | Start patched hgweb that requires client certificates: | |
354 |
|
354 | |||
355 | $ cat << EOT > reqclientcert.py |
|
355 | $ cat << EOT > reqclientcert.py | |
356 | > import ssl |
|
356 | > import ssl | |
357 | > from mercurial.hgweb import server |
|
357 | > from mercurial.hgweb import server | |
358 | > class _httprequesthandlersslclientcert(server._httprequesthandlerssl): |
|
358 | > class _httprequesthandlersslclientcert(server._httprequesthandlerssl): | |
359 | > @staticmethod |
|
359 | > @staticmethod | |
360 | > def preparehttpserver(httpserver, ssl_cert): |
|
360 | > def preparehttpserver(httpserver, ssl_cert): | |
361 | > sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) |
|
361 | > sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) | |
362 | > sslcontext.verify_mode = ssl.CERT_REQUIRED |
|
362 | > sslcontext.verify_mode = ssl.CERT_REQUIRED | |
363 | > sslcontext.load_cert_chain(ssl_cert) |
|
363 | > sslcontext.load_cert_chain(ssl_cert) | |
364 | > # verify clients by server certificate |
|
364 | > # verify clients by server certificate | |
365 | > sslcontext.load_verify_locations(ssl_cert) |
|
365 | > sslcontext.load_verify_locations(ssl_cert) | |
366 | > httpserver.socket = sslcontext.wrap_socket(httpserver.socket, |
|
366 | > httpserver.socket = sslcontext.wrap_socket(httpserver.socket, | |
367 | > server_side=True) |
|
367 | > server_side=True) | |
368 | > server._httprequesthandlerssl = _httprequesthandlersslclientcert |
|
368 | > server._httprequesthandlerssl = _httprequesthandlersslclientcert | |
369 | > EOT |
|
369 | > EOT | |
370 | $ cd test |
|
370 | $ cd test | |
371 | $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV \ |
|
371 | $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV \ | |
372 | > --config extensions.reqclientcert=../reqclientcert.py |
|
372 | > --config extensions.reqclientcert=../reqclientcert.py | |
373 | $ cat ../hg0.pid >> $DAEMON_PIDS |
|
373 | $ cat ../hg0.pid >> $DAEMON_PIDS | |
374 | $ cd .. |
|
374 | $ cd .. | |
375 |
|
375 | |||
376 | without client certificate: |
|
376 | without client certificate: | |
377 |
|
377 | |||
378 | $ P=`pwd` hg id https://localhost:$HGPORT/ |
|
378 | $ P=`pwd` hg id https://localhost:$HGPORT/ | |
379 | abort: error: *handshake failure* (glob) |
|
379 | abort: error: *handshake failure* (glob) | |
380 | [255] |
|
380 | [255] | |
381 |
|
381 | |||
382 | with client certificate: |
|
382 | with client certificate: | |
383 |
|
383 | |||
384 | $ cat << EOT >> $HGRCPATH |
|
384 | $ cat << EOT >> $HGRCPATH | |
385 | > [auth] |
|
385 | > [auth] | |
386 | > l.prefix = localhost |
|
386 | > l.prefix = localhost | |
387 | > l.cert = client-cert.pem |
|
387 | > l.cert = client-cert.pem | |
388 | > l.key = client-key.pem |
|
388 | > l.key = client-key.pem | |
389 | > EOT |
|
389 | > EOT | |
390 |
|
390 | |||
391 | $ P=`pwd` hg id https://localhost:$HGPORT/ \ |
|
391 | $ P=`pwd` hg id https://localhost:$HGPORT/ \ | |
392 | > --config auth.l.key=client-key-decrypted.pem |
|
392 | > --config auth.l.key=client-key-decrypted.pem | |
393 | 5fed3813f7f5 |
|
393 | 5fed3813f7f5 | |
394 |
|
394 | |||
395 | $ printf '1234\n' | env P=`pwd` hg id https://localhost:$HGPORT/ \ |
|
395 | $ printf '1234\n' | env P=`pwd` hg id https://localhost:$HGPORT/ \ | |
396 | > --config ui.interactive=True --config ui.nontty=True |
|
396 | > --config ui.interactive=True --config ui.nontty=True | |
397 | passphrase for client-key.pem: 5fed3813f7f5 |
|
397 | passphrase for client-key.pem: 5fed3813f7f5 | |
398 |
|
398 | |||
399 | $ env P=`pwd` hg id https://localhost:$HGPORT/ |
|
399 | $ env P=`pwd` hg id https://localhost:$HGPORT/ | |
400 | abort: error: * (glob) |
|
400 | abort: error: * (glob) | |
401 | [255] |
|
401 | [255] | |
402 |
|
402 | |||
403 | #endif |
|
403 | #endif |
@@ -1,169 +1,169 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | This test checks behavior related to bundle1 that changed or is likely |
|
3 | This test checks behavior related to bundle1 that changed or is likely | |
4 | to change with bundle2. Feel free to factor out any part of the test |
|
4 | to change with bundle2. Feel free to factor out any part of the test | |
5 | which does not need to exist to keep bundle1 working. |
|
5 | which does not need to exist to keep bundle1 working. | |
6 |
|
6 | |||
7 | $ cat << EOF >> $HGRCPATH |
|
7 | $ cat << EOF >> $HGRCPATH | |
8 | > [experimental] |
|
8 | > [experimental] | |
9 | > # This test is dedicated to interaction through old bundle |
|
9 | > # This test is dedicated to interaction through old bundle | |
10 | > bundle2-exp = False |
|
10 | > bundle2-exp = False | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | $ hg init test |
|
13 | $ hg init test | |
14 | $ cd test |
|
14 | $ cd test | |
15 | $ echo a > a |
|
15 | $ echo a > a | |
16 | $ hg ci -Ama |
|
16 | $ hg ci -Ama | |
17 | adding a |
|
17 | adding a | |
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ hg clone test test2 |
|
19 | $ hg clone test test2 | |
20 | updating to branch default |
|
20 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ cd test2 |
|
22 | $ cd test2 | |
23 | $ echo a >> a |
|
23 | $ echo a >> a | |
24 | $ hg ci -mb |
|
24 | $ hg ci -mb | |
25 | $ req() { |
|
25 | $ req() { | |
26 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
26 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
27 | > cat hg.pid >> $DAEMON_PIDS |
|
27 | > cat hg.pid >> $DAEMON_PIDS | |
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
28 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
29 | > exitstatus=$? |
|
29 | > exitstatus=$? | |
30 | > killdaemons.py |
|
30 | > killdaemons.py | |
31 | > echo % serve errors |
|
31 | > echo % serve errors | |
32 | > cat errors.log |
|
32 | > cat errors.log | |
33 | > return $exitstatus |
|
33 | > return $exitstatus | |
34 | > } |
|
34 | > } | |
35 | $ cd ../test |
|
35 | $ cd ../test | |
36 |
|
36 | |||
37 | expect ssl error |
|
37 | expect ssl error | |
38 |
|
38 | |||
39 | $ req |
|
39 | $ req | |
40 | pushing to http://localhost:$HGPORT/ |
|
40 | pushing to http://localhost:$HGPORT/ | |
41 | searching for changes |
|
41 | searching for changes | |
42 | abort: HTTP Error 403: ssl required |
|
42 | abort: HTTP Error 403: ssl required | |
43 | % serve errors |
|
43 | % serve errors | |
44 | [255] |
|
44 | [255] | |
45 |
|
45 | |||
46 | expect authorization error |
|
46 | expect authorization error | |
47 |
|
47 | |||
48 | $ echo '[web]' > .hg/hgrc |
|
48 | $ echo '[web]' > .hg/hgrc | |
49 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
49 | $ echo 'push_ssl = false' >> .hg/hgrc | |
50 | $ req |
|
50 | $ req | |
51 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
52 | searching for changes |
|
52 | searching for changes | |
53 | abort: authorization failed |
|
53 | abort: authorization failed | |
54 | % serve errors |
|
54 | % serve errors | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | expect authorization error: must have authorized user |
|
57 | expect authorization error: must have authorized user | |
58 |
|
58 | |||
59 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
59 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
60 | $ req |
|
60 | $ req | |
61 | pushing to http://localhost:$HGPORT/ |
|
61 | pushing to http://localhost:$HGPORT/ | |
62 | searching for changes |
|
62 | searching for changes | |
63 | abort: authorization failed |
|
63 | abort: authorization failed | |
64 | % serve errors |
|
64 | % serve errors | |
65 | [255] |
|
65 | [255] | |
66 |
|
66 | |||
67 | expect success |
|
67 | expect success | |
68 |
|
68 | |||
69 | $ echo 'allow_push = *' >> .hg/hgrc |
|
69 | $ echo 'allow_push = *' >> .hg/hgrc | |
70 | $ echo '[hooks]' >> .hg/hgrc |
|
70 | $ echo '[hooks]' >> .hg/hgrc | |
71 |
$ echo "changegroup = p |
|
71 | $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc | |
72 |
$ echo "pushkey = p |
|
72 | $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc | |
73 | $ req |
|
73 | $ req | |
74 | pushing to http://localhost:$HGPORT/ |
|
74 | pushing to http://localhost:$HGPORT/ | |
75 | searching for changes |
|
75 | searching for changes | |
76 | remote: adding changesets |
|
76 | remote: adding changesets | |
77 | remote: adding manifests |
|
77 | remote: adding manifests | |
78 | remote: adding file changes |
|
78 | remote: adding file changes | |
79 | remote: added 1 changesets with 1 changes to 1 files |
|
79 | remote: added 1 changesets with 1 changes to 1 files | |
80 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
80 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
81 | % serve errors |
|
81 | % serve errors | |
82 | $ hg rollback |
|
82 | $ hg rollback | |
83 | repository tip rolled back to revision 0 (undo serve) |
|
83 | repository tip rolled back to revision 0 (undo serve) | |
84 |
|
84 | |||
85 | expect success, server lacks the httpheader capability |
|
85 | expect success, server lacks the httpheader capability | |
86 |
|
86 | |||
87 | $ CAP=httpheader |
|
87 | $ CAP=httpheader | |
88 | $ . "$TESTDIR/notcapable" |
|
88 | $ . "$TESTDIR/notcapable" | |
89 | $ req |
|
89 | $ req | |
90 | pushing to http://localhost:$HGPORT/ |
|
90 | pushing to http://localhost:$HGPORT/ | |
91 | searching for changes |
|
91 | searching for changes | |
92 | remote: adding changesets |
|
92 | remote: adding changesets | |
93 | remote: adding manifests |
|
93 | remote: adding manifests | |
94 | remote: adding file changes |
|
94 | remote: adding file changes | |
95 | remote: added 1 changesets with 1 changes to 1 files |
|
95 | remote: added 1 changesets with 1 changes to 1 files | |
96 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
96 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
97 | % serve errors |
|
97 | % serve errors | |
98 | $ hg rollback |
|
98 | $ hg rollback | |
99 | repository tip rolled back to revision 0 (undo serve) |
|
99 | repository tip rolled back to revision 0 (undo serve) | |
100 |
|
100 | |||
101 | expect success, server lacks the unbundlehash capability |
|
101 | expect success, server lacks the unbundlehash capability | |
102 |
|
102 | |||
103 | $ CAP=unbundlehash |
|
103 | $ CAP=unbundlehash | |
104 | $ . "$TESTDIR/notcapable" |
|
104 | $ . "$TESTDIR/notcapable" | |
105 | $ req |
|
105 | $ req | |
106 | pushing to http://localhost:$HGPORT/ |
|
106 | pushing to http://localhost:$HGPORT/ | |
107 | searching for changes |
|
107 | searching for changes | |
108 | remote: adding changesets |
|
108 | remote: adding changesets | |
109 | remote: adding manifests |
|
109 | remote: adding manifests | |
110 | remote: adding file changes |
|
110 | remote: adding file changes | |
111 | remote: added 1 changesets with 1 changes to 1 files |
|
111 | remote: added 1 changesets with 1 changes to 1 files | |
112 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
112 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
113 | % serve errors |
|
113 | % serve errors | |
114 | $ hg rollback |
|
114 | $ hg rollback | |
115 | repository tip rolled back to revision 0 (undo serve) |
|
115 | repository tip rolled back to revision 0 (undo serve) | |
116 |
|
116 | |||
117 | expect push success, phase change failure |
|
117 | expect push success, phase change failure | |
118 |
|
118 | |||
119 | $ cat > .hg/hgrc <<EOF |
|
119 | $ cat > .hg/hgrc <<EOF | |
120 | > [web] |
|
120 | > [web] | |
121 | > push_ssl = false |
|
121 | > push_ssl = false | |
122 | > allow_push = * |
|
122 | > allow_push = * | |
123 | > [hooks] |
|
123 | > [hooks] | |
124 |
> prepushkey = |
|
124 | > prepushkey = printenv.py prepushkey 1 | |
125 | > EOF |
|
125 | > EOF | |
126 | $ req |
|
126 | $ req | |
127 | pushing to http://localhost:$HGPORT/ |
|
127 | pushing to http://localhost:$HGPORT/ | |
128 | searching for changes |
|
128 | searching for changes | |
129 | remote: adding changesets |
|
129 | remote: adding changesets | |
130 | remote: adding manifests |
|
130 | remote: adding manifests | |
131 | remote: adding file changes |
|
131 | remote: adding file changes | |
132 | remote: added 1 changesets with 1 changes to 1 files |
|
132 | remote: added 1 changesets with 1 changes to 1 files | |
133 | % serve errors |
|
133 | % serve errors | |
134 |
|
134 | |||
135 | expect phase change success |
|
135 | expect phase change success | |
136 |
|
136 | |||
137 |
$ echo "prepushkey = p |
|
137 | $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc | |
138 | $ req |
|
138 | $ req | |
139 | pushing to http://localhost:$HGPORT/ |
|
139 | pushing to http://localhost:$HGPORT/ | |
140 | searching for changes |
|
140 | searching for changes | |
141 | no changes found |
|
141 | no changes found | |
142 | % serve errors |
|
142 | % serve errors | |
143 | [1] |
|
143 | [1] | |
144 | $ hg rollback |
|
144 | $ hg rollback | |
145 | repository tip rolled back to revision 0 (undo serve) |
|
145 | repository tip rolled back to revision 0 (undo serve) | |
146 |
|
146 | |||
147 | expect authorization error: all users denied |
|
147 | expect authorization error: all users denied | |
148 |
|
148 | |||
149 | $ echo '[web]' > .hg/hgrc |
|
149 | $ echo '[web]' > .hg/hgrc | |
150 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
150 | $ echo 'push_ssl = false' >> .hg/hgrc | |
151 | $ echo 'deny_push = *' >> .hg/hgrc |
|
151 | $ echo 'deny_push = *' >> .hg/hgrc | |
152 | $ req |
|
152 | $ req | |
153 | pushing to http://localhost:$HGPORT/ |
|
153 | pushing to http://localhost:$HGPORT/ | |
154 | searching for changes |
|
154 | searching for changes | |
155 | abort: authorization failed |
|
155 | abort: authorization failed | |
156 | % serve errors |
|
156 | % serve errors | |
157 | [255] |
|
157 | [255] | |
158 |
|
158 | |||
159 | expect authorization error: some users denied, users must be authenticated |
|
159 | expect authorization error: some users denied, users must be authenticated | |
160 |
|
160 | |||
161 | $ echo 'deny_push = unperson' >> .hg/hgrc |
|
161 | $ echo 'deny_push = unperson' >> .hg/hgrc | |
162 | $ req |
|
162 | $ req | |
163 | pushing to http://localhost:$HGPORT/ |
|
163 | pushing to http://localhost:$HGPORT/ | |
164 | searching for changes |
|
164 | searching for changes | |
165 | abort: authorization failed |
|
165 | abort: authorization failed | |
166 | % serve errors |
|
166 | % serve errors | |
167 | [255] |
|
167 | [255] | |
168 |
|
168 | |||
169 | $ cd .. |
|
169 | $ cd .. |
@@ -1,165 +1,165 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama |
|
6 | $ hg ci -Ama | |
7 | adding a |
|
7 | adding a | |
8 | $ cd .. |
|
8 | $ cd .. | |
9 | $ hg clone test test2 |
|
9 | $ hg clone test test2 | |
10 | updating to branch default |
|
10 | updating to branch default | |
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | $ cd test2 |
|
12 | $ cd test2 | |
13 | $ echo a >> a |
|
13 | $ echo a >> a | |
14 | $ hg ci -mb |
|
14 | $ hg ci -mb | |
15 | $ req() { |
|
15 | $ req() { | |
16 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
16 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
17 | > cat hg.pid >> $DAEMON_PIDS |
|
17 | > cat hg.pid >> $DAEMON_PIDS | |
18 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
18 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
19 | > exitstatus=$? |
|
19 | > exitstatus=$? | |
20 | > killdaemons.py |
|
20 | > killdaemons.py | |
21 | > echo % serve errors |
|
21 | > echo % serve errors | |
22 | > cat errors.log |
|
22 | > cat errors.log | |
23 | > return $exitstatus |
|
23 | > return $exitstatus | |
24 | > } |
|
24 | > } | |
25 | $ cd ../test |
|
25 | $ cd ../test | |
26 |
|
26 | |||
27 | expect ssl error |
|
27 | expect ssl error | |
28 |
|
28 | |||
29 | $ req |
|
29 | $ req | |
30 | pushing to http://localhost:$HGPORT/ |
|
30 | pushing to http://localhost:$HGPORT/ | |
31 | searching for changes |
|
31 | searching for changes | |
32 | abort: HTTP Error 403: ssl required |
|
32 | abort: HTTP Error 403: ssl required | |
33 | % serve errors |
|
33 | % serve errors | |
34 | [255] |
|
34 | [255] | |
35 |
|
35 | |||
36 | expect authorization error |
|
36 | expect authorization error | |
37 |
|
37 | |||
38 | $ echo '[web]' > .hg/hgrc |
|
38 | $ echo '[web]' > .hg/hgrc | |
39 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
39 | $ echo 'push_ssl = false' >> .hg/hgrc | |
40 | $ req |
|
40 | $ req | |
41 | pushing to http://localhost:$HGPORT/ |
|
41 | pushing to http://localhost:$HGPORT/ | |
42 | searching for changes |
|
42 | searching for changes | |
43 | abort: authorization failed |
|
43 | abort: authorization failed | |
44 | % serve errors |
|
44 | % serve errors | |
45 | [255] |
|
45 | [255] | |
46 |
|
46 | |||
47 | expect authorization error: must have authorized user |
|
47 | expect authorization error: must have authorized user | |
48 |
|
48 | |||
49 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
49 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
50 | $ req |
|
50 | $ req | |
51 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
52 | searching for changes |
|
52 | searching for changes | |
53 | abort: authorization failed |
|
53 | abort: authorization failed | |
54 | % serve errors |
|
54 | % serve errors | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | expect success |
|
57 | expect success | |
58 |
|
58 | |||
59 | $ echo 'allow_push = *' >> .hg/hgrc |
|
59 | $ echo 'allow_push = *' >> .hg/hgrc | |
60 | $ echo '[hooks]' >> .hg/hgrc |
|
60 | $ echo '[hooks]' >> .hg/hgrc | |
61 |
$ echo "changegroup = p |
|
61 | $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc | |
62 |
$ echo "pushkey = p |
|
62 | $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc | |
63 | $ req |
|
63 | $ req | |
64 | pushing to http://localhost:$HGPORT/ |
|
64 | pushing to http://localhost:$HGPORT/ | |
65 | searching for changes |
|
65 | searching for changes | |
66 | remote: adding changesets |
|
66 | remote: adding changesets | |
67 | remote: adding manifests |
|
67 | remote: adding manifests | |
68 | remote: adding file changes |
|
68 | remote: adding file changes | |
69 | remote: added 1 changesets with 1 changes to 1 files |
|
69 | remote: added 1 changesets with 1 changes to 1 files | |
70 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 |
|
70 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 | |
71 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
71 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
72 | % serve errors |
|
72 | % serve errors | |
73 | $ hg rollback |
|
73 | $ hg rollback | |
74 | repository tip rolled back to revision 0 (undo serve) |
|
74 | repository tip rolled back to revision 0 (undo serve) | |
75 |
|
75 | |||
76 | expect success, server lacks the httpheader capability |
|
76 | expect success, server lacks the httpheader capability | |
77 |
|
77 | |||
78 | $ CAP=httpheader |
|
78 | $ CAP=httpheader | |
79 | $ . "$TESTDIR/notcapable" |
|
79 | $ . "$TESTDIR/notcapable" | |
80 | $ req |
|
80 | $ req | |
81 | pushing to http://localhost:$HGPORT/ |
|
81 | pushing to http://localhost:$HGPORT/ | |
82 | searching for changes |
|
82 | searching for changes | |
83 | remote: adding changesets |
|
83 | remote: adding changesets | |
84 | remote: adding manifests |
|
84 | remote: adding manifests | |
85 | remote: adding file changes |
|
85 | remote: adding file changes | |
86 | remote: added 1 changesets with 1 changes to 1 files |
|
86 | remote: added 1 changesets with 1 changes to 1 files | |
87 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 |
|
87 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 | |
88 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
88 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
89 | % serve errors |
|
89 | % serve errors | |
90 | $ hg rollback |
|
90 | $ hg rollback | |
91 | repository tip rolled back to revision 0 (undo serve) |
|
91 | repository tip rolled back to revision 0 (undo serve) | |
92 |
|
92 | |||
93 | expect success, server lacks the unbundlehash capability |
|
93 | expect success, server lacks the unbundlehash capability | |
94 |
|
94 | |||
95 | $ CAP=unbundlehash |
|
95 | $ CAP=unbundlehash | |
96 | $ . "$TESTDIR/notcapable" |
|
96 | $ . "$TESTDIR/notcapable" | |
97 | $ req |
|
97 | $ req | |
98 | pushing to http://localhost:$HGPORT/ |
|
98 | pushing to http://localhost:$HGPORT/ | |
99 | searching for changes |
|
99 | searching for changes | |
100 | remote: adding changesets |
|
100 | remote: adding changesets | |
101 | remote: adding manifests |
|
101 | remote: adding manifests | |
102 | remote: adding file changes |
|
102 | remote: adding file changes | |
103 | remote: added 1 changesets with 1 changes to 1 files |
|
103 | remote: added 1 changesets with 1 changes to 1 files | |
104 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 |
|
104 | remote: pushkey hook: HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 | |
105 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
105 | remote: changegroup hook: HG_BUNDLE2=1 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
106 | % serve errors |
|
106 | % serve errors | |
107 | $ hg rollback |
|
107 | $ hg rollback | |
108 | repository tip rolled back to revision 0 (undo serve) |
|
108 | repository tip rolled back to revision 0 (undo serve) | |
109 |
|
109 | |||
110 | expect push success, phase change failure |
|
110 | expect push success, phase change failure | |
111 |
|
111 | |||
112 | $ cat > .hg/hgrc <<EOF |
|
112 | $ cat > .hg/hgrc <<EOF | |
113 | > [web] |
|
113 | > [web] | |
114 | > push_ssl = false |
|
114 | > push_ssl = false | |
115 | > allow_push = * |
|
115 | > allow_push = * | |
116 | > [hooks] |
|
116 | > [hooks] | |
117 |
> prepushkey = |
|
117 | > prepushkey = printenv.py prepushkey 1 | |
118 | > EOF |
|
118 | > EOF | |
119 | $ req |
|
119 | $ req | |
120 | pushing to http://localhost:$HGPORT/ |
|
120 | pushing to http://localhost:$HGPORT/ | |
121 | searching for changes |
|
121 | searching for changes | |
122 | remote: adding changesets |
|
122 | remote: adding changesets | |
123 | remote: adding manifests |
|
123 | remote: adding manifests | |
124 | remote: adding file changes |
|
124 | remote: adding file changes | |
125 | remote: added 1 changesets with 1 changes to 1 files |
|
125 | remote: added 1 changesets with 1 changes to 1 files | |
126 | remote: prepushkey hook: HG_BUNDLE2=1 HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) |
|
126 | remote: prepushkey hook: HG_BUNDLE2=1 HG_KEY=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NAMESPACE=phases HG_NEW=0 HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_OLD=1 HG_PENDING=$TESTTMP/test HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:http:127.0.0.1: (glob) | |
127 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
127 | remote: pushkey-abort: prepushkey hook exited with status 1 | |
128 | updating ba677d0156c1 to public failed! |
|
128 | updating ba677d0156c1 to public failed! | |
129 | % serve errors |
|
129 | % serve errors | |
130 |
|
130 | |||
131 | expect phase change success |
|
131 | expect phase change success | |
132 |
|
132 | |||
133 |
$ echo "prepushkey = p |
|
133 | $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc | |
134 | $ req |
|
134 | $ req | |
135 | pushing to http://localhost:$HGPORT/ |
|
135 | pushing to http://localhost:$HGPORT/ | |
136 | searching for changes |
|
136 | searching for changes | |
137 | no changes found |
|
137 | no changes found | |
138 | % serve errors |
|
138 | % serve errors | |
139 | [1] |
|
139 | [1] | |
140 | $ hg rollback |
|
140 | $ hg rollback | |
141 | repository tip rolled back to revision 0 (undo serve) |
|
141 | repository tip rolled back to revision 0 (undo serve) | |
142 |
|
142 | |||
143 | expect authorization error: all users denied |
|
143 | expect authorization error: all users denied | |
144 |
|
144 | |||
145 | $ echo '[web]' > .hg/hgrc |
|
145 | $ echo '[web]' > .hg/hgrc | |
146 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
146 | $ echo 'push_ssl = false' >> .hg/hgrc | |
147 | $ echo 'deny_push = *' >> .hg/hgrc |
|
147 | $ echo 'deny_push = *' >> .hg/hgrc | |
148 | $ req |
|
148 | $ req | |
149 | pushing to http://localhost:$HGPORT/ |
|
149 | pushing to http://localhost:$HGPORT/ | |
150 | searching for changes |
|
150 | searching for changes | |
151 | abort: authorization failed |
|
151 | abort: authorization failed | |
152 | % serve errors |
|
152 | % serve errors | |
153 | [255] |
|
153 | [255] | |
154 |
|
154 | |||
155 | expect authorization error: some users denied, users must be authenticated |
|
155 | expect authorization error: some users denied, users must be authenticated | |
156 |
|
156 | |||
157 | $ echo 'deny_push = unperson' >> .hg/hgrc |
|
157 | $ echo 'deny_push = unperson' >> .hg/hgrc | |
158 | $ req |
|
158 | $ req | |
159 | pushing to http://localhost:$HGPORT/ |
|
159 | pushing to http://localhost:$HGPORT/ | |
160 | searching for changes |
|
160 | searching for changes | |
161 | abort: authorization failed |
|
161 | abort: authorization failed | |
162 | % serve errors |
|
162 | % serve errors | |
163 | [255] |
|
163 | [255] | |
164 |
|
164 | |||
165 | $ cd .. |
|
165 | $ cd .. |
@@ -1,512 +1,512 b'' | |||||
1 | This test is a duplicate of 'test-http.t' feel free to factor out |
|
1 | This test is a duplicate of 'test-http.t' feel free to factor out | |
2 | parts that are not bundle1/bundle2 specific. |
|
2 | parts that are not bundle1/bundle2 specific. | |
3 |
|
3 | |||
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > # This test is dedicated to interaction through old bundle |
|
6 | > # This test is dedicated to interaction through old bundle | |
7 | > bundle2-exp = False |
|
7 | > bundle2-exp = False | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 |
> changegroup = |
|
39 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd .. |
|
41 | $ cd .. | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local |
|
45 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local | |
46 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
46 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
47 | abort: no suitable response from remote hg! |
|
47 | abort: no suitable response from remote hg! | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | non-existent absolute path |
|
50 | non-existent absolute path | |
51 |
|
51 | |||
52 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local |
|
52 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local | |
53 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
53 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
54 | abort: no suitable response from remote hg! |
|
54 | abort: no suitable response from remote hg! | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | clone remote via stream |
|
57 | clone remote via stream | |
58 |
|
58 | |||
59 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream |
|
59 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream | |
60 | streaming all changes |
|
60 | streaming all changes | |
61 | 4 files to transfer, 615 bytes of data |
|
61 | 4 files to transfer, 615 bytes of data | |
62 | transferred 615 bytes in * seconds (*) (glob) |
|
62 | transferred 615 bytes in * seconds (*) (glob) | |
63 | searching for changes |
|
63 | searching for changes | |
64 | no changes found |
|
64 | no changes found | |
65 | updating to branch default |
|
65 | updating to branch default | |
66 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | $ cd local-stream |
|
67 | $ cd local-stream | |
68 | $ hg verify |
|
68 | $ hg verify | |
69 | checking changesets |
|
69 | checking changesets | |
70 | checking manifests |
|
70 | checking manifests | |
71 | crosschecking files in changesets and manifests |
|
71 | crosschecking files in changesets and manifests | |
72 | checking files |
|
72 | checking files | |
73 | 2 files, 3 changesets, 2 total revisions |
|
73 | 2 files, 3 changesets, 2 total revisions | |
74 | $ hg branches |
|
74 | $ hg branches | |
75 | default 0:1160648e36ce |
|
75 | default 0:1160648e36ce | |
76 | $ cd .. |
|
76 | $ cd .. | |
77 |
|
77 | |||
78 | clone bookmarks via stream |
|
78 | clone bookmarks via stream | |
79 |
|
79 | |||
80 | $ hg -R local-stream book mybook |
|
80 | $ hg -R local-stream book mybook | |
81 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 |
|
81 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 | |
82 | streaming all changes |
|
82 | streaming all changes | |
83 | 4 files to transfer, 615 bytes of data |
|
83 | 4 files to transfer, 615 bytes of data | |
84 | transferred 615 bytes in * seconds (*) (glob) |
|
84 | transferred 615 bytes in * seconds (*) (glob) | |
85 | searching for changes |
|
85 | searching for changes | |
86 | no changes found |
|
86 | no changes found | |
87 | updating to branch default |
|
87 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 | $ cd stream2 |
|
89 | $ cd stream2 | |
90 | $ hg book |
|
90 | $ hg book | |
91 | mybook 0:1160648e36ce |
|
91 | mybook 0:1160648e36ce | |
92 | $ cd .. |
|
92 | $ cd .. | |
93 | $ rm -rf local-stream stream2 |
|
93 | $ rm -rf local-stream stream2 | |
94 |
|
94 | |||
95 | clone remote via pull |
|
95 | clone remote via pull | |
96 |
|
96 | |||
97 | $ hg clone -e dummyssh ssh://user@dummy/remote local |
|
97 | $ hg clone -e dummyssh ssh://user@dummy/remote local | |
98 | requesting all changes |
|
98 | requesting all changes | |
99 | adding changesets |
|
99 | adding changesets | |
100 | adding manifests |
|
100 | adding manifests | |
101 | adding file changes |
|
101 | adding file changes | |
102 | added 3 changesets with 2 changes to 2 files |
|
102 | added 3 changesets with 2 changes to 2 files | |
103 | updating to branch default |
|
103 | updating to branch default | |
104 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
105 |
|
105 | |||
106 | verify |
|
106 | verify | |
107 |
|
107 | |||
108 | $ cd local |
|
108 | $ cd local | |
109 | $ hg verify |
|
109 | $ hg verify | |
110 | checking changesets |
|
110 | checking changesets | |
111 | checking manifests |
|
111 | checking manifests | |
112 | crosschecking files in changesets and manifests |
|
112 | crosschecking files in changesets and manifests | |
113 | checking files |
|
113 | checking files | |
114 | 2 files, 3 changesets, 2 total revisions |
|
114 | 2 files, 3 changesets, 2 total revisions | |
115 | $ echo '[hooks]' >> .hg/hgrc |
|
115 | $ echo '[hooks]' >> .hg/hgrc | |
116 |
$ echo "changegroup = p |
|
116 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
117 |
|
117 | |||
118 | empty default pull |
|
118 | empty default pull | |
119 |
|
119 | |||
120 | $ hg paths |
|
120 | $ hg paths | |
121 | default = ssh://user@dummy/remote |
|
121 | default = ssh://user@dummy/remote | |
122 | $ hg pull -e dummyssh |
|
122 | $ hg pull -e dummyssh | |
123 | pulling from ssh://user@dummy/remote |
|
123 | pulling from ssh://user@dummy/remote | |
124 | searching for changes |
|
124 | searching for changes | |
125 | no changes found |
|
125 | no changes found | |
126 |
|
126 | |||
127 | pull from wrong ssh URL |
|
127 | pull from wrong ssh URL | |
128 |
|
128 | |||
129 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist |
|
129 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist | |
130 | pulling from ssh://user@dummy/doesnotexist |
|
130 | pulling from ssh://user@dummy/doesnotexist | |
131 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
131 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
132 | abort: no suitable response from remote hg! |
|
132 | abort: no suitable response from remote hg! | |
133 | [255] |
|
133 | [255] | |
134 |
|
134 | |||
135 | local change |
|
135 | local change | |
136 |
|
136 | |||
137 | $ echo bleah > foo |
|
137 | $ echo bleah > foo | |
138 | $ hg ci -m "add" |
|
138 | $ hg ci -m "add" | |
139 |
|
139 | |||
140 | updating rc |
|
140 | updating rc | |
141 |
|
141 | |||
142 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
142 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
143 | $ echo "[ui]" >> .hg/hgrc |
|
143 | $ echo "[ui]" >> .hg/hgrc | |
144 | $ echo "ssh = dummyssh" >> .hg/hgrc |
|
144 | $ echo "ssh = dummyssh" >> .hg/hgrc | |
145 |
|
145 | |||
146 | find outgoing |
|
146 | find outgoing | |
147 |
|
147 | |||
148 | $ hg out ssh://user@dummy/remote |
|
148 | $ hg out ssh://user@dummy/remote | |
149 | comparing with ssh://user@dummy/remote |
|
149 | comparing with ssh://user@dummy/remote | |
150 | searching for changes |
|
150 | searching for changes | |
151 | changeset: 3:a28a9d1a809c |
|
151 | changeset: 3:a28a9d1a809c | |
152 | tag: tip |
|
152 | tag: tip | |
153 | parent: 0:1160648e36ce |
|
153 | parent: 0:1160648e36ce | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
156 | summary: add |
|
156 | summary: add | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | find incoming on the remote side |
|
159 | find incoming on the remote side | |
160 |
|
160 | |||
161 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local |
|
161 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local | |
162 | comparing with ssh://user@dummy/local |
|
162 | comparing with ssh://user@dummy/local | |
163 | searching for changes |
|
163 | searching for changes | |
164 | changeset: 3:a28a9d1a809c |
|
164 | changeset: 3:a28a9d1a809c | |
165 | tag: tip |
|
165 | tag: tip | |
166 | parent: 0:1160648e36ce |
|
166 | parent: 0:1160648e36ce | |
167 | user: test |
|
167 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: add |
|
169 | summary: add | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | find incoming on the remote side (using absolute path) |
|
172 | find incoming on the remote side (using absolute path) | |
173 |
|
173 | |||
174 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" |
|
174 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" | |
175 | comparing with ssh://user@dummy/$TESTTMP/local |
|
175 | comparing with ssh://user@dummy/$TESTTMP/local | |
176 | searching for changes |
|
176 | searching for changes | |
177 | changeset: 3:a28a9d1a809c |
|
177 | changeset: 3:a28a9d1a809c | |
178 | tag: tip |
|
178 | tag: tip | |
179 | parent: 0:1160648e36ce |
|
179 | parent: 0:1160648e36ce | |
180 | user: test |
|
180 | user: test | |
181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:00 1970 +0000 | |
182 | summary: add |
|
182 | summary: add | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | push |
|
185 | push | |
186 |
|
186 | |||
187 | $ hg push |
|
187 | $ hg push | |
188 | pushing to ssh://user@dummy/remote |
|
188 | pushing to ssh://user@dummy/remote | |
189 | searching for changes |
|
189 | searching for changes | |
190 | remote: adding changesets |
|
190 | remote: adding changesets | |
191 | remote: adding manifests |
|
191 | remote: adding manifests | |
192 | remote: adding file changes |
|
192 | remote: adding file changes | |
193 | remote: added 1 changesets with 1 changes to 1 files |
|
193 | remote: added 1 changesets with 1 changes to 1 files | |
194 | $ cd ../remote |
|
194 | $ cd ../remote | |
195 |
|
195 | |||
196 | check remote tip |
|
196 | check remote tip | |
197 |
|
197 | |||
198 | $ hg tip |
|
198 | $ hg tip | |
199 | changeset: 3:a28a9d1a809c |
|
199 | changeset: 3:a28a9d1a809c | |
200 | tag: tip |
|
200 | tag: tip | |
201 | parent: 0:1160648e36ce |
|
201 | parent: 0:1160648e36ce | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:00 1970 +0000 | |
204 | summary: add |
|
204 | summary: add | |
205 |
|
205 | |||
206 | $ hg verify |
|
206 | $ hg verify | |
207 | checking changesets |
|
207 | checking changesets | |
208 | checking manifests |
|
208 | checking manifests | |
209 | crosschecking files in changesets and manifests |
|
209 | crosschecking files in changesets and manifests | |
210 | checking files |
|
210 | checking files | |
211 | 2 files, 4 changesets, 3 total revisions |
|
211 | 2 files, 4 changesets, 3 total revisions | |
212 | $ hg cat -r tip foo |
|
212 | $ hg cat -r tip foo | |
213 | bleah |
|
213 | bleah | |
214 | $ echo z > z |
|
214 | $ echo z > z | |
215 | $ hg ci -A -m z z |
|
215 | $ hg ci -A -m z z | |
216 | created new head |
|
216 | created new head | |
217 |
|
217 | |||
218 | test pushkeys and bookmarks |
|
218 | test pushkeys and bookmarks | |
219 |
|
219 | |||
220 | $ cd ../local |
|
220 | $ cd ../local | |
221 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces |
|
221 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces | |
222 | bookmarks |
|
222 | bookmarks | |
223 | namespaces |
|
223 | namespaces | |
224 | phases |
|
224 | phases | |
225 | $ hg book foo -r 0 |
|
225 | $ hg book foo -r 0 | |
226 | $ hg out -B |
|
226 | $ hg out -B | |
227 | comparing with ssh://user@dummy/remote |
|
227 | comparing with ssh://user@dummy/remote | |
228 | searching for changed bookmarks |
|
228 | searching for changed bookmarks | |
229 | foo 1160648e36ce |
|
229 | foo 1160648e36ce | |
230 | $ hg push -B foo |
|
230 | $ hg push -B foo | |
231 | pushing to ssh://user@dummy/remote |
|
231 | pushing to ssh://user@dummy/remote | |
232 | searching for changes |
|
232 | searching for changes | |
233 | no changes found |
|
233 | no changes found | |
234 | exporting bookmark foo |
|
234 | exporting bookmark foo | |
235 | [1] |
|
235 | [1] | |
236 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks |
|
236 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks | |
237 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
237 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
238 | $ hg book -f foo |
|
238 | $ hg book -f foo | |
239 | $ hg push --traceback |
|
239 | $ hg push --traceback | |
240 | pushing to ssh://user@dummy/remote |
|
240 | pushing to ssh://user@dummy/remote | |
241 | searching for changes |
|
241 | searching for changes | |
242 | no changes found |
|
242 | no changes found | |
243 | updating bookmark foo |
|
243 | updating bookmark foo | |
244 | [1] |
|
244 | [1] | |
245 | $ hg book -d foo |
|
245 | $ hg book -d foo | |
246 | $ hg in -B |
|
246 | $ hg in -B | |
247 | comparing with ssh://user@dummy/remote |
|
247 | comparing with ssh://user@dummy/remote | |
248 | searching for changed bookmarks |
|
248 | searching for changed bookmarks | |
249 | foo a28a9d1a809c |
|
249 | foo a28a9d1a809c | |
250 | $ hg book -f -r 0 foo |
|
250 | $ hg book -f -r 0 foo | |
251 | $ hg pull -B foo |
|
251 | $ hg pull -B foo | |
252 | pulling from ssh://user@dummy/remote |
|
252 | pulling from ssh://user@dummy/remote | |
253 | no changes found |
|
253 | no changes found | |
254 | updating bookmark foo |
|
254 | updating bookmark foo | |
255 | $ hg book -d foo |
|
255 | $ hg book -d foo | |
256 | $ hg push -B foo |
|
256 | $ hg push -B foo | |
257 | pushing to ssh://user@dummy/remote |
|
257 | pushing to ssh://user@dummy/remote | |
258 | searching for changes |
|
258 | searching for changes | |
259 | no changes found |
|
259 | no changes found | |
260 | deleting remote bookmark foo |
|
260 | deleting remote bookmark foo | |
261 | [1] |
|
261 | [1] | |
262 |
|
262 | |||
263 | a bad, evil hook that prints to stdout |
|
263 | a bad, evil hook that prints to stdout | |
264 |
|
264 | |||
265 | $ cat <<EOF > $TESTTMP/badhook |
|
265 | $ cat <<EOF > $TESTTMP/badhook | |
266 | > import sys |
|
266 | > import sys | |
267 | > sys.stdout.write("KABOOM\n") |
|
267 | > sys.stdout.write("KABOOM\n") | |
268 | > EOF |
|
268 | > EOF | |
269 |
|
269 | |||
270 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
270 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
271 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
271 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
272 | $ echo r > r |
|
272 | $ echo r > r | |
273 | $ hg ci -A -m z r |
|
273 | $ hg ci -A -m z r | |
274 |
|
274 | |||
275 | push should succeed even though it has an unexpected response |
|
275 | push should succeed even though it has an unexpected response | |
276 |
|
276 | |||
277 | $ hg push |
|
277 | $ hg push | |
278 | pushing to ssh://user@dummy/remote |
|
278 | pushing to ssh://user@dummy/remote | |
279 | searching for changes |
|
279 | searching for changes | |
280 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
280 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
281 | remote: adding changesets |
|
281 | remote: adding changesets | |
282 | remote: adding manifests |
|
282 | remote: adding manifests | |
283 | remote: adding file changes |
|
283 | remote: adding file changes | |
284 | remote: added 1 changesets with 1 changes to 1 files |
|
284 | remote: added 1 changesets with 1 changes to 1 files | |
285 | remote: KABOOM |
|
285 | remote: KABOOM | |
286 | $ hg -R ../remote heads |
|
286 | $ hg -R ../remote heads | |
287 | changeset: 5:1383141674ec |
|
287 | changeset: 5:1383141674ec | |
288 | tag: tip |
|
288 | tag: tip | |
289 | parent: 3:a28a9d1a809c |
|
289 | parent: 3:a28a9d1a809c | |
290 | user: test |
|
290 | user: test | |
291 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
291 | date: Thu Jan 01 00:00:00 1970 +0000 | |
292 | summary: z |
|
292 | summary: z | |
293 |
|
293 | |||
294 | changeset: 4:6c0482d977a3 |
|
294 | changeset: 4:6c0482d977a3 | |
295 | parent: 0:1160648e36ce |
|
295 | parent: 0:1160648e36ce | |
296 | user: test |
|
296 | user: test | |
297 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | date: Thu Jan 01 00:00:00 1970 +0000 | |
298 | summary: z |
|
298 | summary: z | |
299 |
|
299 | |||
300 |
|
300 | |||
301 | clone bookmarks |
|
301 | clone bookmarks | |
302 |
|
302 | |||
303 | $ hg -R ../remote bookmark test |
|
303 | $ hg -R ../remote bookmark test | |
304 | $ hg -R ../remote bookmarks |
|
304 | $ hg -R ../remote bookmarks | |
305 | * test 4:6c0482d977a3 |
|
305 | * test 4:6c0482d977a3 | |
306 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks |
|
306 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks | |
307 | requesting all changes |
|
307 | requesting all changes | |
308 | adding changesets |
|
308 | adding changesets | |
309 | adding manifests |
|
309 | adding manifests | |
310 | adding file changes |
|
310 | adding file changes | |
311 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
311 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
312 | updating to branch default |
|
312 | updating to branch default | |
313 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
313 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
314 | $ hg -R local-bookmarks bookmarks |
|
314 | $ hg -R local-bookmarks bookmarks | |
315 | test 4:6c0482d977a3 |
|
315 | test 4:6c0482d977a3 | |
316 |
|
316 | |||
317 | passwords in ssh urls are not supported |
|
317 | passwords in ssh urls are not supported | |
318 | (we use a glob here because different Python versions give different |
|
318 | (we use a glob here because different Python versions give different | |
319 | results here) |
|
319 | results here) | |
320 |
|
320 | |||
321 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
321 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
322 | pushing to ssh://user:*@dummy/remote (glob) |
|
322 | pushing to ssh://user:*@dummy/remote (glob) | |
323 | abort: password in URL not supported! |
|
323 | abort: password in URL not supported! | |
324 | [255] |
|
324 | [255] | |
325 |
|
325 | |||
326 | $ cd .. |
|
326 | $ cd .. | |
327 |
|
327 | |||
328 | hide outer repo |
|
328 | hide outer repo | |
329 | $ hg init |
|
329 | $ hg init | |
330 |
|
330 | |||
331 | Test remote paths with spaces (issue2983): |
|
331 | Test remote paths with spaces (issue2983): | |
332 |
|
332 | |||
333 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" |
|
333 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" | |
334 | $ touch "$TESTTMP/a repo/test" |
|
334 | $ touch "$TESTTMP/a repo/test" | |
335 | $ hg -R 'a repo' commit -A -m "test" |
|
335 | $ hg -R 'a repo' commit -A -m "test" | |
336 | adding test |
|
336 | adding test | |
337 | $ hg -R 'a repo' tag tag |
|
337 | $ hg -R 'a repo' tag tag | |
338 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" |
|
338 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" | |
339 | 73649e48688a |
|
339 | 73649e48688a | |
340 |
|
340 | |||
341 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" |
|
341 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" | |
342 | abort: unknown revision 'noNoNO'! |
|
342 | abort: unknown revision 'noNoNO'! | |
343 | [255] |
|
343 | [255] | |
344 |
|
344 | |||
345 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
345 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
346 |
|
346 | |||
347 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" |
|
347 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" | |
348 | destination directory: a repo |
|
348 | destination directory: a repo | |
349 | abort: destination 'a repo' is not empty |
|
349 | abort: destination 'a repo' is not empty | |
350 | [255] |
|
350 | [255] | |
351 |
|
351 | |||
352 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
352 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
353 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
353 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
354 | parameters: |
|
354 | parameters: | |
355 |
|
355 | |||
356 | $ cat > ssh.sh << EOF |
|
356 | $ cat > ssh.sh << EOF | |
357 | > userhost="\$1" |
|
357 | > userhost="\$1" | |
358 | > SSH_ORIGINAL_COMMAND="\$2" |
|
358 | > SSH_ORIGINAL_COMMAND="\$2" | |
359 | > export SSH_ORIGINAL_COMMAND |
|
359 | > export SSH_ORIGINAL_COMMAND | |
360 | > PYTHONPATH="$PYTHONPATH" |
|
360 | > PYTHONPATH="$PYTHONPATH" | |
361 | > export PYTHONPATH |
|
361 | > export PYTHONPATH | |
362 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
362 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
363 | > EOF |
|
363 | > EOF | |
364 |
|
364 | |||
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
366 | 73649e48688a |
|
366 | 73649e48688a | |
367 |
|
367 | |||
368 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
368 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
369 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
369 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
370 | abort: no suitable response from remote hg! |
|
370 | abort: no suitable response from remote hg! | |
371 | [255] |
|
371 | [255] | |
372 |
|
372 | |||
373 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
373 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
374 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
374 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
375 | abort: no suitable response from remote hg! |
|
375 | abort: no suitable response from remote hg! | |
376 | [255] |
|
376 | [255] | |
377 |
|
377 | |||
378 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
378 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
379 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
379 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
380 | [255] |
|
380 | [255] | |
381 |
|
381 | |||
382 | Test hg-ssh in read-only mode: |
|
382 | Test hg-ssh in read-only mode: | |
383 |
|
383 | |||
384 | $ cat > ssh.sh << EOF |
|
384 | $ cat > ssh.sh << EOF | |
385 | > userhost="\$1" |
|
385 | > userhost="\$1" | |
386 | > SSH_ORIGINAL_COMMAND="\$2" |
|
386 | > SSH_ORIGINAL_COMMAND="\$2" | |
387 | > export SSH_ORIGINAL_COMMAND |
|
387 | > export SSH_ORIGINAL_COMMAND | |
388 | > PYTHONPATH="$PYTHONPATH" |
|
388 | > PYTHONPATH="$PYTHONPATH" | |
389 | > export PYTHONPATH |
|
389 | > export PYTHONPATH | |
390 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
390 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
391 | > EOF |
|
391 | > EOF | |
392 |
|
392 | |||
393 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
393 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
394 | requesting all changes |
|
394 | requesting all changes | |
395 | adding changesets |
|
395 | adding changesets | |
396 | adding manifests |
|
396 | adding manifests | |
397 | adding file changes |
|
397 | adding file changes | |
398 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
398 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
399 | updating to branch default |
|
399 | updating to branch default | |
400 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
400 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
401 |
|
401 | |||
402 | $ cd read-only-local |
|
402 | $ cd read-only-local | |
403 | $ echo "baz" > bar |
|
403 | $ echo "baz" > bar | |
404 | $ hg ci -A -m "unpushable commit" bar |
|
404 | $ hg ci -A -m "unpushable commit" bar | |
405 | $ hg push --ssh "sh ../ssh.sh" |
|
405 | $ hg push --ssh "sh ../ssh.sh" | |
406 | pushing to ssh://user@dummy/*/remote (glob) |
|
406 | pushing to ssh://user@dummy/*/remote (glob) | |
407 | searching for changes |
|
407 | searching for changes | |
408 | remote: Permission denied |
|
408 | remote: Permission denied | |
409 | remote: abort: pretxnopen.hg-ssh hook failed |
|
409 | remote: abort: pretxnopen.hg-ssh hook failed | |
410 | remote: Permission denied |
|
410 | remote: Permission denied | |
411 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
411 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
412 | updating 6c0482d977a3 to public failed! |
|
412 | updating 6c0482d977a3 to public failed! | |
413 | [1] |
|
413 | [1] | |
414 |
|
414 | |||
415 | $ cd .. |
|
415 | $ cd .. | |
416 |
|
416 | |||
417 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
417 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
418 |
|
418 | |||
419 | $ hg clone remote stderr-ordering |
|
419 | $ hg clone remote stderr-ordering | |
420 | updating to branch default |
|
420 | updating to branch default | |
421 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
421 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
422 | $ cd stderr-ordering |
|
422 | $ cd stderr-ordering | |
423 | $ cat >> localwrite.py << EOF |
|
423 | $ cat >> localwrite.py << EOF | |
424 | > from mercurial import exchange, extensions |
|
424 | > from mercurial import exchange, extensions | |
425 | > |
|
425 | > | |
426 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
426 | > def wrappedpush(orig, repo, *args, **kwargs): | |
427 | > res = orig(repo, *args, **kwargs) |
|
427 | > res = orig(repo, *args, **kwargs) | |
428 | > repo.ui.write('local stdout\n') |
|
428 | > repo.ui.write('local stdout\n') | |
429 | > return res |
|
429 | > return res | |
430 | > |
|
430 | > | |
431 | > def extsetup(ui): |
|
431 | > def extsetup(ui): | |
432 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
432 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
433 | > EOF |
|
433 | > EOF | |
434 |
|
434 | |||
435 | $ cat >> .hg/hgrc << EOF |
|
435 | $ cat >> .hg/hgrc << EOF | |
436 | > [paths] |
|
436 | > [paths] | |
437 | > default-push = ssh://user@dummy/remote |
|
437 | > default-push = ssh://user@dummy/remote | |
438 | > [ui] |
|
438 | > [ui] | |
439 | > ssh = dummyssh |
|
439 | > ssh = dummyssh | |
440 | > [extensions] |
|
440 | > [extensions] | |
441 | > localwrite = localwrite.py |
|
441 | > localwrite = localwrite.py | |
442 | > EOF |
|
442 | > EOF | |
443 |
|
443 | |||
444 | $ echo localwrite > foo |
|
444 | $ echo localwrite > foo | |
445 | $ hg commit -m 'testing localwrite' |
|
445 | $ hg commit -m 'testing localwrite' | |
446 | $ hg push |
|
446 | $ hg push | |
447 | pushing to ssh://user@dummy/remote |
|
447 | pushing to ssh://user@dummy/remote | |
448 | searching for changes |
|
448 | searching for changes | |
449 | remote: adding changesets |
|
449 | remote: adding changesets | |
450 | remote: adding manifests |
|
450 | remote: adding manifests | |
451 | remote: adding file changes |
|
451 | remote: adding file changes | |
452 | remote: added 1 changesets with 1 changes to 1 files |
|
452 | remote: added 1 changesets with 1 changes to 1 files | |
453 | remote: KABOOM |
|
453 | remote: KABOOM | |
454 | local stdout |
|
454 | local stdout | |
455 |
|
455 | |||
456 | debug output |
|
456 | debug output | |
457 |
|
457 | |||
458 | $ hg pull --debug ssh://user@dummy/remote |
|
458 | $ hg pull --debug ssh://user@dummy/remote | |
459 | pulling from ssh://user@dummy/remote |
|
459 | pulling from ssh://user@dummy/remote | |
460 | running dummyssh user@dummy 'hg -R remote serve --stdio' |
|
460 | running dummyssh user@dummy 'hg -R remote serve --stdio' | |
461 | sending hello command |
|
461 | sending hello command | |
462 | sending between command |
|
462 | sending between command | |
463 | remote: 286 |
|
463 | remote: 286 | |
464 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
464 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
465 | remote: 1 |
|
465 | remote: 1 | |
466 | preparing listkeys for "bookmarks" |
|
466 | preparing listkeys for "bookmarks" | |
467 | sending listkeys command |
|
467 | sending listkeys command | |
468 | received listkey for "bookmarks": 45 bytes |
|
468 | received listkey for "bookmarks": 45 bytes | |
469 | query 1; heads |
|
469 | query 1; heads | |
470 | sending batch command |
|
470 | sending batch command | |
471 | searching for changes |
|
471 | searching for changes | |
472 | all remote heads known locally |
|
472 | all remote heads known locally | |
473 | no changes found |
|
473 | no changes found | |
474 | preparing listkeys for "phases" |
|
474 | preparing listkeys for "phases" | |
475 | sending listkeys command |
|
475 | sending listkeys command | |
476 | received listkey for "phases": 15 bytes |
|
476 | received listkey for "phases": 15 bytes | |
477 | checking for updated bookmarks |
|
477 | checking for updated bookmarks | |
478 |
|
478 | |||
479 | $ cd .. |
|
479 | $ cd .. | |
480 |
|
480 | |||
481 | $ cat dummylog |
|
481 | $ cat dummylog | |
482 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
482 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
483 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
483 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
485 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
493 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
493 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
494 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
496 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
498 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
503 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
503 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
505 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
506 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
509 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
510 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
510 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
511 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
511 | changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
512 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
@@ -1,503 +1,503 b'' | |||||
1 |
|
1 | |||
2 | This test tries to exercise the ssh functionality with a dummy script |
|
2 | This test tries to exercise the ssh functionality with a dummy script | |
3 |
|
3 | |||
4 | creating 'remote' repo |
|
4 | creating 'remote' repo | |
5 |
|
5 | |||
6 | $ hg init remote |
|
6 | $ hg init remote | |
7 | $ cd remote |
|
7 | $ cd remote | |
8 | $ echo this > foo |
|
8 | $ echo this > foo | |
9 | $ echo this > fooO |
|
9 | $ echo this > fooO | |
10 | $ hg ci -A -m "init" foo fooO |
|
10 | $ hg ci -A -m "init" foo fooO | |
11 |
|
11 | |||
12 | insert a closed branch (issue4428) |
|
12 | insert a closed branch (issue4428) | |
13 |
|
13 | |||
14 | $ hg up null |
|
14 | $ hg up null | |
15 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
15 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
16 | $ hg branch closed |
|
16 | $ hg branch closed | |
17 | marked working directory as branch closed |
|
17 | marked working directory as branch closed | |
18 | (branches are permanent and global, did you want a bookmark?) |
|
18 | (branches are permanent and global, did you want a bookmark?) | |
19 | $ hg ci -mc0 |
|
19 | $ hg ci -mc0 | |
20 | $ hg ci --close-branch -mc1 |
|
20 | $ hg ci --close-branch -mc1 | |
21 | $ hg up -q default |
|
21 | $ hg up -q default | |
22 |
|
22 | |||
23 | configure for serving |
|
23 | configure for serving | |
24 |
|
24 | |||
25 | $ cat <<EOF > .hg/hgrc |
|
25 | $ cat <<EOF > .hg/hgrc | |
26 | > [server] |
|
26 | > [server] | |
27 | > uncompressed = True |
|
27 | > uncompressed = True | |
28 | > |
|
28 | > | |
29 | > [hooks] |
|
29 | > [hooks] | |
30 |
> changegroup = |
|
30 | > changegroup = printenv.py changegroup-in-remote 0 ../dummylog | |
31 | > EOF |
|
31 | > EOF | |
32 | $ cd .. |
|
32 | $ cd .. | |
33 |
|
33 | |||
34 | repo not found error |
|
34 | repo not found error | |
35 |
|
35 | |||
36 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local |
|
36 | $ hg clone -e dummyssh ssh://user@dummy/nonexistent local | |
37 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
37 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
38 | abort: no suitable response from remote hg! |
|
38 | abort: no suitable response from remote hg! | |
39 | [255] |
|
39 | [255] | |
40 |
|
40 | |||
41 | non-existent absolute path |
|
41 | non-existent absolute path | |
42 |
|
42 | |||
43 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local |
|
43 | $ hg clone -e dummyssh ssh://user@dummy//`pwd`/nonexistent local | |
44 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
44 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
45 | abort: no suitable response from remote hg! |
|
45 | abort: no suitable response from remote hg! | |
46 | [255] |
|
46 | [255] | |
47 |
|
47 | |||
48 | clone remote via stream |
|
48 | clone remote via stream | |
49 |
|
49 | |||
50 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream |
|
50 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/remote local-stream | |
51 | streaming all changes |
|
51 | streaming all changes | |
52 | 4 files to transfer, 615 bytes of data |
|
52 | 4 files to transfer, 615 bytes of data | |
53 | transferred 615 bytes in * seconds (*) (glob) |
|
53 | transferred 615 bytes in * seconds (*) (glob) | |
54 | searching for changes |
|
54 | searching for changes | |
55 | no changes found |
|
55 | no changes found | |
56 | updating to branch default |
|
56 | updating to branch default | |
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ cd local-stream |
|
58 | $ cd local-stream | |
59 | $ hg verify |
|
59 | $ hg verify | |
60 | checking changesets |
|
60 | checking changesets | |
61 | checking manifests |
|
61 | checking manifests | |
62 | crosschecking files in changesets and manifests |
|
62 | crosschecking files in changesets and manifests | |
63 | checking files |
|
63 | checking files | |
64 | 2 files, 3 changesets, 2 total revisions |
|
64 | 2 files, 3 changesets, 2 total revisions | |
65 | $ hg branches |
|
65 | $ hg branches | |
66 | default 0:1160648e36ce |
|
66 | default 0:1160648e36ce | |
67 | $ cd .. |
|
67 | $ cd .. | |
68 |
|
68 | |||
69 | clone bookmarks via stream |
|
69 | clone bookmarks via stream | |
70 |
|
70 | |||
71 | $ hg -R local-stream book mybook |
|
71 | $ hg -R local-stream book mybook | |
72 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 |
|
72 | $ hg clone -e dummyssh --uncompressed ssh://user@dummy/local-stream stream2 | |
73 | streaming all changes |
|
73 | streaming all changes | |
74 | 4 files to transfer, 615 bytes of data |
|
74 | 4 files to transfer, 615 bytes of data | |
75 | transferred 615 bytes in * seconds (*) (glob) |
|
75 | transferred 615 bytes in * seconds (*) (glob) | |
76 | searching for changes |
|
76 | searching for changes | |
77 | no changes found |
|
77 | no changes found | |
78 | updating to branch default |
|
78 | updating to branch default | |
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 | $ cd stream2 |
|
80 | $ cd stream2 | |
81 | $ hg book |
|
81 | $ hg book | |
82 | mybook 0:1160648e36ce |
|
82 | mybook 0:1160648e36ce | |
83 | $ cd .. |
|
83 | $ cd .. | |
84 | $ rm -rf local-stream stream2 |
|
84 | $ rm -rf local-stream stream2 | |
85 |
|
85 | |||
86 | clone remote via pull |
|
86 | clone remote via pull | |
87 |
|
87 | |||
88 | $ hg clone -e dummyssh ssh://user@dummy/remote local |
|
88 | $ hg clone -e dummyssh ssh://user@dummy/remote local | |
89 | requesting all changes |
|
89 | requesting all changes | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 3 changesets with 2 changes to 2 files |
|
93 | added 3 changesets with 2 changes to 2 files | |
94 | updating to branch default |
|
94 | updating to branch default | |
95 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
95 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
96 |
|
96 | |||
97 | verify |
|
97 | verify | |
98 |
|
98 | |||
99 | $ cd local |
|
99 | $ cd local | |
100 | $ hg verify |
|
100 | $ hg verify | |
101 | checking changesets |
|
101 | checking changesets | |
102 | checking manifests |
|
102 | checking manifests | |
103 | crosschecking files in changesets and manifests |
|
103 | crosschecking files in changesets and manifests | |
104 | checking files |
|
104 | checking files | |
105 | 2 files, 3 changesets, 2 total revisions |
|
105 | 2 files, 3 changesets, 2 total revisions | |
106 | $ echo '[hooks]' >> .hg/hgrc |
|
106 | $ echo '[hooks]' >> .hg/hgrc | |
107 |
$ echo "changegroup = p |
|
107 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc | |
108 |
|
108 | |||
109 | empty default pull |
|
109 | empty default pull | |
110 |
|
110 | |||
111 | $ hg paths |
|
111 | $ hg paths | |
112 | default = ssh://user@dummy/remote |
|
112 | default = ssh://user@dummy/remote | |
113 | $ hg pull -e dummyssh |
|
113 | $ hg pull -e dummyssh | |
114 | pulling from ssh://user@dummy/remote |
|
114 | pulling from ssh://user@dummy/remote | |
115 | searching for changes |
|
115 | searching for changes | |
116 | no changes found |
|
116 | no changes found | |
117 |
|
117 | |||
118 | pull from wrong ssh URL |
|
118 | pull from wrong ssh URL | |
119 |
|
119 | |||
120 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist |
|
120 | $ hg pull -e dummyssh ssh://user@dummy/doesnotexist | |
121 | pulling from ssh://user@dummy/doesnotexist |
|
121 | pulling from ssh://user@dummy/doesnotexist | |
122 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
122 | remote: abort: there is no Mercurial repository here (.hg not found)! | |
123 | abort: no suitable response from remote hg! |
|
123 | abort: no suitable response from remote hg! | |
124 | [255] |
|
124 | [255] | |
125 |
|
125 | |||
126 | local change |
|
126 | local change | |
127 |
|
127 | |||
128 | $ echo bleah > foo |
|
128 | $ echo bleah > foo | |
129 | $ hg ci -m "add" |
|
129 | $ hg ci -m "add" | |
130 |
|
130 | |||
131 | updating rc |
|
131 | updating rc | |
132 |
|
132 | |||
133 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
133 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
134 | $ echo "[ui]" >> .hg/hgrc |
|
134 | $ echo "[ui]" >> .hg/hgrc | |
135 | $ echo "ssh = dummyssh" >> .hg/hgrc |
|
135 | $ echo "ssh = dummyssh" >> .hg/hgrc | |
136 |
|
136 | |||
137 | find outgoing |
|
137 | find outgoing | |
138 |
|
138 | |||
139 | $ hg out ssh://user@dummy/remote |
|
139 | $ hg out ssh://user@dummy/remote | |
140 | comparing with ssh://user@dummy/remote |
|
140 | comparing with ssh://user@dummy/remote | |
141 | searching for changes |
|
141 | searching for changes | |
142 | changeset: 3:a28a9d1a809c |
|
142 | changeset: 3:a28a9d1a809c | |
143 | tag: tip |
|
143 | tag: tip | |
144 | parent: 0:1160648e36ce |
|
144 | parent: 0:1160648e36ce | |
145 | user: test |
|
145 | user: test | |
146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
147 | summary: add |
|
147 | summary: add | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | find incoming on the remote side |
|
150 | find incoming on the remote side | |
151 |
|
151 | |||
152 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local |
|
152 | $ hg incoming -R ../remote -e dummyssh ssh://user@dummy/local | |
153 | comparing with ssh://user@dummy/local |
|
153 | comparing with ssh://user@dummy/local | |
154 | searching for changes |
|
154 | searching for changes | |
155 | changeset: 3:a28a9d1a809c |
|
155 | changeset: 3:a28a9d1a809c | |
156 | tag: tip |
|
156 | tag: tip | |
157 | parent: 0:1160648e36ce |
|
157 | parent: 0:1160648e36ce | |
158 | user: test |
|
158 | user: test | |
159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: add |
|
160 | summary: add | |
161 |
|
161 | |||
162 |
|
162 | |||
163 | find incoming on the remote side (using absolute path) |
|
163 | find incoming on the remote side (using absolute path) | |
164 |
|
164 | |||
165 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" |
|
165 | $ hg incoming -R ../remote -e dummyssh "ssh://user@dummy/`pwd`" | |
166 | comparing with ssh://user@dummy/$TESTTMP/local |
|
166 | comparing with ssh://user@dummy/$TESTTMP/local | |
167 | searching for changes |
|
167 | searching for changes | |
168 | changeset: 3:a28a9d1a809c |
|
168 | changeset: 3:a28a9d1a809c | |
169 | tag: tip |
|
169 | tag: tip | |
170 | parent: 0:1160648e36ce |
|
170 | parent: 0:1160648e36ce | |
171 | user: test |
|
171 | user: test | |
172 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
172 | date: Thu Jan 01 00:00:00 1970 +0000 | |
173 | summary: add |
|
173 | summary: add | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | push |
|
176 | push | |
177 |
|
177 | |||
178 | $ hg push |
|
178 | $ hg push | |
179 | pushing to ssh://user@dummy/remote |
|
179 | pushing to ssh://user@dummy/remote | |
180 | searching for changes |
|
180 | searching for changes | |
181 | remote: adding changesets |
|
181 | remote: adding changesets | |
182 | remote: adding manifests |
|
182 | remote: adding manifests | |
183 | remote: adding file changes |
|
183 | remote: adding file changes | |
184 | remote: added 1 changesets with 1 changes to 1 files |
|
184 | remote: added 1 changesets with 1 changes to 1 files | |
185 | $ cd ../remote |
|
185 | $ cd ../remote | |
186 |
|
186 | |||
187 | check remote tip |
|
187 | check remote tip | |
188 |
|
188 | |||
189 | $ hg tip |
|
189 | $ hg tip | |
190 | changeset: 3:a28a9d1a809c |
|
190 | changeset: 3:a28a9d1a809c | |
191 | tag: tip |
|
191 | tag: tip | |
192 | parent: 0:1160648e36ce |
|
192 | parent: 0:1160648e36ce | |
193 | user: test |
|
193 | user: test | |
194 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
194 | date: Thu Jan 01 00:00:00 1970 +0000 | |
195 | summary: add |
|
195 | summary: add | |
196 |
|
196 | |||
197 | $ hg verify |
|
197 | $ hg verify | |
198 | checking changesets |
|
198 | checking changesets | |
199 | checking manifests |
|
199 | checking manifests | |
200 | crosschecking files in changesets and manifests |
|
200 | crosschecking files in changesets and manifests | |
201 | checking files |
|
201 | checking files | |
202 | 2 files, 4 changesets, 3 total revisions |
|
202 | 2 files, 4 changesets, 3 total revisions | |
203 | $ hg cat -r tip foo |
|
203 | $ hg cat -r tip foo | |
204 | bleah |
|
204 | bleah | |
205 | $ echo z > z |
|
205 | $ echo z > z | |
206 | $ hg ci -A -m z z |
|
206 | $ hg ci -A -m z z | |
207 | created new head |
|
207 | created new head | |
208 |
|
208 | |||
209 | test pushkeys and bookmarks |
|
209 | test pushkeys and bookmarks | |
210 |
|
210 | |||
211 | $ cd ../local |
|
211 | $ cd ../local | |
212 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces |
|
212 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote namespaces | |
213 | bookmarks |
|
213 | bookmarks | |
214 | namespaces |
|
214 | namespaces | |
215 | phases |
|
215 | phases | |
216 | $ hg book foo -r 0 |
|
216 | $ hg book foo -r 0 | |
217 | $ hg out -B |
|
217 | $ hg out -B | |
218 | comparing with ssh://user@dummy/remote |
|
218 | comparing with ssh://user@dummy/remote | |
219 | searching for changed bookmarks |
|
219 | searching for changed bookmarks | |
220 | foo 1160648e36ce |
|
220 | foo 1160648e36ce | |
221 | $ hg push -B foo |
|
221 | $ hg push -B foo | |
222 | pushing to ssh://user@dummy/remote |
|
222 | pushing to ssh://user@dummy/remote | |
223 | searching for changes |
|
223 | searching for changes | |
224 | no changes found |
|
224 | no changes found | |
225 | exporting bookmark foo |
|
225 | exporting bookmark foo | |
226 | [1] |
|
226 | [1] | |
227 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks |
|
227 | $ hg debugpushkey --config ui.ssh=dummyssh ssh://user@dummy/remote bookmarks | |
228 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
228 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
229 | $ hg book -f foo |
|
229 | $ hg book -f foo | |
230 | $ hg push --traceback |
|
230 | $ hg push --traceback | |
231 | pushing to ssh://user@dummy/remote |
|
231 | pushing to ssh://user@dummy/remote | |
232 | searching for changes |
|
232 | searching for changes | |
233 | no changes found |
|
233 | no changes found | |
234 | updating bookmark foo |
|
234 | updating bookmark foo | |
235 | [1] |
|
235 | [1] | |
236 | $ hg book -d foo |
|
236 | $ hg book -d foo | |
237 | $ hg in -B |
|
237 | $ hg in -B | |
238 | comparing with ssh://user@dummy/remote |
|
238 | comparing with ssh://user@dummy/remote | |
239 | searching for changed bookmarks |
|
239 | searching for changed bookmarks | |
240 | foo a28a9d1a809c |
|
240 | foo a28a9d1a809c | |
241 | $ hg book -f -r 0 foo |
|
241 | $ hg book -f -r 0 foo | |
242 | $ hg pull -B foo |
|
242 | $ hg pull -B foo | |
243 | pulling from ssh://user@dummy/remote |
|
243 | pulling from ssh://user@dummy/remote | |
244 | no changes found |
|
244 | no changes found | |
245 | updating bookmark foo |
|
245 | updating bookmark foo | |
246 | $ hg book -d foo |
|
246 | $ hg book -d foo | |
247 | $ hg push -B foo |
|
247 | $ hg push -B foo | |
248 | pushing to ssh://user@dummy/remote |
|
248 | pushing to ssh://user@dummy/remote | |
249 | searching for changes |
|
249 | searching for changes | |
250 | no changes found |
|
250 | no changes found | |
251 | deleting remote bookmark foo |
|
251 | deleting remote bookmark foo | |
252 | [1] |
|
252 | [1] | |
253 |
|
253 | |||
254 | a bad, evil hook that prints to stdout |
|
254 | a bad, evil hook that prints to stdout | |
255 |
|
255 | |||
256 | $ cat <<EOF > $TESTTMP/badhook |
|
256 | $ cat <<EOF > $TESTTMP/badhook | |
257 | > import sys |
|
257 | > import sys | |
258 | > sys.stdout.write("KABOOM\n") |
|
258 | > sys.stdout.write("KABOOM\n") | |
259 | > EOF |
|
259 | > EOF | |
260 |
|
260 | |||
261 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
261 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
262 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
262 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
263 | $ echo r > r |
|
263 | $ echo r > r | |
264 | $ hg ci -A -m z r |
|
264 | $ hg ci -A -m z r | |
265 |
|
265 | |||
266 | push should succeed even though it has an unexpected response |
|
266 | push should succeed even though it has an unexpected response | |
267 |
|
267 | |||
268 | $ hg push |
|
268 | $ hg push | |
269 | pushing to ssh://user@dummy/remote |
|
269 | pushing to ssh://user@dummy/remote | |
270 | searching for changes |
|
270 | searching for changes | |
271 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
271 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
272 | remote: adding changesets |
|
272 | remote: adding changesets | |
273 | remote: adding manifests |
|
273 | remote: adding manifests | |
274 | remote: adding file changes |
|
274 | remote: adding file changes | |
275 | remote: added 1 changesets with 1 changes to 1 files |
|
275 | remote: added 1 changesets with 1 changes to 1 files | |
276 | remote: KABOOM |
|
276 | remote: KABOOM | |
277 | $ hg -R ../remote heads |
|
277 | $ hg -R ../remote heads | |
278 | changeset: 5:1383141674ec |
|
278 | changeset: 5:1383141674ec | |
279 | tag: tip |
|
279 | tag: tip | |
280 | parent: 3:a28a9d1a809c |
|
280 | parent: 3:a28a9d1a809c | |
281 | user: test |
|
281 | user: test | |
282 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
282 | date: Thu Jan 01 00:00:00 1970 +0000 | |
283 | summary: z |
|
283 | summary: z | |
284 |
|
284 | |||
285 | changeset: 4:6c0482d977a3 |
|
285 | changeset: 4:6c0482d977a3 | |
286 | parent: 0:1160648e36ce |
|
286 | parent: 0:1160648e36ce | |
287 | user: test |
|
287 | user: test | |
288 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
288 | date: Thu Jan 01 00:00:00 1970 +0000 | |
289 | summary: z |
|
289 | summary: z | |
290 |
|
290 | |||
291 |
|
291 | |||
292 | clone bookmarks |
|
292 | clone bookmarks | |
293 |
|
293 | |||
294 | $ hg -R ../remote bookmark test |
|
294 | $ hg -R ../remote bookmark test | |
295 | $ hg -R ../remote bookmarks |
|
295 | $ hg -R ../remote bookmarks | |
296 | * test 4:6c0482d977a3 |
|
296 | * test 4:6c0482d977a3 | |
297 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks |
|
297 | $ hg clone -e dummyssh ssh://user@dummy/remote local-bookmarks | |
298 | requesting all changes |
|
298 | requesting all changes | |
299 | adding changesets |
|
299 | adding changesets | |
300 | adding manifests |
|
300 | adding manifests | |
301 | adding file changes |
|
301 | adding file changes | |
302 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
302 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
303 | updating to branch default |
|
303 | updating to branch default | |
304 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
304 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
305 | $ hg -R local-bookmarks bookmarks |
|
305 | $ hg -R local-bookmarks bookmarks | |
306 | test 4:6c0482d977a3 |
|
306 | test 4:6c0482d977a3 | |
307 |
|
307 | |||
308 | passwords in ssh urls are not supported |
|
308 | passwords in ssh urls are not supported | |
309 | (we use a glob here because different Python versions give different |
|
309 | (we use a glob here because different Python versions give different | |
310 | results here) |
|
310 | results here) | |
311 |
|
311 | |||
312 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
312 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
313 | pushing to ssh://user:*@dummy/remote (glob) |
|
313 | pushing to ssh://user:*@dummy/remote (glob) | |
314 | abort: password in URL not supported! |
|
314 | abort: password in URL not supported! | |
315 | [255] |
|
315 | [255] | |
316 |
|
316 | |||
317 | $ cd .. |
|
317 | $ cd .. | |
318 |
|
318 | |||
319 | hide outer repo |
|
319 | hide outer repo | |
320 | $ hg init |
|
320 | $ hg init | |
321 |
|
321 | |||
322 | Test remote paths with spaces (issue2983): |
|
322 | Test remote paths with spaces (issue2983): | |
323 |
|
323 | |||
324 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" |
|
324 | $ hg init --ssh dummyssh "ssh://user@dummy/a repo" | |
325 | $ touch "$TESTTMP/a repo/test" |
|
325 | $ touch "$TESTTMP/a repo/test" | |
326 | $ hg -R 'a repo' commit -A -m "test" |
|
326 | $ hg -R 'a repo' commit -A -m "test" | |
327 | adding test |
|
327 | adding test | |
328 | $ hg -R 'a repo' tag tag |
|
328 | $ hg -R 'a repo' tag tag | |
329 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" |
|
329 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo" | |
330 | 73649e48688a |
|
330 | 73649e48688a | |
331 |
|
331 | |||
332 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" |
|
332 | $ hg id --ssh dummyssh "ssh://user@dummy/a repo#noNoNO" | |
333 | abort: unknown revision 'noNoNO'! |
|
333 | abort: unknown revision 'noNoNO'! | |
334 | [255] |
|
334 | [255] | |
335 |
|
335 | |||
336 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
336 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
337 |
|
337 | |||
338 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" |
|
338 | $ hg clone --ssh dummyssh "ssh://user@dummy/a repo" | |
339 | destination directory: a repo |
|
339 | destination directory: a repo | |
340 | abort: destination 'a repo' is not empty |
|
340 | abort: destination 'a repo' is not empty | |
341 | [255] |
|
341 | [255] | |
342 |
|
342 | |||
343 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
343 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
344 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
344 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
345 | parameters: |
|
345 | parameters: | |
346 |
|
346 | |||
347 | $ cat > ssh.sh << EOF |
|
347 | $ cat > ssh.sh << EOF | |
348 | > userhost="\$1" |
|
348 | > userhost="\$1" | |
349 | > SSH_ORIGINAL_COMMAND="\$2" |
|
349 | > SSH_ORIGINAL_COMMAND="\$2" | |
350 | > export SSH_ORIGINAL_COMMAND |
|
350 | > export SSH_ORIGINAL_COMMAND | |
351 | > PYTHONPATH="$PYTHONPATH" |
|
351 | > PYTHONPATH="$PYTHONPATH" | |
352 | > export PYTHONPATH |
|
352 | > export PYTHONPATH | |
353 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
353 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
354 | > EOF |
|
354 | > EOF | |
355 |
|
355 | |||
356 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
356 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
357 | 73649e48688a |
|
357 | 73649e48688a | |
358 |
|
358 | |||
359 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
359 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
360 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
360 | remote: Illegal repository "$TESTTMP/a'repo" (glob) | |
361 | abort: no suitable response from remote hg! |
|
361 | abort: no suitable response from remote hg! | |
362 | [255] |
|
362 | [255] | |
363 |
|
363 | |||
364 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
364 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
365 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
365 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
366 | abort: no suitable response from remote hg! |
|
366 | abort: no suitable response from remote hg! | |
367 | [255] |
|
367 | [255] | |
368 |
|
368 | |||
369 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
369 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" | |
370 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
370 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
371 | [255] |
|
371 | [255] | |
372 |
|
372 | |||
373 | Test hg-ssh in read-only mode: |
|
373 | Test hg-ssh in read-only mode: | |
374 |
|
374 | |||
375 | $ cat > ssh.sh << EOF |
|
375 | $ cat > ssh.sh << EOF | |
376 | > userhost="\$1" |
|
376 | > userhost="\$1" | |
377 | > SSH_ORIGINAL_COMMAND="\$2" |
|
377 | > SSH_ORIGINAL_COMMAND="\$2" | |
378 | > export SSH_ORIGINAL_COMMAND |
|
378 | > export SSH_ORIGINAL_COMMAND | |
379 | > PYTHONPATH="$PYTHONPATH" |
|
379 | > PYTHONPATH="$PYTHONPATH" | |
380 | > export PYTHONPATH |
|
380 | > export PYTHONPATH | |
381 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
381 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
382 | > EOF |
|
382 | > EOF | |
383 |
|
383 | |||
384 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
384 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
385 | requesting all changes |
|
385 | requesting all changes | |
386 | adding changesets |
|
386 | adding changesets | |
387 | adding manifests |
|
387 | adding manifests | |
388 | adding file changes |
|
388 | adding file changes | |
389 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
389 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
390 | updating to branch default |
|
390 | updating to branch default | |
391 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
391 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
392 |
|
392 | |||
393 | $ cd read-only-local |
|
393 | $ cd read-only-local | |
394 | $ echo "baz" > bar |
|
394 | $ echo "baz" > bar | |
395 | $ hg ci -A -m "unpushable commit" bar |
|
395 | $ hg ci -A -m "unpushable commit" bar | |
396 | $ hg push --ssh "sh ../ssh.sh" |
|
396 | $ hg push --ssh "sh ../ssh.sh" | |
397 | pushing to ssh://user@dummy/*/remote (glob) |
|
397 | pushing to ssh://user@dummy/*/remote (glob) | |
398 | searching for changes |
|
398 | searching for changes | |
399 | remote: Permission denied |
|
399 | remote: Permission denied | |
400 | abort: pretxnopen.hg-ssh hook failed |
|
400 | abort: pretxnopen.hg-ssh hook failed | |
401 | [255] |
|
401 | [255] | |
402 |
|
402 | |||
403 | $ cd .. |
|
403 | $ cd .. | |
404 |
|
404 | |||
405 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
405 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
406 |
|
406 | |||
407 | $ hg clone remote stderr-ordering |
|
407 | $ hg clone remote stderr-ordering | |
408 | updating to branch default |
|
408 | updating to branch default | |
409 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
409 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
410 | $ cd stderr-ordering |
|
410 | $ cd stderr-ordering | |
411 | $ cat >> localwrite.py << EOF |
|
411 | $ cat >> localwrite.py << EOF | |
412 | > from mercurial import exchange, extensions |
|
412 | > from mercurial import exchange, extensions | |
413 | > |
|
413 | > | |
414 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
414 | > def wrappedpush(orig, repo, *args, **kwargs): | |
415 | > res = orig(repo, *args, **kwargs) |
|
415 | > res = orig(repo, *args, **kwargs) | |
416 | > repo.ui.write('local stdout\n') |
|
416 | > repo.ui.write('local stdout\n') | |
417 | > return res |
|
417 | > return res | |
418 | > |
|
418 | > | |
419 | > def extsetup(ui): |
|
419 | > def extsetup(ui): | |
420 | > extensions.wrapfunction(exchange, 'push', wrappedpush) |
|
420 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
421 | > EOF |
|
421 | > EOF | |
422 |
|
422 | |||
423 | $ cat >> .hg/hgrc << EOF |
|
423 | $ cat >> .hg/hgrc << EOF | |
424 | > [paths] |
|
424 | > [paths] | |
425 | > default-push = ssh://user@dummy/remote |
|
425 | > default-push = ssh://user@dummy/remote | |
426 | > [ui] |
|
426 | > [ui] | |
427 | > ssh = dummyssh |
|
427 | > ssh = dummyssh | |
428 | > [extensions] |
|
428 | > [extensions] | |
429 | > localwrite = localwrite.py |
|
429 | > localwrite = localwrite.py | |
430 | > EOF |
|
430 | > EOF | |
431 |
|
431 | |||
432 | $ echo localwrite > foo |
|
432 | $ echo localwrite > foo | |
433 | $ hg commit -m 'testing localwrite' |
|
433 | $ hg commit -m 'testing localwrite' | |
434 | $ hg push |
|
434 | $ hg push | |
435 | pushing to ssh://user@dummy/remote |
|
435 | pushing to ssh://user@dummy/remote | |
436 | searching for changes |
|
436 | searching for changes | |
437 | remote: adding changesets |
|
437 | remote: adding changesets | |
438 | remote: adding manifests |
|
438 | remote: adding manifests | |
439 | remote: adding file changes |
|
439 | remote: adding file changes | |
440 | remote: added 1 changesets with 1 changes to 1 files |
|
440 | remote: added 1 changesets with 1 changes to 1 files | |
441 | remote: KABOOM |
|
441 | remote: KABOOM | |
442 | local stdout |
|
442 | local stdout | |
443 |
|
443 | |||
444 | debug output |
|
444 | debug output | |
445 |
|
445 | |||
446 | $ hg pull --debug ssh://user@dummy/remote |
|
446 | $ hg pull --debug ssh://user@dummy/remote | |
447 | pulling from ssh://user@dummy/remote |
|
447 | pulling from ssh://user@dummy/remote | |
448 | running dummyssh user@dummy 'hg -R remote serve --stdio' |
|
448 | running dummyssh user@dummy 'hg -R remote serve --stdio' | |
449 | sending hello command |
|
449 | sending hello command | |
450 | sending between command |
|
450 | sending between command | |
451 | remote: 286 |
|
451 | remote: 286 | |
452 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 |
|
452 | remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 | |
453 | remote: 1 |
|
453 | remote: 1 | |
454 | query 1; heads |
|
454 | query 1; heads | |
455 | sending batch command |
|
455 | sending batch command | |
456 | searching for changes |
|
456 | searching for changes | |
457 | all remote heads known locally |
|
457 | all remote heads known locally | |
458 | no changes found |
|
458 | no changes found | |
459 | sending getbundle command |
|
459 | sending getbundle command | |
460 | bundle2-input-bundle: with-transaction |
|
460 | bundle2-input-bundle: with-transaction | |
461 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
461 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
462 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
462 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
463 | bundle2-input-part: total payload size 45 |
|
463 | bundle2-input-part: total payload size 45 | |
464 | bundle2-input-bundle: 1 parts total |
|
464 | bundle2-input-bundle: 1 parts total | |
465 | checking for updated bookmarks |
|
465 | checking for updated bookmarks | |
466 | preparing listkeys for "phases" |
|
466 | preparing listkeys for "phases" | |
467 | sending listkeys command |
|
467 | sending listkeys command | |
468 | received listkey for "phases": 15 bytes |
|
468 | received listkey for "phases": 15 bytes | |
469 |
|
469 | |||
470 | $ cd .. |
|
470 | $ cd .. | |
471 |
|
471 | |||
472 | $ cat dummylog |
|
472 | $ cat dummylog | |
473 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
473 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
474 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
474 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
475 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
475 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
476 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio |
|
476 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio | |
477 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
477 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
478 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
478 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
479 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
479 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
480 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
480 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
481 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
481 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
482 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
482 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
484 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
484 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
485 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
490 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
491 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
492 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
493 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
494 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
494 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
495 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
496 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
496 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
497 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
497 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
498 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
498 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
499 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
499 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
500 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) |
|
502 | changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob) | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
@@ -1,162 +1,162 b'' | |||||
1 | #require killdaemons |
|
1 | #require killdaemons | |
2 |
|
2 | |||
3 | #if windows |
|
3 | #if windows | |
4 | $ hg clone http://localhost:$HGPORT/ copy |
|
4 | $ hg clone http://localhost:$HGPORT/ copy | |
5 | abort: * (glob) |
|
5 | abort: * (glob) | |
6 | [255] |
|
6 | [255] | |
7 | #else |
|
7 | #else | |
8 | $ hg clone http://localhost:$HGPORT/ copy |
|
8 | $ hg clone http://localhost:$HGPORT/ copy | |
9 | abort: error: Connection refused |
|
9 | abort: error: Connection refused | |
10 | [255] |
|
10 | [255] | |
11 | #endif |
|
11 | #endif | |
12 | $ test -d copy |
|
12 | $ test -d copy | |
13 | [1] |
|
13 | [1] | |
14 |
|
14 | |||
15 | This server doesn't do range requests so it's basically only good for |
|
15 | This server doesn't do range requests so it's basically only good for | |
16 | one pull |
|
16 | one pull | |
17 |
|
17 | |||
18 | $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid |
|
18 | $ python "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid | |
19 | $ cat dumb.pid >> $DAEMON_PIDS |
|
19 | $ cat dumb.pid >> $DAEMON_PIDS | |
20 | $ hg init remote |
|
20 | $ hg init remote | |
21 | $ cd remote |
|
21 | $ cd remote | |
22 | $ echo foo > bar |
|
22 | $ echo foo > bar | |
23 | $ echo c2 > '.dotfile with spaces' |
|
23 | $ echo c2 > '.dotfile with spaces' | |
24 | $ hg add |
|
24 | $ hg add | |
25 | adding .dotfile with spaces |
|
25 | adding .dotfile with spaces | |
26 | adding bar |
|
26 | adding bar | |
27 | $ hg commit -m"test" |
|
27 | $ hg commit -m"test" | |
28 | $ hg tip |
|
28 | $ hg tip | |
29 | changeset: 0:02770d679fb8 |
|
29 | changeset: 0:02770d679fb8 | |
30 | tag: tip |
|
30 | tag: tip | |
31 | user: test |
|
31 | user: test | |
32 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
32 | date: Thu Jan 01 00:00:00 1970 +0000 | |
33 | summary: test |
|
33 | summary: test | |
34 |
|
34 | |||
35 | $ cd .. |
|
35 | $ cd .. | |
36 | $ hg clone static-http://localhost:$HGPORT/remote local |
|
36 | $ hg clone static-http://localhost:$HGPORT/remote local | |
37 | requesting all changes |
|
37 | requesting all changes | |
38 | adding changesets |
|
38 | adding changesets | |
39 | adding manifests |
|
39 | adding manifests | |
40 | adding file changes |
|
40 | adding file changes | |
41 | added 1 changesets with 2 changes to 2 files |
|
41 | added 1 changesets with 2 changes to 2 files | |
42 | updating to branch default |
|
42 | updating to branch default | |
43 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 | $ cd local |
|
44 | $ cd local | |
45 | $ hg verify |
|
45 | $ hg verify | |
46 | checking changesets |
|
46 | checking changesets | |
47 | checking manifests |
|
47 | checking manifests | |
48 | crosschecking files in changesets and manifests |
|
48 | crosschecking files in changesets and manifests | |
49 | checking files |
|
49 | checking files | |
50 | 2 files, 1 changesets, 2 total revisions |
|
50 | 2 files, 1 changesets, 2 total revisions | |
51 | $ cat bar |
|
51 | $ cat bar | |
52 | foo |
|
52 | foo | |
53 | $ cd ../remote |
|
53 | $ cd ../remote | |
54 | $ echo baz > quux |
|
54 | $ echo baz > quux | |
55 | $ hg commit -A -mtest2 |
|
55 | $ hg commit -A -mtest2 | |
56 | adding quux |
|
56 | adding quux | |
57 |
|
57 | |||
58 | check for HTTP opener failures when cachefile does not exist |
|
58 | check for HTTP opener failures when cachefile does not exist | |
59 |
|
59 | |||
60 | $ rm .hg/cache/* |
|
60 | $ rm .hg/cache/* | |
61 | $ cd ../local |
|
61 | $ cd ../local | |
62 | $ echo '[hooks]' >> .hg/hgrc |
|
62 | $ echo '[hooks]' >> .hg/hgrc | |
63 |
$ echo "changegroup = p |
|
63 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc | |
64 | $ hg pull |
|
64 | $ hg pull | |
65 | pulling from static-http://localhost:$HGPORT/remote |
|
65 | pulling from static-http://localhost:$HGPORT/remote | |
66 | searching for changes |
|
66 | searching for changes | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
69 | adding file changes |
|
69 | adding file changes | |
70 | added 1 changesets with 1 changes to 1 files |
|
70 | added 1 changesets with 1 changes to 1 files | |
71 | changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT/remote (glob) |
|
71 | changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT/remote (glob) | |
72 | (run 'hg update' to get a working copy) |
|
72 | (run 'hg update' to get a working copy) | |
73 |
|
73 | |||
74 | trying to push |
|
74 | trying to push | |
75 |
|
75 | |||
76 | $ hg update |
|
76 | $ hg update | |
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 | $ echo more foo >> bar |
|
78 | $ echo more foo >> bar | |
79 | $ hg commit -m"test" |
|
79 | $ hg commit -m"test" | |
80 | $ hg push |
|
80 | $ hg push | |
81 | pushing to static-http://localhost:$HGPORT/remote |
|
81 | pushing to static-http://localhost:$HGPORT/remote | |
82 | abort: destination does not support push |
|
82 | abort: destination does not support push | |
83 | [255] |
|
83 | [255] | |
84 |
|
84 | |||
85 | trying clone -r |
|
85 | trying clone -r | |
86 |
|
86 | |||
87 | $ cd .. |
|
87 | $ cd .. | |
88 | $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0 |
|
88 | $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0 | |
89 | abort: unknown revision 'doesnotexist'! |
|
89 | abort: unknown revision 'doesnotexist'! | |
90 | [255] |
|
90 | [255] | |
91 | $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0 |
|
91 | $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0 | |
92 | adding changesets |
|
92 | adding changesets | |
93 | adding manifests |
|
93 | adding manifests | |
94 | adding file changes |
|
94 | adding file changes | |
95 | added 1 changesets with 2 changes to 2 files |
|
95 | added 1 changesets with 2 changes to 2 files | |
96 | updating to branch default |
|
96 | updating to branch default | |
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
98 |
|
98 | |||
99 | test with "/" URI (issue747) and subrepo |
|
99 | test with "/" URI (issue747) and subrepo | |
100 |
|
100 | |||
101 | $ hg init |
|
101 | $ hg init | |
102 | $ hg init sub |
|
102 | $ hg init sub | |
103 | $ touch sub/test |
|
103 | $ touch sub/test | |
104 | $ hg -R sub commit -A -m "test" |
|
104 | $ hg -R sub commit -A -m "test" | |
105 | adding test |
|
105 | adding test | |
106 | $ hg -R sub tag not-empty |
|
106 | $ hg -R sub tag not-empty | |
107 | $ echo sub=sub > .hgsub |
|
107 | $ echo sub=sub > .hgsub | |
108 | $ echo a > a |
|
108 | $ echo a > a | |
109 | $ hg add a .hgsub |
|
109 | $ hg add a .hgsub | |
110 | $ hg -q ci -ma |
|
110 | $ hg -q ci -ma | |
111 | $ hg clone static-http://localhost:$HGPORT/ local2 |
|
111 | $ hg clone static-http://localhost:$HGPORT/ local2 | |
112 | requesting all changes |
|
112 | requesting all changes | |
113 | adding changesets |
|
113 | adding changesets | |
114 | adding manifests |
|
114 | adding manifests | |
115 | adding file changes |
|
115 | adding file changes | |
116 | added 1 changesets with 3 changes to 3 files |
|
116 | added 1 changesets with 3 changes to 3 files | |
117 | updating to branch default |
|
117 | updating to branch default | |
118 | cloning subrepo sub from static-http://localhost:$HGPORT/sub |
|
118 | cloning subrepo sub from static-http://localhost:$HGPORT/sub | |
119 | requesting all changes |
|
119 | requesting all changes | |
120 | adding changesets |
|
120 | adding changesets | |
121 | adding manifests |
|
121 | adding manifests | |
122 | adding file changes |
|
122 | adding file changes | |
123 | added 2 changesets with 2 changes to 2 files |
|
123 | added 2 changesets with 2 changes to 2 files | |
124 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
124 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
125 | $ cd local2 |
|
125 | $ cd local2 | |
126 | $ hg verify |
|
126 | $ hg verify | |
127 | checking changesets |
|
127 | checking changesets | |
128 | checking manifests |
|
128 | checking manifests | |
129 | crosschecking files in changesets and manifests |
|
129 | crosschecking files in changesets and manifests | |
130 | checking files |
|
130 | checking files | |
131 | 3 files, 1 changesets, 3 total revisions |
|
131 | 3 files, 1 changesets, 3 total revisions | |
132 | $ cat a |
|
132 | $ cat a | |
133 | a |
|
133 | a | |
134 | $ hg paths |
|
134 | $ hg paths | |
135 | default = static-http://localhost:$HGPORT/ |
|
135 | default = static-http://localhost:$HGPORT/ | |
136 |
|
136 | |||
137 | test with empty repo (issue965) |
|
137 | test with empty repo (issue965) | |
138 |
|
138 | |||
139 | $ cd .. |
|
139 | $ cd .. | |
140 | $ hg init remotempty |
|
140 | $ hg init remotempty | |
141 | $ hg clone static-http://localhost:$HGPORT/remotempty local3 |
|
141 | $ hg clone static-http://localhost:$HGPORT/remotempty local3 | |
142 | no changes found |
|
142 | no changes found | |
143 | updating to branch default |
|
143 | updating to branch default | |
144 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
144 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
145 | $ cd local3 |
|
145 | $ cd local3 | |
146 | $ hg verify |
|
146 | $ hg verify | |
147 | checking changesets |
|
147 | checking changesets | |
148 | checking manifests |
|
148 | checking manifests | |
149 | crosschecking files in changesets and manifests |
|
149 | crosschecking files in changesets and manifests | |
150 | checking files |
|
150 | checking files | |
151 | 0 files, 0 changesets, 0 total revisions |
|
151 | 0 files, 0 changesets, 0 total revisions | |
152 | $ hg paths |
|
152 | $ hg paths | |
153 | default = static-http://localhost:$HGPORT/remotempty |
|
153 | default = static-http://localhost:$HGPORT/remotempty | |
154 |
|
154 | |||
155 | test with non-repo |
|
155 | test with non-repo | |
156 |
|
156 | |||
157 | $ cd .. |
|
157 | $ cd .. | |
158 | $ mkdir notarepo |
|
158 | $ mkdir notarepo | |
159 | $ hg clone static-http://localhost:$HGPORT/notarepo local3 |
|
159 | $ hg clone static-http://localhost:$HGPORT/notarepo local3 | |
160 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
|
160 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! | |
161 | [255] |
|
161 | [255] | |
162 | $ killdaemons.py |
|
162 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now