Show More
@@ -1,426 +1,428 b'' | |||
|
1 | 1 | $ HGFOO=BAR; export HGFOO |
|
2 | 2 | $ cat >> $HGRCPATH <<EOF |
|
3 | 3 | > [extensions] |
|
4 | 4 | > graphlog= |
|
5 | 5 | > |
|
6 | 6 | > [alias] |
|
7 | 7 | > # should clobber ci but not commit (issue2993) |
|
8 | 8 | > ci = version |
|
9 | 9 | > myinit = init |
|
10 | 10 | > optionalrepo = showconfig alias.myinit |
|
11 | 11 | > cleanstatus = status -c |
|
12 | 12 | > unknown = bargle |
|
13 | 13 | > ambiguous = s |
|
14 | 14 | > recursive = recursive |
|
15 | 15 | > nodefinition = |
|
16 | 16 | > no--cwd = status --cwd elsewhere |
|
17 | 17 | > no-R = status -R elsewhere |
|
18 | 18 | > no--repo = status --repo elsewhere |
|
19 | 19 | > no--repository = status --repository elsewhere |
|
20 | 20 | > mylog = log |
|
21 | 21 | > lognull = log -r null |
|
22 | 22 | > shortlog = log --template '{rev} {node|short} | {date|isodate}\n' |
|
23 | 23 | > positional = log --template '{\$2} {\$1} | {date|isodate}\n' |
|
24 | 24 | > dln = lognull --debug |
|
25 | 25 | > nousage = rollback |
|
26 | 26 | > put = export -r 0 -o "\$FOO/%R.diff" |
|
27 | 27 | > blank = !printf '\n' |
|
28 | 28 | > self = !printf '\$0\n' |
|
29 | 29 | > echoall = !printf '\$@\n' |
|
30 | 30 | > echo1 = !printf '\$1\n' |
|
31 | 31 | > echo2 = !printf '\$2\n' |
|
32 | 32 | > echo13 = !printf '\$1 \$3\n' |
|
33 | 33 | > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g' |
|
34 | 34 | > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g' |
|
35 | 35 | > rt = root |
|
36 | 36 | > tglog = glog --template "{rev}:{node|short}: '{desc}' {branches}\n" |
|
37 | 37 | > idalias = id |
|
38 | 38 | > idaliaslong = id |
|
39 | 39 | > idaliasshell = !echo test |
|
40 | 40 | > parentsshell1 = !echo one |
|
41 | 41 | > parentsshell2 = !echo two |
|
42 | 42 | > escaped1 = !printf 'test\$\$test\n' |
|
43 | 43 | > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"' |
|
44 | 44 | > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"' |
|
45 | 45 | > escaped4 = !printf '\$\$0 \$\$@\n' |
|
46 | 46 | > |
|
47 | 47 | > [defaults] |
|
48 | 48 | > mylog = -q |
|
49 | 49 | > lognull = -q |
|
50 | 50 | > log = -v |
|
51 | 51 | > EOF |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | basic |
|
55 | 55 | |
|
56 | 56 | $ hg myinit alias |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | unknown |
|
60 | 60 | |
|
61 | 61 | $ hg unknown |
|
62 | 62 | alias 'unknown' resolves to unknown command 'bargle' |
|
63 | 63 | $ hg help unknown |
|
64 | 64 | alias 'unknown' resolves to unknown command 'bargle' |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | ambiguous |
|
68 | 68 | |
|
69 | 69 | $ hg ambiguous |
|
70 | 70 | alias 'ambiguous' resolves to ambiguous command 's' |
|
71 | 71 | $ hg help ambiguous |
|
72 | 72 | alias 'ambiguous' resolves to ambiguous command 's' |
|
73 | 73 | |
|
74 | 74 | |
|
75 | 75 | recursive |
|
76 | 76 | |
|
77 | 77 | $ hg recursive |
|
78 | 78 | alias 'recursive' resolves to unknown command 'recursive' |
|
79 | 79 | $ hg help recursive |
|
80 | 80 | alias 'recursive' resolves to unknown command 'recursive' |
|
81 | 81 | |
|
82 | 82 | |
|
83 | 83 | no definition |
|
84 | 84 | |
|
85 | 85 | $ hg nodef |
|
86 | 86 | no definition for alias 'nodefinition' |
|
87 | 87 | $ hg help nodef |
|
88 | 88 | no definition for alias 'nodefinition' |
|
89 | 89 | |
|
90 | 90 | |
|
91 | 91 | invalid options |
|
92 | 92 | |
|
93 | 93 | $ hg no--cwd |
|
94 | 94 | error in definition for alias 'no--cwd': --cwd may only be given on the command line |
|
95 | 95 | $ hg help no--cwd |
|
96 | 96 | error in definition for alias 'no--cwd': --cwd may only be given on the command line |
|
97 | 97 | $ hg no-R |
|
98 | 98 | error in definition for alias 'no-R': -R may only be given on the command line |
|
99 | 99 | $ hg help no-R |
|
100 | 100 | error in definition for alias 'no-R': -R may only be given on the command line |
|
101 | 101 | $ hg no--repo |
|
102 | 102 | error in definition for alias 'no--repo': --repo may only be given on the command line |
|
103 | 103 | $ hg help no--repo |
|
104 | 104 | error in definition for alias 'no--repo': --repo may only be given on the command line |
|
105 | 105 | $ hg no--repository |
|
106 | 106 | error in definition for alias 'no--repository': --repository may only be given on the command line |
|
107 | 107 | $ hg help no--repository |
|
108 | 108 | error in definition for alias 'no--repository': --repository may only be given on the command line |
|
109 | 109 | |
|
110 | 110 | optional repository |
|
111 | 111 | |
|
112 | #if no-outer-repo | |
|
112 | 113 | $ hg optionalrepo |
|
113 | 114 | init |
|
115 | #endif | |
|
114 | 116 | $ cd alias |
|
115 | 117 | $ cat > .hg/hgrc <<EOF |
|
116 | 118 | > [alias] |
|
117 | 119 | > myinit = init -q |
|
118 | 120 | > EOF |
|
119 | 121 | $ hg optionalrepo |
|
120 | 122 | init -q |
|
121 | 123 | |
|
122 | 124 | no usage |
|
123 | 125 | |
|
124 | 126 | $ hg nousage |
|
125 | 127 | no rollback information available |
|
126 | 128 | |
|
127 | 129 | $ echo foo > foo |
|
128 | 130 | $ hg commit -Amfoo |
|
129 | 131 | adding foo |
|
130 | 132 | |
|
131 | 133 | |
|
132 | 134 | with opts |
|
133 | 135 | |
|
134 | 136 | $ hg cleanst |
|
135 | 137 | C foo |
|
136 | 138 | |
|
137 | 139 | |
|
138 | 140 | with opts and whitespace |
|
139 | 141 | |
|
140 | 142 | $ hg shortlog |
|
141 | 143 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 |
|
142 | 144 | |
|
143 | 145 | positional arguments |
|
144 | 146 | |
|
145 | 147 | $ hg positional |
|
146 | 148 | abort: too few arguments for command alias |
|
147 | 149 | [255] |
|
148 | 150 | $ hg positional a |
|
149 | 151 | abort: too few arguments for command alias |
|
150 | 152 | [255] |
|
151 | 153 | $ hg positional 'node|short' rev |
|
152 | 154 | 0 e63c23eaa88a | 1970-01-01 00:00 +0000 |
|
153 | 155 | |
|
154 | 156 | interaction with defaults |
|
155 | 157 | |
|
156 | 158 | $ hg mylog |
|
157 | 159 | 0:e63c23eaa88a |
|
158 | 160 | $ hg lognull |
|
159 | 161 | -1:000000000000 |
|
160 | 162 | |
|
161 | 163 | |
|
162 | 164 | properly recursive |
|
163 | 165 | |
|
164 | 166 | $ hg dln |
|
165 | 167 | changeset: -1:0000000000000000000000000000000000000000 |
|
166 | 168 | parent: -1:0000000000000000000000000000000000000000 |
|
167 | 169 | parent: -1:0000000000000000000000000000000000000000 |
|
168 | 170 | manifest: -1:0000000000000000000000000000000000000000 |
|
169 | 171 | user: |
|
170 | 172 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
171 | 173 | extra: branch=default |
|
172 | 174 | |
|
173 | 175 | |
|
174 | 176 | |
|
175 | 177 | path expanding |
|
176 | 178 | |
|
177 | 179 | $ FOO=`pwd` hg put |
|
178 | 180 | $ cat 0.diff |
|
179 | 181 | # HG changeset patch |
|
180 | 182 | # User test |
|
181 | 183 | # Date 0 0 |
|
182 | 184 | # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
183 | 185 | # Parent 0000000000000000000000000000000000000000 |
|
184 | 186 | foo |
|
185 | 187 | |
|
186 | 188 | diff -r 000000000000 -r e63c23eaa88a foo |
|
187 | 189 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
188 | 190 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
189 | 191 | @@ -0,0 +1,1 @@ |
|
190 | 192 | +foo |
|
191 | 193 | |
|
192 | 194 | |
|
193 | 195 | simple shell aliases |
|
194 | 196 | |
|
195 | 197 | $ hg blank |
|
196 | 198 | |
|
197 | 199 | $ hg blank foo |
|
198 | 200 | |
|
199 | 201 | $ hg self |
|
200 | 202 | self |
|
201 | 203 | $ hg echoall |
|
202 | 204 | |
|
203 | 205 | $ hg echoall foo |
|
204 | 206 | foo |
|
205 | 207 | $ hg echoall 'test $2' foo |
|
206 | 208 | test $2 foo |
|
207 | 209 | $ hg echo1 foo bar baz |
|
208 | 210 | foo |
|
209 | 211 | $ hg echo2 foo bar baz |
|
210 | 212 | bar |
|
211 | 213 | $ hg echo13 foo bar baz test |
|
212 | 214 | foo baz |
|
213 | 215 | $ hg echo2 foo |
|
214 | 216 | |
|
215 | 217 | $ echo bar > bar |
|
216 | 218 | $ hg commit -qA -m bar |
|
217 | 219 | $ hg count . |
|
218 | 220 | 1 |
|
219 | 221 | $ hg count 'branch(default)' |
|
220 | 222 | 2 |
|
221 | 223 | $ hg mcount -r '"branch(default)"' |
|
222 | 224 | 2 |
|
223 | 225 | |
|
224 | 226 | $ hg tglog |
|
225 | 227 | @ 1:7e7f92de180e: 'bar' |
|
226 | 228 | | |
|
227 | 229 | o 0:e63c23eaa88a: 'foo' |
|
228 | 230 | |
|
229 | 231 | |
|
230 | 232 | |
|
231 | 233 | shadowing |
|
232 | 234 | |
|
233 | 235 | $ hg i |
|
234 | 236 | hg: command 'i' is ambiguous: |
|
235 | 237 | idalias idaliaslong idaliasshell identify import incoming init |
|
236 | 238 | [255] |
|
237 | 239 | $ hg id |
|
238 | 240 | 7e7f92de180e tip |
|
239 | 241 | $ hg ida |
|
240 | 242 | hg: command 'ida' is ambiguous: |
|
241 | 243 | idalias idaliaslong idaliasshell |
|
242 | 244 | [255] |
|
243 | 245 | $ hg idalias |
|
244 | 246 | 7e7f92de180e tip |
|
245 | 247 | $ hg idaliasl |
|
246 | 248 | 7e7f92de180e tip |
|
247 | 249 | $ hg idaliass |
|
248 | 250 | test |
|
249 | 251 | $ hg parentsshell |
|
250 | 252 | hg: command 'parentsshell' is ambiguous: |
|
251 | 253 | parentsshell1 parentsshell2 |
|
252 | 254 | [255] |
|
253 | 255 | $ hg parentsshell1 |
|
254 | 256 | one |
|
255 | 257 | $ hg parentsshell2 |
|
256 | 258 | two |
|
257 | 259 | |
|
258 | 260 | |
|
259 | 261 | shell aliases with global options |
|
260 | 262 | |
|
261 | 263 | $ hg init sub |
|
262 | 264 | $ cd sub |
|
263 | 265 | $ hg count 'branch(default)' |
|
264 | 266 | 0 |
|
265 | 267 | $ hg -v count 'branch(default)' |
|
266 | 268 | 0 |
|
267 | 269 | $ hg -R .. count 'branch(default)' |
|
268 | 270 | 0 |
|
269 | 271 | $ hg --cwd .. count 'branch(default)' |
|
270 | 272 | 2 |
|
271 | 273 | $ hg echoall --cwd .. |
|
272 | 274 | |
|
273 | 275 | |
|
274 | 276 | |
|
275 | 277 | repo specific shell aliases |
|
276 | 278 | |
|
277 | 279 | $ cat >> .hg/hgrc <<EOF |
|
278 | 280 | > [alias] |
|
279 | 281 | > subalias = !echo sub |
|
280 | 282 | > EOF |
|
281 | 283 | $ cat >> ../.hg/hgrc <<EOF |
|
282 | 284 | > [alias] |
|
283 | 285 | > mainalias = !echo main |
|
284 | 286 | > EOF |
|
285 | 287 | |
|
286 | 288 | |
|
287 | 289 | shell alias defined in current repo |
|
288 | 290 | |
|
289 | 291 | $ hg subalias |
|
290 | 292 | sub |
|
291 | 293 | $ hg --cwd .. subalias > /dev/null |
|
292 | 294 | hg: unknown command 'subalias' |
|
293 | 295 | [255] |
|
294 | 296 | $ hg -R .. subalias > /dev/null |
|
295 | 297 | hg: unknown command 'subalias' |
|
296 | 298 | [255] |
|
297 | 299 | |
|
298 | 300 | |
|
299 | 301 | shell alias defined in other repo |
|
300 | 302 | |
|
301 | 303 | $ hg mainalias > /dev/null |
|
302 | 304 | hg: unknown command 'mainalias' |
|
303 | 305 | [255] |
|
304 | 306 | $ hg -R .. mainalias |
|
305 | 307 | main |
|
306 | 308 | $ hg --cwd .. mainalias |
|
307 | 309 | main |
|
308 | 310 | |
|
309 | 311 | |
|
310 | 312 | shell aliases with escaped $ chars |
|
311 | 313 | |
|
312 | 314 | $ hg escaped1 |
|
313 | 315 | test$test |
|
314 | 316 | $ hg escaped2 |
|
315 | 317 | HGFOO is BAR |
|
316 | 318 | $ hg escaped3 HGFOO |
|
317 | 319 | HGFOO is BAR |
|
318 | 320 | $ hg escaped4 test |
|
319 | 321 | $0 $@ |
|
320 | 322 | |
|
321 | 323 | |
|
322 | 324 | invalid arguments |
|
323 | 325 | |
|
324 | 326 | $ hg rt foo |
|
325 | 327 | hg rt: invalid arguments |
|
326 | 328 | hg rt |
|
327 | 329 | |
|
328 | 330 | alias for: hg root |
|
329 | 331 | |
|
330 | 332 | use "hg help rt" to show the full help text |
|
331 | 333 | [255] |
|
332 | 334 | |
|
333 | 335 | invalid global arguments for normal commands, aliases, and shell aliases |
|
334 | 336 | |
|
335 | 337 | $ hg --invalid root |
|
336 | 338 | hg: option --invalid not recognized |
|
337 | 339 | Mercurial Distributed SCM |
|
338 | 340 | |
|
339 | 341 | basic commands: |
|
340 | 342 | |
|
341 | 343 | add add the specified files on the next commit |
|
342 | 344 | annotate show changeset information by line for each file |
|
343 | 345 | clone make a copy of an existing repository |
|
344 | 346 | commit commit the specified files or all outstanding changes |
|
345 | 347 | diff diff repository (or selected files) |
|
346 | 348 | export dump the header and diffs for one or more changesets |
|
347 | 349 | forget forget the specified files on the next commit |
|
348 | 350 | init create a new repository in the given directory |
|
349 | 351 | log show revision history of entire repository or files |
|
350 | 352 | merge merge working directory with another revision |
|
351 | 353 | phase set or show the current phase name |
|
352 | 354 | pull pull changes from the specified source |
|
353 | 355 | push push changes to the specified destination |
|
354 | 356 | remove remove the specified files on the next commit |
|
355 | 357 | serve start stand-alone webserver |
|
356 | 358 | status show changed files in the working directory |
|
357 | 359 | summary summarize working directory state |
|
358 | 360 | update update working directory (or switch revisions) |
|
359 | 361 | |
|
360 | 362 | use "hg help" for the full list of commands or "hg -v" for details |
|
361 | 363 | [255] |
|
362 | 364 | $ hg --invalid mylog |
|
363 | 365 | hg: option --invalid not recognized |
|
364 | 366 | Mercurial Distributed SCM |
|
365 | 367 | |
|
366 | 368 | basic commands: |
|
367 | 369 | |
|
368 | 370 | add add the specified files on the next commit |
|
369 | 371 | annotate show changeset information by line for each file |
|
370 | 372 | clone make a copy of an existing repository |
|
371 | 373 | commit commit the specified files or all outstanding changes |
|
372 | 374 | diff diff repository (or selected files) |
|
373 | 375 | export dump the header and diffs for one or more changesets |
|
374 | 376 | forget forget the specified files on the next commit |
|
375 | 377 | init create a new repository in the given directory |
|
376 | 378 | log show revision history of entire repository or files |
|
377 | 379 | merge merge working directory with another revision |
|
378 | 380 | phase set or show the current phase name |
|
379 | 381 | pull pull changes from the specified source |
|
380 | 382 | push push changes to the specified destination |
|
381 | 383 | remove remove the specified files on the next commit |
|
382 | 384 | serve start stand-alone webserver |
|
383 | 385 | status show changed files in the working directory |
|
384 | 386 | summary summarize working directory state |
|
385 | 387 | update update working directory (or switch revisions) |
|
386 | 388 | |
|
387 | 389 | use "hg help" for the full list of commands or "hg -v" for details |
|
388 | 390 | [255] |
|
389 | 391 | $ hg --invalid blank |
|
390 | 392 | hg: option --invalid not recognized |
|
391 | 393 | Mercurial Distributed SCM |
|
392 | 394 | |
|
393 | 395 | basic commands: |
|
394 | 396 | |
|
395 | 397 | add add the specified files on the next commit |
|
396 | 398 | annotate show changeset information by line for each file |
|
397 | 399 | clone make a copy of an existing repository |
|
398 | 400 | commit commit the specified files or all outstanding changes |
|
399 | 401 | diff diff repository (or selected files) |
|
400 | 402 | export dump the header and diffs for one or more changesets |
|
401 | 403 | forget forget the specified files on the next commit |
|
402 | 404 | init create a new repository in the given directory |
|
403 | 405 | log show revision history of entire repository or files |
|
404 | 406 | merge merge working directory with another revision |
|
405 | 407 | phase set or show the current phase name |
|
406 | 408 | pull pull changes from the specified source |
|
407 | 409 | push push changes to the specified destination |
|
408 | 410 | remove remove the specified files on the next commit |
|
409 | 411 | serve start stand-alone webserver |
|
410 | 412 | status show changed files in the working directory |
|
411 | 413 | summary summarize working directory state |
|
412 | 414 | update update working directory (or switch revisions) |
|
413 | 415 | |
|
414 | 416 | use "hg help" for the full list of commands or "hg -v" for details |
|
415 | 417 | [255] |
|
416 | 418 | |
|
417 | 419 | This should show id: |
|
418 | 420 | |
|
419 | 421 | $ hg --config alias.log='id' log |
|
420 | 422 | 000000000000 tip |
|
421 | 423 | |
|
422 | 424 | This shouldn't: |
|
423 | 425 | |
|
424 | 426 | $ hg --config alias.log='id' history |
|
425 | 427 | |
|
426 | 428 | $ cd ../.. |
@@ -1,600 +1,603 b'' | |||
|
1 | 1 | Setting up test |
|
2 | 2 | |
|
3 | 3 | $ hg init test |
|
4 | 4 | $ cd test |
|
5 | 5 | $ echo 0 > afile |
|
6 | 6 | $ hg add afile |
|
7 | 7 | $ hg commit -m "0.0" |
|
8 | 8 | $ echo 1 >> afile |
|
9 | 9 | $ hg commit -m "0.1" |
|
10 | 10 | $ echo 2 >> afile |
|
11 | 11 | $ hg commit -m "0.2" |
|
12 | 12 | $ echo 3 >> afile |
|
13 | 13 | $ hg commit -m "0.3" |
|
14 | 14 | $ hg update -C 0 |
|
15 | 15 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 16 | $ echo 1 >> afile |
|
17 | 17 | $ hg commit -m "1.1" |
|
18 | 18 | created new head |
|
19 | 19 | $ echo 2 >> afile |
|
20 | 20 | $ hg commit -m "1.2" |
|
21 | 21 | $ echo "a line" > fred |
|
22 | 22 | $ echo 3 >> afile |
|
23 | 23 | $ hg add fred |
|
24 | 24 | $ hg commit -m "1.3" |
|
25 | 25 | $ hg mv afile adifferentfile |
|
26 | 26 | $ hg commit -m "1.3m" |
|
27 | 27 | $ hg update -C 3 |
|
28 | 28 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
29 | 29 | $ hg mv afile anotherfile |
|
30 | 30 | $ hg commit -m "0.3m" |
|
31 | 31 | $ hg verify |
|
32 | 32 | checking changesets |
|
33 | 33 | checking manifests |
|
34 | 34 | crosschecking files in changesets and manifests |
|
35 | 35 | checking files |
|
36 | 36 | 4 files, 9 changesets, 7 total revisions |
|
37 | 37 | $ cd .. |
|
38 | 38 | $ hg init empty |
|
39 | 39 | |
|
40 | 40 | Bundle and phase |
|
41 | 41 | |
|
42 | 42 | $ hg -R test phase --force --secret 0 |
|
43 | 43 | $ hg -R test bundle phase.hg empty |
|
44 | 44 | searching for changes |
|
45 | 45 | no changes found (ignored 9 secret changesets) |
|
46 | 46 | [1] |
|
47 | 47 | $ hg -R test phase --draft -r 'head()' |
|
48 | 48 | |
|
49 | 49 | Bundle --all |
|
50 | 50 | |
|
51 | 51 | $ hg -R test bundle --all all.hg |
|
52 | 52 | 9 changesets found |
|
53 | 53 | |
|
54 | 54 | Bundle test to full.hg |
|
55 | 55 | |
|
56 | 56 | $ hg -R test bundle full.hg empty |
|
57 | 57 | searching for changes |
|
58 | 58 | 9 changesets found |
|
59 | 59 | |
|
60 | 60 | Unbundle full.hg in test |
|
61 | 61 | |
|
62 | 62 | $ hg -R test unbundle full.hg |
|
63 | 63 | adding changesets |
|
64 | 64 | adding manifests |
|
65 | 65 | adding file changes |
|
66 | 66 | added 0 changesets with 0 changes to 4 files |
|
67 | 67 | (run 'hg update' to get a working copy) |
|
68 | 68 | |
|
69 | 69 | Verify empty |
|
70 | 70 | |
|
71 | 71 | $ hg -R empty heads |
|
72 | 72 | [1] |
|
73 | 73 | $ hg -R empty verify |
|
74 | 74 | checking changesets |
|
75 | 75 | checking manifests |
|
76 | 76 | crosschecking files in changesets and manifests |
|
77 | 77 | checking files |
|
78 | 78 | 0 files, 0 changesets, 0 total revisions |
|
79 | 79 | |
|
80 | 80 | Pull full.hg into test (using --cwd) |
|
81 | 81 | |
|
82 | 82 | $ hg --cwd test pull ../full.hg |
|
83 | 83 | pulling from ../full.hg |
|
84 | 84 | searching for changes |
|
85 | 85 | no changes found |
|
86 | 86 | |
|
87 | 87 | Pull full.hg into empty (using --cwd) |
|
88 | 88 | |
|
89 | 89 | $ hg --cwd empty pull ../full.hg |
|
90 | 90 | pulling from ../full.hg |
|
91 | 91 | requesting all changes |
|
92 | 92 | adding changesets |
|
93 | 93 | adding manifests |
|
94 | 94 | adding file changes |
|
95 | 95 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
96 | 96 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
97 | 97 | |
|
98 | 98 | Rollback empty |
|
99 | 99 | |
|
100 | 100 | $ hg -R empty rollback |
|
101 | 101 | repository tip rolled back to revision -1 (undo pull) |
|
102 | 102 | |
|
103 | 103 | Pull full.hg into empty again (using --cwd) |
|
104 | 104 | |
|
105 | 105 | $ hg --cwd empty pull ../full.hg |
|
106 | 106 | pulling from ../full.hg |
|
107 | 107 | requesting all changes |
|
108 | 108 | adding changesets |
|
109 | 109 | adding manifests |
|
110 | 110 | adding file changes |
|
111 | 111 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
112 | 112 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
113 | 113 | |
|
114 | 114 | Pull full.hg into test (using -R) |
|
115 | 115 | |
|
116 | 116 | $ hg -R test pull full.hg |
|
117 | 117 | pulling from full.hg |
|
118 | 118 | searching for changes |
|
119 | 119 | no changes found |
|
120 | 120 | |
|
121 | 121 | Pull full.hg into empty (using -R) |
|
122 | 122 | |
|
123 | 123 | $ hg -R empty pull full.hg |
|
124 | 124 | pulling from full.hg |
|
125 | 125 | searching for changes |
|
126 | 126 | no changes found |
|
127 | 127 | |
|
128 | 128 | Rollback empty |
|
129 | 129 | |
|
130 | 130 | $ hg -R empty rollback |
|
131 | 131 | repository tip rolled back to revision -1 (undo pull) |
|
132 | 132 | |
|
133 | 133 | Pull full.hg into empty again (using -R) |
|
134 | 134 | |
|
135 | 135 | $ hg -R empty pull full.hg |
|
136 | 136 | pulling from full.hg |
|
137 | 137 | requesting all changes |
|
138 | 138 | adding changesets |
|
139 | 139 | adding manifests |
|
140 | 140 | adding file changes |
|
141 | 141 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
142 | 142 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
143 | 143 | |
|
144 | 144 | Log -R full.hg in fresh empty |
|
145 | 145 | |
|
146 | 146 | $ rm -r empty |
|
147 | 147 | $ hg init empty |
|
148 | 148 | $ cd empty |
|
149 | 149 | $ hg -R bundle://../full.hg log |
|
150 | 150 | changeset: 8:aa35859c02ea |
|
151 | 151 | tag: tip |
|
152 | 152 | parent: 3:eebf5a27f8ca |
|
153 | 153 | user: test |
|
154 | 154 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | 155 | summary: 0.3m |
|
156 | 156 | |
|
157 | 157 | changeset: 7:a6a34bfa0076 |
|
158 | 158 | user: test |
|
159 | 159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
160 | 160 | summary: 1.3m |
|
161 | 161 | |
|
162 | 162 | changeset: 6:7373c1169842 |
|
163 | 163 | user: test |
|
164 | 164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
165 | 165 | summary: 1.3 |
|
166 | 166 | |
|
167 | 167 | changeset: 5:1bb50a9436a7 |
|
168 | 168 | user: test |
|
169 | 169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
170 | 170 | summary: 1.2 |
|
171 | 171 | |
|
172 | 172 | changeset: 4:095197eb4973 |
|
173 | 173 | parent: 0:f9ee2f85a263 |
|
174 | 174 | user: test |
|
175 | 175 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
176 | 176 | summary: 1.1 |
|
177 | 177 | |
|
178 | 178 | changeset: 3:eebf5a27f8ca |
|
179 | 179 | user: test |
|
180 | 180 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
181 | 181 | summary: 0.3 |
|
182 | 182 | |
|
183 | 183 | changeset: 2:e38ba6f5b7e0 |
|
184 | 184 | user: test |
|
185 | 185 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
186 | 186 | summary: 0.2 |
|
187 | 187 | |
|
188 | 188 | changeset: 1:34c2bf6b0626 |
|
189 | 189 | user: test |
|
190 | 190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
191 | 191 | summary: 0.1 |
|
192 | 192 | |
|
193 | 193 | changeset: 0:f9ee2f85a263 |
|
194 | 194 | user: test |
|
195 | 195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
196 | 196 | summary: 0.0 |
|
197 | 197 | |
|
198 | 198 | Make sure bundlerepo doesn't leak tempfiles (issue2491) |
|
199 | 199 | |
|
200 | 200 | $ ls .hg |
|
201 | 201 | 00changelog.i |
|
202 | 202 | cache |
|
203 | 203 | requires |
|
204 | 204 | store |
|
205 | 205 | |
|
206 | 206 | Pull ../full.hg into empty (with hook) |
|
207 | 207 | |
|
208 | 208 | $ echo "[hooks]" >> .hg/hgrc |
|
209 | 209 | $ echo "changegroup = python \"$TESTDIR\"/printenv.py changegroup" >> .hg/hgrc |
|
210 | 210 | |
|
211 | 211 | doesn't work (yet ?) |
|
212 | 212 | |
|
213 | 213 | hg -R bundle://../full.hg verify |
|
214 | 214 | |
|
215 | 215 | $ hg pull bundle://../full.hg |
|
216 | 216 | pulling from bundle:../full.hg |
|
217 | 217 | requesting all changes |
|
218 | 218 | adding changesets |
|
219 | 219 | adding manifests |
|
220 | 220 | adding file changes |
|
221 | 221 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
222 | 222 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:../full.hg |
|
223 | 223 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
224 | 224 | |
|
225 | 225 | Rollback empty |
|
226 | 226 | |
|
227 | 227 | $ hg rollback |
|
228 | 228 | repository tip rolled back to revision -1 (undo pull) |
|
229 | 229 | $ cd .. |
|
230 | 230 | |
|
231 | 231 | Log -R bundle:empty+full.hg |
|
232 | 232 | |
|
233 | 233 | $ hg -R bundle:empty+full.hg log --template="{rev} "; echo "" |
|
234 | 234 | 8 7 6 5 4 3 2 1 0 |
|
235 | 235 | |
|
236 | 236 | Pull full.hg into empty again (using -R; with hook) |
|
237 | 237 | |
|
238 | 238 | $ hg -R empty pull full.hg |
|
239 | 239 | pulling from full.hg |
|
240 | 240 | requesting all changes |
|
241 | 241 | adding changesets |
|
242 | 242 | adding manifests |
|
243 | 243 | adding file changes |
|
244 | 244 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
245 | 245 | changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:empty+full.hg |
|
246 | 246 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
247 | 247 | |
|
248 | 248 | Create partial clones |
|
249 | 249 | |
|
250 | 250 | $ rm -r empty |
|
251 | 251 | $ hg init empty |
|
252 | 252 | $ hg clone -r 3 test partial |
|
253 | 253 | adding changesets |
|
254 | 254 | adding manifests |
|
255 | 255 | adding file changes |
|
256 | 256 | added 4 changesets with 4 changes to 1 files |
|
257 | 257 | updating to branch default |
|
258 | 258 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
259 | 259 | $ hg clone partial partial2 |
|
260 | 260 | updating to branch default |
|
261 | 261 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 262 | $ cd partial |
|
263 | 263 | |
|
264 | 264 | Log -R full.hg in partial |
|
265 | 265 | |
|
266 | 266 | $ hg -R bundle://../full.hg log |
|
267 | 267 | changeset: 8:aa35859c02ea |
|
268 | 268 | tag: tip |
|
269 | 269 | parent: 3:eebf5a27f8ca |
|
270 | 270 | user: test |
|
271 | 271 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
272 | 272 | summary: 0.3m |
|
273 | 273 | |
|
274 | 274 | changeset: 7:a6a34bfa0076 |
|
275 | 275 | user: test |
|
276 | 276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | 277 | summary: 1.3m |
|
278 | 278 | |
|
279 | 279 | changeset: 6:7373c1169842 |
|
280 | 280 | user: test |
|
281 | 281 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
282 | 282 | summary: 1.3 |
|
283 | 283 | |
|
284 | 284 | changeset: 5:1bb50a9436a7 |
|
285 | 285 | user: test |
|
286 | 286 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
287 | 287 | summary: 1.2 |
|
288 | 288 | |
|
289 | 289 | changeset: 4:095197eb4973 |
|
290 | 290 | parent: 0:f9ee2f85a263 |
|
291 | 291 | user: test |
|
292 | 292 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
293 | 293 | summary: 1.1 |
|
294 | 294 | |
|
295 | 295 | changeset: 3:eebf5a27f8ca |
|
296 | 296 | user: test |
|
297 | 297 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
298 | 298 | summary: 0.3 |
|
299 | 299 | |
|
300 | 300 | changeset: 2:e38ba6f5b7e0 |
|
301 | 301 | user: test |
|
302 | 302 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
303 | 303 | summary: 0.2 |
|
304 | 304 | |
|
305 | 305 | changeset: 1:34c2bf6b0626 |
|
306 | 306 | user: test |
|
307 | 307 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 | 308 | summary: 0.1 |
|
309 | 309 | |
|
310 | 310 | changeset: 0:f9ee2f85a263 |
|
311 | 311 | user: test |
|
312 | 312 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
313 | 313 | summary: 0.0 |
|
314 | 314 | |
|
315 | 315 | |
|
316 | 316 | Incoming full.hg in partial |
|
317 | 317 | |
|
318 | 318 | $ hg incoming bundle://../full.hg |
|
319 | 319 | comparing with bundle:../full.hg |
|
320 | 320 | searching for changes |
|
321 | 321 | changeset: 4:095197eb4973 |
|
322 | 322 | parent: 0:f9ee2f85a263 |
|
323 | 323 | user: test |
|
324 | 324 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
325 | 325 | summary: 1.1 |
|
326 | 326 | |
|
327 | 327 | changeset: 5:1bb50a9436a7 |
|
328 | 328 | user: test |
|
329 | 329 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
330 | 330 | summary: 1.2 |
|
331 | 331 | |
|
332 | 332 | changeset: 6:7373c1169842 |
|
333 | 333 | user: test |
|
334 | 334 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
335 | 335 | summary: 1.3 |
|
336 | 336 | |
|
337 | 337 | changeset: 7:a6a34bfa0076 |
|
338 | 338 | user: test |
|
339 | 339 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
340 | 340 | summary: 1.3m |
|
341 | 341 | |
|
342 | 342 | changeset: 8:aa35859c02ea |
|
343 | 343 | tag: tip |
|
344 | 344 | parent: 3:eebf5a27f8ca |
|
345 | 345 | user: test |
|
346 | 346 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
347 | 347 | summary: 0.3m |
|
348 | 348 | |
|
349 | 349 | |
|
350 | 350 | Outgoing -R full.hg vs partial2 in partial |
|
351 | 351 | |
|
352 | 352 | $ hg -R bundle://../full.hg outgoing ../partial2 |
|
353 | 353 | comparing with ../partial2 |
|
354 | 354 | searching for changes |
|
355 | 355 | changeset: 4:095197eb4973 |
|
356 | 356 | parent: 0:f9ee2f85a263 |
|
357 | 357 | user: test |
|
358 | 358 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
359 | 359 | summary: 1.1 |
|
360 | 360 | |
|
361 | 361 | changeset: 5:1bb50a9436a7 |
|
362 | 362 | user: test |
|
363 | 363 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
364 | 364 | summary: 1.2 |
|
365 | 365 | |
|
366 | 366 | changeset: 6:7373c1169842 |
|
367 | 367 | user: test |
|
368 | 368 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
369 | 369 | summary: 1.3 |
|
370 | 370 | |
|
371 | 371 | changeset: 7:a6a34bfa0076 |
|
372 | 372 | user: test |
|
373 | 373 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
374 | 374 | summary: 1.3m |
|
375 | 375 | |
|
376 | 376 | changeset: 8:aa35859c02ea |
|
377 | 377 | tag: tip |
|
378 | 378 | parent: 3:eebf5a27f8ca |
|
379 | 379 | user: test |
|
380 | 380 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
381 | 381 | summary: 0.3m |
|
382 | 382 | |
|
383 | 383 | |
|
384 | 384 | Outgoing -R does-not-exist.hg vs partial2 in partial |
|
385 | 385 | |
|
386 | 386 | $ hg -R bundle://../does-not-exist.hg outgoing ../partial2 |
|
387 | 387 | abort: *../does-not-exist.hg* (glob) |
|
388 | 388 | [255] |
|
389 | 389 | $ cd .. |
|
390 | 390 | |
|
391 | hide outer repo | |
|
392 | $ hg init | |
|
393 | ||
|
391 | 394 | Direct clone from bundle (all-history) |
|
392 | 395 | |
|
393 | 396 |
$ |
|
394 | 397 | requesting all changes |
|
395 | 398 | adding changesets |
|
396 | 399 | adding manifests |
|
397 | 400 | adding file changes |
|
398 | 401 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
399 | 402 | updating to branch default |
|
400 | 403 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
401 | 404 | $ hg -R full-clone heads |
|
402 | 405 | changeset: 8:aa35859c02ea |
|
403 | 406 | tag: tip |
|
404 | 407 | parent: 3:eebf5a27f8ca |
|
405 | 408 | user: test |
|
406 | 409 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
407 | 410 | summary: 0.3m |
|
408 | 411 | |
|
409 | 412 | changeset: 7:a6a34bfa0076 |
|
410 | 413 | user: test |
|
411 | 414 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | 415 | summary: 1.3m |
|
413 | 416 | |
|
414 | 417 | $ rm -r full-clone |
|
415 | 418 | |
|
416 | 419 | When cloning from a non-copiable repository into '', do not |
|
417 | 420 | recurse infinitely (issue 2528) |
|
418 | 421 | |
|
419 | 422 | $ hg clone full.hg '' |
|
420 | 423 | abort: * (glob) |
|
421 | 424 | [255] |
|
422 | 425 | |
|
423 | 426 | test for http://mercurial.selenic.com/bts/issue216 |
|
424 | 427 | |
|
425 | 428 | Unbundle incremental bundles into fresh empty in one go |
|
426 | 429 | |
|
427 | 430 | $ rm -r empty |
|
428 | 431 | $ hg init empty |
|
429 | 432 | $ hg -R test bundle --base null -r 0 ../0.hg |
|
430 | 433 | 1 changesets found |
|
431 | 434 | $ hg -R test bundle --base 0 -r 1 ../1.hg |
|
432 | 435 | 1 changesets found |
|
433 | 436 | $ hg -R empty unbundle -u ../0.hg ../1.hg |
|
434 | 437 | adding changesets |
|
435 | 438 | adding manifests |
|
436 | 439 | adding file changes |
|
437 | 440 | added 1 changesets with 1 changes to 1 files |
|
438 | 441 | adding changesets |
|
439 | 442 | adding manifests |
|
440 | 443 | adding file changes |
|
441 | 444 | added 1 changesets with 1 changes to 1 files |
|
442 | 445 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
443 | 446 | |
|
444 | 447 | test for 540d1059c802 |
|
445 | 448 | |
|
446 | 449 | test for 540d1059c802 |
|
447 | 450 | |
|
448 | 451 | $ hg init orig |
|
449 | 452 | $ cd orig |
|
450 | 453 | $ echo foo > foo |
|
451 | 454 | $ hg add foo |
|
452 | 455 | $ hg ci -m 'add foo' |
|
453 | 456 | |
|
454 | 457 | $ hg clone . ../copy |
|
455 | 458 | updating to branch default |
|
456 | 459 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
457 | 460 | $ hg tag foo |
|
458 | 461 | |
|
459 | 462 | $ cd ../copy |
|
460 | 463 | $ echo >> foo |
|
461 | 464 | $ hg ci -m 'change foo' |
|
462 | 465 | $ hg bundle ../bundle.hg ../orig |
|
463 | 466 | searching for changes |
|
464 | 467 | 1 changesets found |
|
465 | 468 | |
|
466 | 469 | $ cd ../orig |
|
467 | 470 | $ hg incoming ../bundle.hg |
|
468 | 471 | comparing with ../bundle.hg |
|
469 | 472 | searching for changes |
|
470 | 473 | changeset: 2:ed1b79f46b9a |
|
471 | 474 | tag: tip |
|
472 | 475 | parent: 0:bbd179dfa0a7 |
|
473 | 476 | user: test |
|
474 | 477 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
475 | 478 | summary: change foo |
|
476 | 479 | |
|
477 | 480 | $ cd .. |
|
478 | 481 | |
|
479 | 482 | test bundle with # in the filename (issue2154): |
|
480 | 483 | |
|
481 | 484 | $ cp bundle.hg 'test#bundle.hg' |
|
482 | 485 | $ cd orig |
|
483 | 486 | $ hg incoming '../test#bundle.hg' |
|
484 | 487 | comparing with ../test |
|
485 | 488 | abort: unknown revision 'bundle.hg'! |
|
486 | 489 | [255] |
|
487 | 490 | |
|
488 | 491 | note that percent encoding is not handled: |
|
489 | 492 | |
|
490 | 493 | $ hg incoming ../test%23bundle.hg |
|
491 | 494 | abort: repository ../test%23bundle.hg not found! |
|
492 | 495 | [255] |
|
493 | 496 | $ cd .. |
|
494 | 497 | |
|
495 | 498 | test for http://mercurial.selenic.com/bts/issue1144 |
|
496 | 499 | |
|
497 | 500 | test that verify bundle does not traceback |
|
498 | 501 | |
|
499 | 502 | partial history bundle, fails w/ unkown parent |
|
500 | 503 | |
|
501 | 504 | $ hg -R bundle.hg verify |
|
502 | 505 | abort: 00changelog.i@bbd179dfa0a7: unknown parent! |
|
503 | 506 | [255] |
|
504 | 507 | |
|
505 | 508 | full history bundle, refuses to verify non-local repo |
|
506 | 509 | |
|
507 | 510 | $ hg -R all.hg verify |
|
508 | 511 | abort: cannot verify bundle or remote repos |
|
509 | 512 | [255] |
|
510 | 513 | |
|
511 | 514 | but, regular verify must continue to work |
|
512 | 515 | |
|
513 | 516 | $ hg -R orig verify |
|
514 | 517 | checking changesets |
|
515 | 518 | checking manifests |
|
516 | 519 | crosschecking files in changesets and manifests |
|
517 | 520 | checking files |
|
518 | 521 | 2 files, 2 changesets, 2 total revisions |
|
519 | 522 | |
|
520 | 523 | diff against bundle |
|
521 | 524 | |
|
522 | 525 | $ hg init b |
|
523 | 526 | $ cd b |
|
524 | 527 | $ hg -R ../all.hg diff -r tip |
|
525 | 528 | diff -r aa35859c02ea anotherfile |
|
526 | 529 | --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000 |
|
527 | 530 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
528 | 531 | @@ -1,4 +0,0 @@ |
|
529 | 532 | -0 |
|
530 | 533 | -1 |
|
531 | 534 | -2 |
|
532 | 535 | -3 |
|
533 | 536 | $ cd .. |
|
534 | 537 | |
|
535 | 538 | bundle single branch |
|
536 | 539 | |
|
537 | 540 | $ hg init branchy |
|
538 | 541 | $ cd branchy |
|
539 | 542 | $ echo a >a |
|
540 | 543 | $ echo x >x |
|
541 | 544 | $ hg ci -Ama |
|
542 | 545 | adding a |
|
543 | 546 | adding x |
|
544 | 547 | $ echo c >c |
|
545 | 548 | $ echo xx >x |
|
546 | 549 | $ hg ci -Amc |
|
547 | 550 | adding c |
|
548 | 551 | $ echo c1 >c1 |
|
549 | 552 | $ hg ci -Amc1 |
|
550 | 553 | adding c1 |
|
551 | 554 | $ hg up 0 |
|
552 | 555 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
553 | 556 | $ echo b >b |
|
554 | 557 | $ hg ci -Amb |
|
555 | 558 | adding b |
|
556 | 559 | created new head |
|
557 | 560 | $ echo b1 >b1 |
|
558 | 561 | $ echo xx >x |
|
559 | 562 | $ hg ci -Amb1 |
|
560 | 563 | adding b1 |
|
561 | 564 | $ hg clone -q -r2 . part |
|
562 | 565 | |
|
563 | 566 | == bundling via incoming |
|
564 | 567 | |
|
565 | 568 | $ hg in -R part --bundle incoming.hg --template "{node}\n" . |
|
566 | 569 | comparing with . |
|
567 | 570 | searching for changes |
|
568 | 571 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
569 | 572 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
570 | 573 | |
|
571 | 574 | == bundling |
|
572 | 575 | |
|
573 | 576 | $ hg bundle bundle.hg part --debug |
|
574 | 577 | query 1; heads |
|
575 | 578 | searching for changes |
|
576 | 579 | all remote heads known locally |
|
577 | 580 | 2 changesets found |
|
578 | 581 | list of changesets: |
|
579 | 582 | 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a |
|
580 | 583 | 057f4db07f61970e1c11e83be79e9d08adc4dc31 |
|
581 | 584 | bundling: 1/2 changesets (50.00%) |
|
582 | 585 | bundling: 2/2 changesets (100.00%) |
|
583 | 586 | bundling: 1/2 manifests (50.00%) |
|
584 | 587 | bundling: 2/2 manifests (100.00%) |
|
585 | 588 | bundling: b 1/3 files (33.33%) |
|
586 | 589 | bundling: b1 2/3 files (66.67%) |
|
587 | 590 | bundling: x 3/3 files (100.00%) |
|
588 | 591 | |
|
589 | 592 | == Test for issue3441 |
|
590 | 593 | |
|
591 | 594 | $ hg clone -q -r0 . part2 |
|
592 | 595 | $ hg -q -R part2 pull bundle.hg |
|
593 | 596 | $ hg -R part2 verify |
|
594 | 597 | checking changesets |
|
595 | 598 | checking manifests |
|
596 | 599 | crosschecking files in changesets and manifests |
|
597 | 600 | checking files |
|
598 | 601 | 4 files, 3 changesets, 5 total revisions |
|
599 | 602 | |
|
600 | 603 | $ cd .. |
@@ -1,8 +1,11 b'' | |||
|
1 | hide outer repo | |
|
2 | $ hg init | |
|
3 | ||
|
1 | 4 |
$ |
|
2 | 5 |
$ |
|
3 | 6 |
$ |
|
4 | 7 | |
|
5 | 8 |
$ |
|
6 | 9 | Section.KeY=Case Sensitive |
|
7 | 10 | Section.key=lower case |
|
8 | 11 |
@@ -1,461 +1,461 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ "$TESTDIR/hghave" cvs || exit 80 |
|
3 | 3 | $ cvscall() |
|
4 | 4 | > { |
|
5 | 5 | > cvs -f "$@" |
|
6 | 6 | > } |
|
7 | 7 | $ hgcat() |
|
8 | 8 | > { |
|
9 | 9 | > hg --cwd src-hg cat -r tip "$1" |
|
10 | 10 | > } |
|
11 | 11 | $ echo "[extensions]" >> $HGRCPATH |
|
12 | 12 | $ echo "convert = " >> $HGRCPATH |
|
13 | 13 | $ echo "graphlog = " >> $HGRCPATH |
|
14 | 14 | $ cat > cvshooks.py <<EOF |
|
15 | 15 | > def cvslog(ui,repo,hooktype,log): |
|
16 | 16 | > print "%s hook: %d entries"%(hooktype,len(log)) |
|
17 | 17 | > |
|
18 | 18 | > def cvschangesets(ui,repo,hooktype,changesets): |
|
19 | 19 | > print "%s hook: %d changesets"%(hooktype,len(changesets)) |
|
20 | 20 | > EOF |
|
21 | 21 | $ hookpath=`pwd` |
|
22 | 22 | $ echo "[hooks]" >> $HGRCPATH |
|
23 | 23 | $ echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH |
|
24 | 24 | $ echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH |
|
25 | 25 | |
|
26 | 26 | create cvs repository |
|
27 | 27 | |
|
28 | 28 | $ mkdir cvsrepo |
|
29 | 29 | $ cd cvsrepo |
|
30 | 30 | $ CVSROOT=`pwd` |
|
31 | 31 | $ export CVSROOT |
|
32 | 32 | $ CVS_OPTIONS=-f |
|
33 | 33 | $ export CVS_OPTIONS |
|
34 | 34 | $ cd .. |
|
35 | 35 | $ cvscall -q -d "$CVSROOT" init |
|
36 | 36 | |
|
37 | 37 | create source directory |
|
38 | 38 | |
|
39 | 39 | $ mkdir src-temp |
|
40 | 40 | $ cd src-temp |
|
41 | 41 | $ echo a > a |
|
42 | 42 | $ mkdir b |
|
43 | 43 | $ cd b |
|
44 | 44 | $ echo c > c |
|
45 | 45 | $ cd .. |
|
46 | 46 | |
|
47 | 47 | import source directory |
|
48 | 48 | |
|
49 | 49 | $ cvscall -q import -m import src INITIAL start |
|
50 | 50 | N src/a |
|
51 | 51 | N src/b/c |
|
52 | 52 | |
|
53 | 53 | No conflicts created by this import |
|
54 | 54 | |
|
55 | 55 | $ cd .. |
|
56 | 56 | |
|
57 | 57 | checkout source directory |
|
58 | 58 | |
|
59 | 59 | $ cvscall -q checkout src |
|
60 | 60 | U src/a |
|
61 | 61 | U src/b/c |
|
62 | 62 | |
|
63 | 63 | commit a new revision changing b/c |
|
64 | 64 | |
|
65 | 65 | $ cd src |
|
66 | 66 | $ sleep 1 |
|
67 | 67 | $ echo c >> b/c |
|
68 | 68 | $ cvscall -q commit -mci0 . | grep '<--' |
|
69 | 69 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
70 | 70 | $ cd .. |
|
71 | 71 | |
|
72 | 72 | convert fresh repo |
|
73 | 73 | |
|
74 | 74 | $ hg convert src src-hg |
|
75 | 75 | initializing destination src-hg repository |
|
76 | 76 | connecting to $TESTTMP/cvsrepo |
|
77 | 77 | scanning source... |
|
78 | 78 | collecting CVS rlog |
|
79 | 79 | 5 log entries |
|
80 | 80 | cvslog hook: 5 entries |
|
81 | 81 | creating changesets |
|
82 | 82 | 3 changeset entries |
|
83 | 83 | cvschangesets hook: 3 changesets |
|
84 | 84 | sorting... |
|
85 | 85 | converting... |
|
86 | 86 | 2 Initial revision |
|
87 | 87 | 1 import |
|
88 | 88 | 0 ci0 |
|
89 | 89 | updating tags |
|
90 | 90 | $ hgcat a |
|
91 | 91 | a |
|
92 | 92 | $ hgcat b/c |
|
93 | 93 | c |
|
94 | 94 | c |
|
95 | 95 | |
|
96 | 96 | convert fresh repo with --filemap |
|
97 | 97 | |
|
98 | 98 | $ echo include b/c > filemap |
|
99 | 99 | $ hg convert --filemap filemap src src-filemap |
|
100 | 100 | initializing destination src-filemap repository |
|
101 | 101 | connecting to $TESTTMP/cvsrepo |
|
102 | 102 | scanning source... |
|
103 | 103 | collecting CVS rlog |
|
104 | 104 | 5 log entries |
|
105 | 105 | cvslog hook: 5 entries |
|
106 | 106 | creating changesets |
|
107 | 107 | 3 changeset entries |
|
108 | 108 | cvschangesets hook: 3 changesets |
|
109 | 109 | sorting... |
|
110 | 110 | converting... |
|
111 | 111 | 2 Initial revision |
|
112 | 112 | 1 import |
|
113 | 113 | filtering out empty revision |
|
114 | 114 | repository tip rolled back to revision 0 (undo commit) |
|
115 | 115 | 0 ci0 |
|
116 | 116 | updating tags |
|
117 | 117 | $ hgcat b/c |
|
118 | 118 | c |
|
119 | 119 | c |
|
120 | 120 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
121 | 121 | 2 update tags files: .hgtags |
|
122 | 122 | 1 ci0 files: b/c |
|
123 | 123 | 0 Initial revision files: b/c |
|
124 | 124 | |
|
125 | 125 | convert full repository (issue1649) |
|
126 | 126 | |
|
127 | 127 | $ cvscall -q -d "$CVSROOT" checkout -d srcfull "." | grep -v CVSROOT |
|
128 | 128 | U srcfull/src/a |
|
129 | 129 | U srcfull/src/b/c |
|
130 | 130 | $ ls srcfull |
|
131 | 131 | CVS |
|
132 | 132 | CVSROOT |
|
133 | 133 | src |
|
134 | 134 | $ hg convert srcfull srcfull-hg \ |
|
135 | 135 | > | grep -v 'log entries' | grep -v 'hook:' \ |
|
136 | 136 | > | grep -v '^[0-3] .*' # filter instable changeset order |
|
137 | 137 | initializing destination srcfull-hg repository |
|
138 | 138 | connecting to $TESTTMP/cvsrepo |
|
139 | 139 | scanning source... |
|
140 | 140 | collecting CVS rlog |
|
141 | 141 | creating changesets |
|
142 | 142 | 4 changeset entries |
|
143 | 143 | sorting... |
|
144 | 144 | converting... |
|
145 | 145 | updating tags |
|
146 |
$ hg cat -r tip srcfull-hg |
|
|
146 | $ hg cat -r tip --cwd srcfull-hg src/a | |
|
147 | 147 | a |
|
148 |
$ hg cat -r tip srcfull-hg |
|
|
148 | $ hg cat -r tip --cwd srcfull-hg src/b/c | |
|
149 | 149 | c |
|
150 | 150 | c |
|
151 | 151 | |
|
152 | 152 | commit new file revisions |
|
153 | 153 | |
|
154 | 154 | $ cd src |
|
155 | 155 | $ echo a >> a |
|
156 | 156 | $ echo c >> b/c |
|
157 | 157 | $ cvscall -q commit -mci1 . | grep '<--' |
|
158 | 158 | $TESTTMP/cvsrepo/src/a,v <-- a |
|
159 | 159 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
160 | 160 | $ cd .. |
|
161 | 161 | |
|
162 | 162 | convert again |
|
163 | 163 | |
|
164 | 164 | $ hg convert src src-hg |
|
165 | 165 | connecting to $TESTTMP/cvsrepo |
|
166 | 166 | scanning source... |
|
167 | 167 | collecting CVS rlog |
|
168 | 168 | 7 log entries |
|
169 | 169 | cvslog hook: 7 entries |
|
170 | 170 | creating changesets |
|
171 | 171 | 4 changeset entries |
|
172 | 172 | cvschangesets hook: 4 changesets |
|
173 | 173 | sorting... |
|
174 | 174 | converting... |
|
175 | 175 | 0 ci1 |
|
176 | 176 | $ hgcat a |
|
177 | 177 | a |
|
178 | 178 | a |
|
179 | 179 | $ hgcat b/c |
|
180 | 180 | c |
|
181 | 181 | c |
|
182 | 182 | c |
|
183 | 183 | |
|
184 | 184 | convert again with --filemap |
|
185 | 185 | |
|
186 | 186 | $ hg convert --filemap filemap src src-filemap |
|
187 | 187 | connecting to $TESTTMP/cvsrepo |
|
188 | 188 | scanning source... |
|
189 | 189 | collecting CVS rlog |
|
190 | 190 | 7 log entries |
|
191 | 191 | cvslog hook: 7 entries |
|
192 | 192 | creating changesets |
|
193 | 193 | 4 changeset entries |
|
194 | 194 | cvschangesets hook: 4 changesets |
|
195 | 195 | sorting... |
|
196 | 196 | converting... |
|
197 | 197 | 0 ci1 |
|
198 | 198 | $ hgcat b/c |
|
199 | 199 | c |
|
200 | 200 | c |
|
201 | 201 | c |
|
202 | 202 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
203 | 203 | 3 ci1 files: b/c |
|
204 | 204 | 2 update tags files: .hgtags |
|
205 | 205 | 1 ci0 files: b/c |
|
206 | 206 | 0 Initial revision files: b/c |
|
207 | 207 | |
|
208 | 208 | commit branch |
|
209 | 209 | |
|
210 | 210 | $ cd src |
|
211 | 211 | $ cvs -q update -r1.1 b/c |
|
212 | 212 | U b/c |
|
213 | 213 | $ cvs -q tag -b branch |
|
214 | 214 | T a |
|
215 | 215 | T b/c |
|
216 | 216 | $ cvs -q update -r branch > /dev/null |
|
217 | 217 | $ echo d >> b/c |
|
218 | 218 | $ cvs -q commit -mci2 . | grep '<--' |
|
219 | 219 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
220 | 220 | $ cd .. |
|
221 | 221 | |
|
222 | 222 | convert again |
|
223 | 223 | |
|
224 | 224 | $ hg convert src src-hg |
|
225 | 225 | connecting to $TESTTMP/cvsrepo |
|
226 | 226 | scanning source... |
|
227 | 227 | collecting CVS rlog |
|
228 | 228 | 8 log entries |
|
229 | 229 | cvslog hook: 8 entries |
|
230 | 230 | creating changesets |
|
231 | 231 | 5 changeset entries |
|
232 | 232 | cvschangesets hook: 5 changesets |
|
233 | 233 | sorting... |
|
234 | 234 | converting... |
|
235 | 235 | 0 ci2 |
|
236 | 236 | $ hgcat b/c |
|
237 | 237 | c |
|
238 | 238 | d |
|
239 | 239 | |
|
240 | 240 | convert again with --filemap |
|
241 | 241 | |
|
242 | 242 | $ hg convert --filemap filemap src src-filemap |
|
243 | 243 | connecting to $TESTTMP/cvsrepo |
|
244 | 244 | scanning source... |
|
245 | 245 | collecting CVS rlog |
|
246 | 246 | 8 log entries |
|
247 | 247 | cvslog hook: 8 entries |
|
248 | 248 | creating changesets |
|
249 | 249 | 5 changeset entries |
|
250 | 250 | cvschangesets hook: 5 changesets |
|
251 | 251 | sorting... |
|
252 | 252 | converting... |
|
253 | 253 | 0 ci2 |
|
254 | 254 | $ hgcat b/c |
|
255 | 255 | c |
|
256 | 256 | d |
|
257 | 257 | $ hg -R src-filemap log --template '{rev} {desc} files: {files}\n' |
|
258 | 258 | 4 ci2 files: b/c |
|
259 | 259 | 3 ci1 files: b/c |
|
260 | 260 | 2 update tags files: .hgtags |
|
261 | 261 | 1 ci0 files: b/c |
|
262 | 262 | 0 Initial revision files: b/c |
|
263 | 263 | |
|
264 | 264 | commit a new revision with funny log message |
|
265 | 265 | |
|
266 | 266 | $ cd src |
|
267 | 267 | $ sleep 1 |
|
268 | 268 | $ echo e >> a |
|
269 | 269 | $ cvscall -q commit -m'funny |
|
270 | 270 | > ---------------------------- |
|
271 | 271 | > log message' . | grep '<--' |\ |
|
272 | 272 | > sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
273 | 273 | checking in src/a,v |
|
274 | 274 | |
|
275 | 275 | commit new file revisions with some fuzz |
|
276 | 276 | |
|
277 | 277 | $ sleep 1 |
|
278 | 278 | $ echo f >> a |
|
279 | 279 | $ cvscall -q commit -mfuzzy . | grep '<--' |
|
280 | 280 | $TESTTMP/cvsrepo/src/a,v <-- a |
|
281 | 281 | $ sleep 4 # the two changes will be split if fuzz < 4 |
|
282 | 282 | $ echo g >> b/c |
|
283 | 283 | $ cvscall -q commit -mfuzzy . | grep '<--' |
|
284 | 284 | $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob) |
|
285 | 285 | $ cd .. |
|
286 | 286 | |
|
287 | 287 | convert again |
|
288 | 288 | |
|
289 | 289 | $ hg convert --config convert.cvsps.fuzz=2 src src-hg |
|
290 | 290 | connecting to $TESTTMP/cvsrepo |
|
291 | 291 | scanning source... |
|
292 | 292 | collecting CVS rlog |
|
293 | 293 | 11 log entries |
|
294 | 294 | cvslog hook: 11 entries |
|
295 | 295 | creating changesets |
|
296 | 296 | 8 changeset entries |
|
297 | 297 | cvschangesets hook: 8 changesets |
|
298 | 298 | sorting... |
|
299 | 299 | converting... |
|
300 | 300 | 2 funny |
|
301 | 301 | 1 fuzzy |
|
302 | 302 | 0 fuzzy |
|
303 | 303 | $ hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n' |
|
304 | 304 | o 8 (branch) fuzzy files: b/c |
|
305 | 305 | | |
|
306 | 306 | o 7 (branch) fuzzy files: a |
|
307 | 307 | | |
|
308 | 308 | o 6 (branch) funny |
|
309 | 309 | | ---------------------------- |
|
310 | 310 | | log message files: a |
|
311 | 311 | o 5 (branch) ci2 files: b/c |
|
312 | 312 | |
|
313 | 313 | o 4 () ci1 files: a b/c |
|
314 | 314 | | |
|
315 | 315 | o 3 () update tags files: .hgtags |
|
316 | 316 | | |
|
317 | 317 | o 2 () ci0 files: b/c |
|
318 | 318 | | |
|
319 | 319 | | o 1 (INITIAL) import files: |
|
320 | 320 | |/ |
|
321 | 321 | o 0 () Initial revision files: a b/c |
|
322 | 322 | |
|
323 | 323 | |
|
324 | 324 | testing debugcvsps |
|
325 | 325 | |
|
326 | 326 | $ cd src |
|
327 | 327 | $ hg debugcvsps --fuzz=2 |
|
328 | 328 | collecting CVS rlog |
|
329 | 329 | 11 log entries |
|
330 | 330 | cvslog hook: 11 entries |
|
331 | 331 | creating changesets |
|
332 | 332 | 10 changeset entries |
|
333 | 333 | cvschangesets hook: 10 changesets |
|
334 | 334 | --------------------- |
|
335 | 335 | PatchSet 1 |
|
336 | 336 | Date: * (glob) |
|
337 | 337 | Author: * (glob) |
|
338 | 338 | Branch: HEAD |
|
339 | 339 | Tag: (none) |
|
340 | 340 | Branchpoints: INITIAL |
|
341 | 341 | Log: |
|
342 | 342 | Initial revision |
|
343 | 343 | |
|
344 | 344 | Members: |
|
345 | 345 | a:INITIAL->1.1 |
|
346 | 346 | |
|
347 | 347 | --------------------- |
|
348 | 348 | PatchSet 2 |
|
349 | 349 | Date: * (glob) |
|
350 | 350 | Author: * (glob) |
|
351 | 351 | Branch: HEAD |
|
352 | 352 | Tag: (none) |
|
353 | 353 | Branchpoints: INITIAL, branch |
|
354 | 354 | Log: |
|
355 | 355 | Initial revision |
|
356 | 356 | |
|
357 | 357 | Members: |
|
358 | 358 | b/c:INITIAL->1.1 |
|
359 | 359 | |
|
360 | 360 | --------------------- |
|
361 | 361 | PatchSet 3 |
|
362 | 362 | Date: * (glob) |
|
363 | 363 | Author: * (glob) |
|
364 | 364 | Branch: INITIAL |
|
365 | 365 | Tag: start |
|
366 | 366 | Log: |
|
367 | 367 | import |
|
368 | 368 | |
|
369 | 369 | Members: |
|
370 | 370 | a:1.1->1.1.1.1 |
|
371 | 371 | b/c:1.1->1.1.1.1 |
|
372 | 372 | |
|
373 | 373 | --------------------- |
|
374 | 374 | PatchSet 4 |
|
375 | 375 | Date: * (glob) |
|
376 | 376 | Author: * (glob) |
|
377 | 377 | Branch: HEAD |
|
378 | 378 | Tag: (none) |
|
379 | 379 | Log: |
|
380 | 380 | ci0 |
|
381 | 381 | |
|
382 | 382 | Members: |
|
383 | 383 | b/c:1.1->1.2 |
|
384 | 384 | |
|
385 | 385 | --------------------- |
|
386 | 386 | PatchSet 5 |
|
387 | 387 | Date: * (glob) |
|
388 | 388 | Author: * (glob) |
|
389 | 389 | Branch: HEAD |
|
390 | 390 | Tag: (none) |
|
391 | 391 | Branchpoints: branch |
|
392 | 392 | Log: |
|
393 | 393 | ci1 |
|
394 | 394 | |
|
395 | 395 | Members: |
|
396 | 396 | a:1.1->1.2 |
|
397 | 397 | |
|
398 | 398 | --------------------- |
|
399 | 399 | PatchSet 6 |
|
400 | 400 | Date: * (glob) |
|
401 | 401 | Author: * (glob) |
|
402 | 402 | Branch: HEAD |
|
403 | 403 | Tag: (none) |
|
404 | 404 | Log: |
|
405 | 405 | ci1 |
|
406 | 406 | |
|
407 | 407 | Members: |
|
408 | 408 | b/c:1.2->1.3 |
|
409 | 409 | |
|
410 | 410 | --------------------- |
|
411 | 411 | PatchSet 7 |
|
412 | 412 | Date: * (glob) |
|
413 | 413 | Author: * (glob) |
|
414 | 414 | Branch: branch |
|
415 | 415 | Tag: (none) |
|
416 | 416 | Log: |
|
417 | 417 | ci2 |
|
418 | 418 | |
|
419 | 419 | Members: |
|
420 | 420 | b/c:1.1->1.1.2.1 |
|
421 | 421 | |
|
422 | 422 | --------------------- |
|
423 | 423 | PatchSet 8 |
|
424 | 424 | Date: * (glob) |
|
425 | 425 | Author: * (glob) |
|
426 | 426 | Branch: branch |
|
427 | 427 | Tag: (none) |
|
428 | 428 | Log: |
|
429 | 429 | funny |
|
430 | 430 | ---------------------------- |
|
431 | 431 | log message |
|
432 | 432 | |
|
433 | 433 | Members: |
|
434 | 434 | a:1.2->1.2.2.1 |
|
435 | 435 | |
|
436 | 436 | --------------------- |
|
437 | 437 | PatchSet 9 |
|
438 | 438 | Date: * (glob) |
|
439 | 439 | Author: * (glob) |
|
440 | 440 | Branch: branch |
|
441 | 441 | Tag: (none) |
|
442 | 442 | Log: |
|
443 | 443 | fuzzy |
|
444 | 444 | |
|
445 | 445 | Members: |
|
446 | 446 | a:1.2.2.1->1.2.2.2 |
|
447 | 447 | |
|
448 | 448 | --------------------- |
|
449 | 449 | PatchSet 10 |
|
450 | 450 | Date: * (glob) |
|
451 | 451 | Author: * (glob) |
|
452 | 452 | Branch: branch |
|
453 | 453 | Tag: (none) |
|
454 | 454 | Log: |
|
455 | 455 | fuzzy |
|
456 | 456 | |
|
457 | 457 | Members: |
|
458 | 458 | b/c:1.1.2.1->1.1.2.2 |
|
459 | 459 | |
|
460 | 460 | |
|
461 | 461 | $ cd .. |
@@ -1,106 +1,110 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ "$TESTDIR/hghave" darcs || exit 80 |
|
3 | 3 | $ echo "[extensions]" >> $HGRCPATH |
|
4 | 4 | $ echo "convert=" >> $HGRCPATH |
|
5 | 5 | $ echo 'graphlog =' >> $HGRCPATH |
|
6 | 6 | $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL |
|
7 | 7 | |
|
8 | 8 | skip if we can't import elementtree |
|
9 | 9 | |
|
10 | 10 | $ mkdir dummy |
|
11 | 11 | $ mkdir dummy/_darcs |
|
12 | 12 | $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then |
|
13 | 13 | > echo 'skipped: missing feature: elementtree module' |
|
14 | 14 | > exit 80 |
|
15 | 15 | > fi |
|
16 | 16 | |
|
17 | #if no-outer-repo | |
|
18 | ||
|
17 | 19 | try converting darcs1 repository |
|
18 | 20 | |
|
19 | 21 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs |
|
20 | 22 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 |
|
21 | 23 | darcs-1.0 repository format is unsupported, please upgrade |
|
22 | 24 | |
|
25 | #endif | |
|
26 | ||
|
23 | 27 | initialize darcs repo |
|
24 | 28 | |
|
25 | 29 | $ mkdir darcs-repo |
|
26 | 30 | $ cd darcs-repo |
|
27 | 31 | $ darcs init |
|
28 | 32 | $ echo a > a |
|
29 | 33 | $ darcs record -a -l -m p0 |
|
30 | 34 | Finished recording patch 'p0' |
|
31 | 35 | $ cd .. |
|
32 | 36 | |
|
33 | 37 | branch and update |
|
34 | 38 | |
|
35 | 39 | $ darcs get -q darcs-repo darcs-clone >/dev/null |
|
36 | 40 | $ cd darcs-clone |
|
37 | 41 | $ echo c >> a |
|
38 | 42 | $ echo c > c |
|
39 | 43 | $ darcs record -a -l -m p1.1 |
|
40 | 44 | Finished recording patch 'p1.1' |
|
41 | 45 | $ cd .. |
|
42 | 46 | |
|
43 | 47 | update source |
|
44 | 48 | |
|
45 | 49 | $ cd darcs-repo |
|
46 | 50 | $ echo b >> a |
|
47 | 51 | $ echo b > b |
|
48 | 52 | $ darcs record -a -l -m p1.2 |
|
49 | 53 | Finished recording patch 'p1.2' |
|
50 | 54 | |
|
51 | 55 | $ darcs pull -q -a --no-set-default ../darcs-clone |
|
52 | 56 | Backing up ./a(*) (glob) |
|
53 | 57 | We have conflicts in the following files: |
|
54 | 58 | ./a |
|
55 | 59 | $ sleep 1 |
|
56 | 60 | $ echo e > a |
|
57 | 61 | $ echo f > f |
|
58 | 62 | $ mkdir dir |
|
59 | 63 | $ echo d > dir/d |
|
60 | 64 | $ echo d > dir/d2 |
|
61 | 65 | $ darcs record -a -l -m p2 |
|
62 | 66 | Finished recording patch 'p2' |
|
63 | 67 | |
|
64 | 68 | test file and directory move |
|
65 | 69 | |
|
66 | 70 | $ darcs mv f ff |
|
67 | 71 | |
|
68 | 72 | Test remove + move |
|
69 | 73 | |
|
70 | 74 | $ darcs remove dir/d2 |
|
71 | 75 | $ rm dir/d2 |
|
72 | 76 | $ darcs mv dir dir2 |
|
73 | 77 | $ darcs record -a -l -m p3 |
|
74 | 78 | Finished recording patch 'p3' |
|
75 | 79 | |
|
76 | 80 | The converter does not currently handle patch conflicts very well. |
|
77 | 81 | When they occur, it reverts *all* changes and moves forward, |
|
78 | 82 | letting the conflict resolving patch fix collisions. |
|
79 | 83 | Unfortunately, non-conflicting changes, like the addition of the |
|
80 | 84 | "c" file in p1.1 patch are reverted too. |
|
81 | 85 | Just to say that manifest not listing "c" here is a bug. |
|
82 | 86 | |
|
83 | 87 | $ cd .. |
|
84 | 88 | $ hg convert darcs-repo darcs-repo-hg |
|
85 | 89 | initializing destination darcs-repo-hg repository |
|
86 | 90 | scanning source... |
|
87 | 91 | sorting... |
|
88 | 92 | converting... |
|
89 | 93 | 4 p0 |
|
90 | 94 | 3 p1.2 |
|
91 | 95 | 2 p1.1 |
|
92 | 96 | 1 p2 |
|
93 | 97 | 0 p3 |
|
94 | 98 | $ hg log -R darcs-repo-hg -g --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@" |
|
95 | 99 | 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff |
|
96 | 100 | 3 "p2" (test@example.org) files: a dir/d dir/d2 f |
|
97 | 101 | 2 "p1.1" (test@example.org) files: |
|
98 | 102 | 1 "p1.2" (test@example.org) files: a b |
|
99 | 103 | 0 "p0" (test@example.org) files: a |
|
100 | 104 | |
|
101 | 105 | $ hg up -q -R darcs-repo-hg |
|
102 | 106 | $ hg -R darcs-repo-hg manifest --debug |
|
103 | 107 | 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a |
|
104 | 108 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 b |
|
105 | 109 | 37406831adc447ec2385014019599dfec953c806 644 dir2/d |
|
106 | 110 | b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff |
@@ -1,194 +1,203 b'' | |||
|
1 | hide outer repo | |
|
2 | $ hg init | |
|
3 | ||
|
1 | 4 | Use hgrc within $TESTTMP |
|
2 | 5 | |
|
3 | 6 | $ HGRCPATH=`pwd`/hgrc |
|
4 | 7 | $ export HGRCPATH |
|
5 | 8 | |
|
6 | 9 | Use an alternate var for scribbling on hgrc to keep check-code from |
|
7 | 10 | complaining about the important settings we may be overwriting: |
|
8 | 11 | |
|
9 | 12 | $ HGRC=`pwd`/hgrc |
|
10 | 13 | $ export HGRC |
|
11 | 14 | |
|
12 | 15 | Basic syntax error |
|
13 | 16 | |
|
14 | 17 | $ echo "invalid" > $HGRC |
|
15 | 18 | $ hg version |
|
16 | 19 | hg: parse error at $TESTTMP/hgrc:1: invalid |
|
17 | 20 | [255] |
|
18 | 21 | $ echo "" > $HGRC |
|
19 | 22 | |
|
20 | 23 | Issue1199: Can't use '%' in hgrc (eg url encoded username) |
|
21 | 24 | |
|
22 | 25 | $ hg init "foo%bar" |
|
23 | 26 | $ hg clone "foo%bar" foobar |
|
24 | 27 | updating to branch default |
|
25 | 28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 29 | $ cd foobar |
|
27 | 30 | $ cat .hg/hgrc |
|
28 | 31 | [paths] |
|
29 | 32 | default = $TESTTMP/foo%bar (glob) |
|
30 | 33 | $ hg paths |
|
31 | 34 | default = $TESTTMP/foo%bar (glob) |
|
32 | 35 | $ hg showconfig |
|
33 | 36 | bundle.mainreporoot=$TESTTMP/foobar (glob) |
|
34 | 37 | paths.default=$TESTTMP/foo%bar (glob) |
|
35 | 38 | $ cd .. |
|
36 | 39 | |
|
37 | 40 | issue1829: wrong indentation |
|
38 | 41 | |
|
39 | 42 | $ echo '[foo]' > $HGRC |
|
40 | 43 | $ echo ' x = y' >> $HGRC |
|
41 | 44 | $ hg version |
|
42 | 45 | hg: parse error at $TESTTMP/hgrc:2: x = y |
|
43 | 46 | [255] |
|
44 | 47 | |
|
45 | 48 | $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ |
|
46 | 49 | > > $HGRC |
|
47 | 50 | $ hg showconfig foo |
|
48 | 51 | foo.bar=a\nb\nc\nde\nfg |
|
49 | 52 | foo.baz=bif cb |
|
50 | 53 | |
|
51 | 54 | $ FAKEPATH=/path/to/nowhere |
|
52 | 55 | $ export FAKEPATH |
|
53 | 56 | $ echo '%include $FAKEPATH/no-such-file' > $HGRC |
|
54 | 57 | $ hg version |
|
55 | 58 | Mercurial Distributed SCM (version *) (glob) |
|
56 | 59 | (see http://mercurial.selenic.com for more information) |
|
57 | 60 | |
|
58 | 61 | Copyright (C) 2005-2012 Matt Mackall and others |
|
59 | 62 | This is free software; see the source for copying conditions. There is NO |
|
60 | 63 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
61 | 64 | $ unset FAKEPATH |
|
62 | 65 | |
|
63 | 66 | make sure global options given on the cmdline take precedence |
|
64 | 67 | |
|
65 | 68 | $ hg showconfig --config ui.verbose=True --quiet |
|
69 | bundle.mainreporoot=$TESTTMP | |
|
66 | 70 | ui.verbose=False |
|
67 | 71 | ui.debug=False |
|
68 | 72 | ui.quiet=True |
|
69 | 73 | |
|
70 | 74 | $ touch foobar/untracked |
|
71 | 75 | $ cat >> foobar/.hg/hgrc <<EOF |
|
72 | 76 | > [ui] |
|
73 | 77 | > verbose=True |
|
74 | 78 | > EOF |
|
75 | 79 | $ hg -R foobar st -q |
|
76 | 80 | |
|
77 | 81 | username expansion |
|
78 | 82 | |
|
79 | 83 | $ olduser=$HGUSER |
|
80 | 84 | $ unset HGUSER |
|
81 | 85 | |
|
82 | 86 | $ FAKEUSER='John Doe' |
|
83 | 87 | $ export FAKEUSER |
|
84 | 88 | $ echo '[ui]' > $HGRC |
|
85 | 89 | $ echo 'username = $FAKEUSER' >> $HGRC |
|
86 | 90 | |
|
87 | 91 | $ hg init usertest |
|
88 | 92 | $ cd usertest |
|
89 | 93 | $ touch bar |
|
90 | 94 | $ hg commit --addremove --quiet -m "added bar" |
|
91 | 95 | $ hg log --template "{author}\n" |
|
92 | 96 | John Doe |
|
93 | 97 | $ cd .. |
|
94 | 98 | |
|
95 | 99 | $ hg showconfig |
|
100 | bundle.mainreporoot=$TESTTMP | |
|
96 | 101 | ui.username=$FAKEUSER |
|
97 | 102 | |
|
98 | 103 | $ unset FAKEUSER |
|
99 | 104 | $ HGUSER=$olduser |
|
100 | 105 | $ export HGUSER |
|
101 | 106 | |
|
102 | 107 | showconfig with multiple arguments |
|
103 | 108 | |
|
104 | 109 | $ echo "[alias]" > $HGRC |
|
105 | 110 | $ echo "log = log -g" >> $HGRC |
|
106 | 111 | $ echo "[defaults]" >> $HGRC |
|
107 | 112 | $ echo "identify = -n" >> $HGRC |
|
108 | 113 | $ hg showconfig alias defaults |
|
109 | 114 | alias.log=log -g |
|
110 | 115 | defaults.identify=-n |
|
111 | 116 | $ hg showconfig alias defaults.identify |
|
112 | 117 | abort: only one config item permitted |
|
113 | 118 | [255] |
|
114 | 119 | $ hg showconfig alias.log defaults.identify |
|
115 | 120 | abort: only one config item permitted |
|
116 | 121 | [255] |
|
117 | 122 | |
|
118 | 123 | HGPLAIN |
|
119 | 124 | |
|
120 | $ p=`pwd` | |
|
121 | 125 | $ echo "[ui]" > $HGRC |
|
122 | 126 | $ echo "debug=true" >> $HGRC |
|
123 | 127 | $ echo "fallbackencoding=ASCII" >> $HGRC |
|
124 | 128 | $ echo "quiet=true" >> $HGRC |
|
125 | 129 | $ echo "slash=true" >> $HGRC |
|
126 | 130 | $ echo "traceback=true" >> $HGRC |
|
127 | 131 | $ echo "verbose=true" >> $HGRC |
|
128 | 132 | $ echo "style=~/.hgstyle" >> $HGRC |
|
129 | 133 | $ echo "logtemplate={node}" >> $HGRC |
|
130 | 134 | $ echo "[defaults]" >> $HGRC |
|
131 | 135 | $ echo "identify=-n" >> $HGRC |
|
132 | 136 | $ echo "[alias]" >> $HGRC |
|
133 | 137 | $ echo "log=log -g" >> $HGRC |
|
134 | 138 | |
|
135 | 139 | customized hgrc |
|
136 | 140 | |
|
137 | 141 | $ hg showconfig |
|
138 | 142 | read config from: $TESTTMP/hgrc |
|
139 | 143 | $TESTTMP/hgrc:13: alias.log=log -g |
|
144 | none: bundle.mainreporoot=$TESTTMP | |
|
140 | 145 | $TESTTMP/hgrc:11: defaults.identify=-n |
|
141 | 146 | $TESTTMP/hgrc:2: ui.debug=true |
|
142 | 147 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII |
|
143 | 148 | $TESTTMP/hgrc:4: ui.quiet=true |
|
144 | 149 | $TESTTMP/hgrc:5: ui.slash=true |
|
145 | 150 | $TESTTMP/hgrc:6: ui.traceback=true |
|
146 | 151 | $TESTTMP/hgrc:7: ui.verbose=true |
|
147 | 152 | $TESTTMP/hgrc:8: ui.style=~/.hgstyle |
|
148 | 153 | $TESTTMP/hgrc:9: ui.logtemplate={node} |
|
149 | 154 | |
|
150 | 155 | plain hgrc |
|
151 | 156 | |
|
152 | 157 | $ HGPLAIN=; export HGPLAIN |
|
153 | 158 | $ hg showconfig --config ui.traceback=True --debug |
|
154 | 159 | read config from: $TESTTMP/hgrc |
|
160 | none: bundle.mainreporoot=$TESTTMP | |
|
155 | 161 | none: ui.traceback=True |
|
156 | 162 | none: ui.verbose=False |
|
157 | 163 | none: ui.debug=True |
|
158 | 164 | none: ui.quiet=False |
|
159 | 165 | |
|
160 | 166 | plain mode with exceptions |
|
161 | 167 | |
|
162 | 168 | $ cat > plain.py <<EOF |
|
163 | 169 | > def uisetup(ui): |
|
164 | 170 | > ui.write('plain: %r\n' % ui.plain()) |
|
165 | 171 | > EOF |
|
166 | 172 | $ echo "[extensions]" >> $HGRC |
|
167 | 173 | $ echo "plain=./plain.py" >> $HGRC |
|
168 | 174 | $ HGPLAINEXCEPT=; export HGPLAINEXCEPT |
|
169 | 175 | $ hg showconfig --config ui.traceback=True --debug |
|
170 | 176 | plain: True |
|
171 | 177 | read config from: $TESTTMP/hgrc |
|
178 | none: bundle.mainreporoot=$TESTTMP | |
|
172 | 179 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
173 | 180 | none: ui.traceback=True |
|
174 | 181 | none: ui.verbose=False |
|
175 | 182 | none: ui.debug=True |
|
176 | 183 | none: ui.quiet=False |
|
177 | 184 | $ unset HGPLAIN |
|
178 | 185 | $ hg showconfig --config ui.traceback=True --debug |
|
179 | 186 | plain: True |
|
180 | 187 | read config from: $TESTTMP/hgrc |
|
188 | none: bundle.mainreporoot=$TESTTMP | |
|
181 | 189 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
182 | 190 | none: ui.traceback=True |
|
183 | 191 | none: ui.verbose=False |
|
184 | 192 | none: ui.debug=True |
|
185 | 193 | none: ui.quiet=False |
|
186 | 194 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT |
|
187 | 195 | $ hg showconfig --config ui.traceback=True --debug |
|
188 | 196 | plain: True |
|
189 | 197 | read config from: $TESTTMP/hgrc |
|
198 | none: bundle.mainreporoot=$TESTTMP | |
|
190 | 199 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
191 | 200 | none: ui.traceback=True |
|
192 | 201 | none: ui.verbose=False |
|
193 | 202 | none: ui.debug=True |
|
194 | 203 | none: ui.quiet=False |
@@ -1,1008 +1,1015 b'' | |||
|
1 | 1 | $ "$TESTDIR/hghave" serve || exit 80 |
|
2 | 2 | |
|
3 | hide outer repo and work in dir without '.hg' | |
|
4 | $ hg init | |
|
5 | $ mkdir dir | |
|
6 | $ cd dir | |
|
7 | ||
|
3 | 8 | Tests some basic hgwebdir functionality. Tests setting up paths and |
|
4 | 9 | collection, different forms of 404s and the subdirectory support. |
|
5 | 10 | |
|
6 | 11 | $ mkdir webdir |
|
7 | 12 | $ cd webdir |
|
8 | 13 | $ hg init a |
|
9 | 14 | $ echo a > a/a |
|
10 | 15 | $ hg --cwd a ci -Ama -d'1 0' |
|
11 | 16 | adding a |
|
12 | 17 | |
|
13 | 18 | create a mercurial queue repository |
|
14 | 19 | |
|
15 | 20 | $ hg --cwd a qinit --config extensions.hgext.mq= -c |
|
16 | 21 | $ hg init b |
|
17 | 22 | $ echo b > b/b |
|
18 | 23 | $ hg --cwd b ci -Amb -d'2 0' |
|
19 | 24 | adding b |
|
20 | 25 | |
|
21 | 26 | create a nested repository |
|
22 | 27 | |
|
23 | 28 | $ cd b |
|
24 | 29 | $ hg init d |
|
25 | 30 | $ echo d > d/d |
|
26 | 31 | $ hg --cwd d ci -Amd -d'3 0' |
|
27 | 32 | adding d |
|
28 | 33 | $ cd .. |
|
29 | 34 | $ hg init c |
|
30 | 35 | $ echo c > c/c |
|
31 | 36 | $ hg --cwd c ci -Amc -d'3 0' |
|
32 | 37 | adding c |
|
33 | 38 | |
|
34 | 39 | create a subdirectory containing repositories and subrepositories |
|
35 | 40 | |
|
36 | 41 | $ mkdir notrepo |
|
37 | 42 | $ cd notrepo |
|
38 | 43 | $ hg init e |
|
39 | 44 | $ echo e > e/e |
|
40 | 45 | $ hg --cwd e ci -Ame -d'4 0' |
|
41 | 46 | adding e |
|
42 | 47 | $ hg init e/e2 |
|
43 | 48 | $ echo e2 > e/e2/e2 |
|
44 | 49 | $ hg --cwd e/e2 ci -Ame2 -d '4 0' |
|
45 | 50 | adding e2 |
|
46 | 51 | $ hg init f |
|
47 | 52 | $ echo f > f/f |
|
48 | 53 | $ hg --cwd f ci -Amf -d'4 0' |
|
49 | 54 | adding f |
|
50 | 55 | $ hg init f/f2 |
|
51 | 56 | $ echo f2 > f/f2/f2 |
|
52 | 57 | $ hg --cwd f/f2 ci -Amf2 -d '4 0' |
|
53 | 58 | adding f2 |
|
54 | 59 | $ cd .. |
|
55 | 60 | |
|
56 | 61 | create repository without .hg/store |
|
57 | 62 | |
|
58 | 63 | $ hg init nostore |
|
59 | 64 | $ rm -R nostore/.hg/store |
|
60 | 65 | $ root=`pwd` |
|
61 | 66 | $ cd .. |
|
67 | ||
|
68 | serve | |
|
62 | 69 | $ cat > paths.conf <<EOF |
|
63 | 70 | > [paths] |
|
64 | 71 | > a=$root/a |
|
65 | 72 | > b=$root/b |
|
66 | 73 | > EOF |
|
67 | 74 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
68 | 75 | > -A access-paths.log -E error-paths-1.log |
|
69 | 76 | $ cat hg.pid >> $DAEMON_PIDS |
|
70 | 77 | |
|
71 | 78 | should give a 404 - file does not exist |
|
72 | 79 | |
|
73 | 80 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw' |
|
74 | 81 | 404 Not Found |
|
75 | 82 | |
|
76 | 83 | |
|
77 | 84 | error: bork@8580ff50825a: not found in manifest |
|
78 | 85 | [1] |
|
79 | 86 | |
|
80 | 87 | should succeed |
|
81 | 88 | |
|
82 | 89 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' |
|
83 | 90 | 200 Script output follows |
|
84 | 91 | |
|
85 | 92 | |
|
86 | 93 | /a/ |
|
87 | 94 | /b/ |
|
88 | 95 | |
|
89 | 96 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw' |
|
90 | 97 | 200 Script output follows |
|
91 | 98 | |
|
92 | 99 | a |
|
93 | 100 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw' |
|
94 | 101 | 200 Script output follows |
|
95 | 102 | |
|
96 | 103 | b |
|
97 | 104 | |
|
98 | 105 | should give a 404 - repo is not published |
|
99 | 106 | |
|
100 | 107 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw' |
|
101 | 108 | 404 Not Found |
|
102 | 109 | |
|
103 | 110 | |
|
104 | 111 | error: repository c/file/tip/c not found |
|
105 | 112 | [1] |
|
106 | 113 | |
|
107 | 114 | atom-log without basedir |
|
108 | 115 | |
|
109 | 116 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link' |
|
110 | 117 | <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob) |
|
111 | 118 | <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob) |
|
112 | 119 | <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob) |
|
113 | 120 | |
|
114 | 121 | rss-log without basedir |
|
115 | 122 | |
|
116 | 123 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid' |
|
117 | 124 | <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob) |
|
118 | 125 | $ cat > paths.conf <<EOF |
|
119 | 126 | > [paths] |
|
120 | 127 | > t/a/=$root/a |
|
121 | 128 | > b=$root/b |
|
122 | 129 | > coll=$root/* |
|
123 | 130 | > rcoll=$root/** |
|
124 | 131 | > star=* |
|
125 | 132 | > starstar=** |
|
126 | 133 | > astar=webdir/a/* |
|
127 | 134 | > EOF |
|
128 | 135 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
129 | 136 | > -A access-paths.log -E error-paths-2.log |
|
130 | 137 | $ cat hg.pid >> $DAEMON_PIDS |
|
131 | 138 | |
|
132 | 139 | should succeed, slashy names |
|
133 | 140 | |
|
134 | 141 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
135 | 142 | 200 Script output follows |
|
136 | 143 | |
|
137 | 144 | |
|
138 | 145 | /t/a/ |
|
139 | 146 | /b/ |
|
140 | 147 | /coll/a/ |
|
141 | 148 | /coll/a/.hg/patches/ |
|
142 | 149 | /coll/b/ |
|
143 | 150 | /coll/c/ |
|
144 | 151 | /coll/notrepo/e/ |
|
145 | 152 | /coll/notrepo/f/ |
|
146 | 153 | /rcoll/a/ |
|
147 | 154 | /rcoll/a/.hg/patches/ |
|
148 | 155 | /rcoll/b/ |
|
149 | 156 | /rcoll/b/d/ |
|
150 | 157 | /rcoll/c/ |
|
151 | 158 | /rcoll/notrepo/e/ |
|
152 | 159 | /rcoll/notrepo/e/e2/ |
|
153 | 160 | /rcoll/notrepo/f/ |
|
154 | 161 | /rcoll/notrepo/f/f2/ |
|
155 | 162 | /star/webdir/a/ |
|
156 | 163 | /star/webdir/a/.hg/patches/ |
|
157 | 164 | /star/webdir/b/ |
|
158 | 165 | /star/webdir/c/ |
|
159 | 166 | /star/webdir/notrepo/e/ |
|
160 | 167 | /star/webdir/notrepo/f/ |
|
161 | 168 | /starstar/webdir/a/ |
|
162 | 169 | /starstar/webdir/a/.hg/patches/ |
|
163 | 170 | /starstar/webdir/b/ |
|
164 | 171 | /starstar/webdir/b/d/ |
|
165 | 172 | /starstar/webdir/c/ |
|
166 | 173 | /starstar/webdir/notrepo/e/ |
|
167 | 174 | /starstar/webdir/notrepo/e/e2/ |
|
168 | 175 | /starstar/webdir/notrepo/f/ |
|
169 | 176 | /starstar/webdir/notrepo/f/f2/ |
|
170 | 177 | /astar/ |
|
171 | 178 | /astar/.hg/patches/ |
|
172 | 179 | |
|
173 | 180 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper' |
|
174 | 181 | 200 Script output follows |
|
175 | 182 | |
|
176 | 183 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
177 | 184 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
178 | 185 | <head> |
|
179 | 186 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
180 | 187 | <meta name="robots" content="index, nofollow" /> |
|
181 | 188 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
182 | 189 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
183 | 190 | |
|
184 | 191 | <title>Mercurial repositories index</title> |
|
185 | 192 | </head> |
|
186 | 193 | <body> |
|
187 | 194 | |
|
188 | 195 | <div class="container"> |
|
189 | 196 | <div class="menu"> |
|
190 | 197 | <a href="http://mercurial.selenic.com/"> |
|
191 | 198 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
192 | 199 | </div> |
|
193 | 200 | <div class="main"> |
|
194 | 201 | <h2>Mercurial Repositories</h2> |
|
195 | 202 | |
|
196 | 203 | <table class="bigtable"> |
|
197 | 204 | <tr> |
|
198 | 205 | <th><a href="?sort=name">Name</a></th> |
|
199 | 206 | <th><a href="?sort=description">Description</a></th> |
|
200 | 207 | <th><a href="?sort=contact">Contact</a></th> |
|
201 | 208 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
202 | 209 | <th> </th> |
|
203 | 210 | </tr> |
|
204 | 211 | |
|
205 | 212 | <tr class="parity0"> |
|
206 | 213 | <td><a href="/t/a/?style=paper">t/a</a></td> |
|
207 | 214 | <td>unknown</td> |
|
208 | 215 | <td>Foo Bar <foo.bar@example.com></td> |
|
209 | 216 | <td class="age">*</td> (glob) |
|
210 | 217 | <td class="indexlinks"></td> |
|
211 | 218 | </tr> |
|
212 | 219 | |
|
213 | 220 | <tr class="parity1"> |
|
214 | 221 | <td><a href="/b/?style=paper">b</a></td> |
|
215 | 222 | <td>unknown</td> |
|
216 | 223 | <td>Foo Bar <foo.bar@example.com></td> |
|
217 | 224 | <td class="age">*</td> (glob) |
|
218 | 225 | <td class="indexlinks"></td> |
|
219 | 226 | </tr> |
|
220 | 227 | |
|
221 | 228 | <tr class="parity0"> |
|
222 | 229 | <td><a href="/coll/a/?style=paper">coll/a</a></td> |
|
223 | 230 | <td>unknown</td> |
|
224 | 231 | <td>Foo Bar <foo.bar@example.com></td> |
|
225 | 232 | <td class="age">*</td> (glob) |
|
226 | 233 | <td class="indexlinks"></td> |
|
227 | 234 | </tr> |
|
228 | 235 | |
|
229 | 236 | <tr class="parity1"> |
|
230 | 237 | <td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td> |
|
231 | 238 | <td>unknown</td> |
|
232 | 239 | <td>Foo Bar <foo.bar@example.com></td> |
|
233 | 240 | <td class="age">*</td> (glob) |
|
234 | 241 | <td class="indexlinks"></td> |
|
235 | 242 | </tr> |
|
236 | 243 | |
|
237 | 244 | <tr class="parity0"> |
|
238 | 245 | <td><a href="/coll/b/?style=paper">coll/b</a></td> |
|
239 | 246 | <td>unknown</td> |
|
240 | 247 | <td>Foo Bar <foo.bar@example.com></td> |
|
241 | 248 | <td class="age">*</td> (glob) |
|
242 | 249 | <td class="indexlinks"></td> |
|
243 | 250 | </tr> |
|
244 | 251 | |
|
245 | 252 | <tr class="parity1"> |
|
246 | 253 | <td><a href="/coll/c/?style=paper">coll/c</a></td> |
|
247 | 254 | <td>unknown</td> |
|
248 | 255 | <td>Foo Bar <foo.bar@example.com></td> |
|
249 | 256 | <td class="age">*</td> (glob) |
|
250 | 257 | <td class="indexlinks"></td> |
|
251 | 258 | </tr> |
|
252 | 259 | |
|
253 | 260 | <tr class="parity0"> |
|
254 | 261 | <td><a href="/coll/notrepo/e/?style=paper">coll/notrepo/e</a></td> |
|
255 | 262 | <td>unknown</td> |
|
256 | 263 | <td>Foo Bar <foo.bar@example.com></td> |
|
257 | 264 | <td class="age">*</td> (glob) |
|
258 | 265 | <td class="indexlinks"></td> |
|
259 | 266 | </tr> |
|
260 | 267 | |
|
261 | 268 | <tr class="parity1"> |
|
262 | 269 | <td><a href="/coll/notrepo/f/?style=paper">coll/notrepo/f</a></td> |
|
263 | 270 | <td>unknown</td> |
|
264 | 271 | <td>Foo Bar <foo.bar@example.com></td> |
|
265 | 272 | <td class="age">*</td> (glob) |
|
266 | 273 | <td class="indexlinks"></td> |
|
267 | 274 | </tr> |
|
268 | 275 | |
|
269 | 276 | <tr class="parity0"> |
|
270 | 277 | <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td> |
|
271 | 278 | <td>unknown</td> |
|
272 | 279 | <td>Foo Bar <foo.bar@example.com></td> |
|
273 | 280 | <td class="age">*</td> (glob) |
|
274 | 281 | <td class="indexlinks"></td> |
|
275 | 282 | </tr> |
|
276 | 283 | |
|
277 | 284 | <tr class="parity1"> |
|
278 | 285 | <td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td> |
|
279 | 286 | <td>unknown</td> |
|
280 | 287 | <td>Foo Bar <foo.bar@example.com></td> |
|
281 | 288 | <td class="age">*</td> (glob) |
|
282 | 289 | <td class="indexlinks"></td> |
|
283 | 290 | </tr> |
|
284 | 291 | |
|
285 | 292 | <tr class="parity0"> |
|
286 | 293 | <td><a href="/rcoll/b/?style=paper">rcoll/b</a></td> |
|
287 | 294 | <td>unknown</td> |
|
288 | 295 | <td>Foo Bar <foo.bar@example.com></td> |
|
289 | 296 | <td class="age">*</td> (glob) |
|
290 | 297 | <td class="indexlinks"></td> |
|
291 | 298 | </tr> |
|
292 | 299 | |
|
293 | 300 | <tr class="parity1"> |
|
294 | 301 | <td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td> |
|
295 | 302 | <td>unknown</td> |
|
296 | 303 | <td>Foo Bar <foo.bar@example.com></td> |
|
297 | 304 | <td class="age">*</td> (glob) |
|
298 | 305 | <td class="indexlinks"></td> |
|
299 | 306 | </tr> |
|
300 | 307 | |
|
301 | 308 | <tr class="parity0"> |
|
302 | 309 | <td><a href="/rcoll/c/?style=paper">rcoll/c</a></td> |
|
303 | 310 | <td>unknown</td> |
|
304 | 311 | <td>Foo Bar <foo.bar@example.com></td> |
|
305 | 312 | <td class="age">*</td> (glob) |
|
306 | 313 | <td class="indexlinks"></td> |
|
307 | 314 | </tr> |
|
308 | 315 | |
|
309 | 316 | <tr class="parity1"> |
|
310 | 317 | <td><a href="/rcoll/notrepo/e/?style=paper">rcoll/notrepo/e</a></td> |
|
311 | 318 | <td>unknown</td> |
|
312 | 319 | <td>Foo Bar <foo.bar@example.com></td> |
|
313 | 320 | <td class="age">*</td> (glob) |
|
314 | 321 | <td class="indexlinks"></td> |
|
315 | 322 | </tr> |
|
316 | 323 | |
|
317 | 324 | <tr class="parity0"> |
|
318 | 325 | <td><a href="/rcoll/notrepo/e/e2/?style=paper">rcoll/notrepo/e/e2</a></td> |
|
319 | 326 | <td>unknown</td> |
|
320 | 327 | <td>Foo Bar <foo.bar@example.com></td> |
|
321 | 328 | <td class="age">*</td> (glob) |
|
322 | 329 | <td class="indexlinks"></td> |
|
323 | 330 | </tr> |
|
324 | 331 | |
|
325 | 332 | <tr class="parity1"> |
|
326 | 333 | <td><a href="/rcoll/notrepo/f/?style=paper">rcoll/notrepo/f</a></td> |
|
327 | 334 | <td>unknown</td> |
|
328 | 335 | <td>Foo Bar <foo.bar@example.com></td> |
|
329 | 336 | <td class="age">*</td> (glob) |
|
330 | 337 | <td class="indexlinks"></td> |
|
331 | 338 | </tr> |
|
332 | 339 | |
|
333 | 340 | <tr class="parity0"> |
|
334 | 341 | <td><a href="/rcoll/notrepo/f/f2/?style=paper">rcoll/notrepo/f/f2</a></td> |
|
335 | 342 | <td>unknown</td> |
|
336 | 343 | <td>Foo Bar <foo.bar@example.com></td> |
|
337 | 344 | <td class="age">*</td> (glob) |
|
338 | 345 | <td class="indexlinks"></td> |
|
339 | 346 | </tr> |
|
340 | 347 | |
|
341 | 348 | <tr class="parity1"> |
|
342 | 349 | <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td> |
|
343 | 350 | <td>unknown</td> |
|
344 | 351 | <td>Foo Bar <foo.bar@example.com></td> |
|
345 | 352 | <td class="age">*</td> (glob) |
|
346 | 353 | <td class="indexlinks"></td> |
|
347 | 354 | </tr> |
|
348 | 355 | |
|
349 | 356 | <tr class="parity0"> |
|
350 | 357 | <td><a href="/star/webdir/a/.hg/patches/?style=paper">star/webdir/a/.hg/patches</a></td> |
|
351 | 358 | <td>unknown</td> |
|
352 | 359 | <td>Foo Bar <foo.bar@example.com></td> |
|
353 | 360 | <td class="age">*</td> (glob) |
|
354 | 361 | <td class="indexlinks"></td> |
|
355 | 362 | </tr> |
|
356 | 363 | |
|
357 | 364 | <tr class="parity1"> |
|
358 | 365 | <td><a href="/star/webdir/b/?style=paper">star/webdir/b</a></td> |
|
359 | 366 | <td>unknown</td> |
|
360 | 367 | <td>Foo Bar <foo.bar@example.com></td> |
|
361 | 368 | <td class="age">*</td> (glob) |
|
362 | 369 | <td class="indexlinks"></td> |
|
363 | 370 | </tr> |
|
364 | 371 | |
|
365 | 372 | <tr class="parity0"> |
|
366 | 373 | <td><a href="/star/webdir/c/?style=paper">star/webdir/c</a></td> |
|
367 | 374 | <td>unknown</td> |
|
368 | 375 | <td>Foo Bar <foo.bar@example.com></td> |
|
369 | 376 | <td class="age">*</td> (glob) |
|
370 | 377 | <td class="indexlinks"></td> |
|
371 | 378 | </tr> |
|
372 | 379 | |
|
373 | 380 | <tr class="parity1"> |
|
374 | 381 | <td><a href="/star/webdir/notrepo/e/?style=paper">star/webdir/notrepo/e</a></td> |
|
375 | 382 | <td>unknown</td> |
|
376 | 383 | <td>Foo Bar <foo.bar@example.com></td> |
|
377 | 384 | <td class="age">*</td> (glob) |
|
378 | 385 | <td class="indexlinks"></td> |
|
379 | 386 | </tr> |
|
380 | 387 | |
|
381 | 388 | <tr class="parity0"> |
|
382 | 389 | <td><a href="/star/webdir/notrepo/f/?style=paper">star/webdir/notrepo/f</a></td> |
|
383 | 390 | <td>unknown</td> |
|
384 | 391 | <td>Foo Bar <foo.bar@example.com></td> |
|
385 | 392 | <td class="age">*</td> (glob) |
|
386 | 393 | <td class="indexlinks"></td> |
|
387 | 394 | </tr> |
|
388 | 395 | |
|
389 | 396 | <tr class="parity1"> |
|
390 | 397 | <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td> |
|
391 | 398 | <td>unknown</td> |
|
392 | 399 | <td>Foo Bar <foo.bar@example.com></td> |
|
393 | 400 | <td class="age">*</td> (glob) |
|
394 | 401 | <td class="indexlinks"></td> |
|
395 | 402 | </tr> |
|
396 | 403 | |
|
397 | 404 | <tr class="parity0"> |
|
398 | 405 | <td><a href="/starstar/webdir/a/.hg/patches/?style=paper">starstar/webdir/a/.hg/patches</a></td> |
|
399 | 406 | <td>unknown</td> |
|
400 | 407 | <td>Foo Bar <foo.bar@example.com></td> |
|
401 | 408 | <td class="age">*</td> (glob) |
|
402 | 409 | <td class="indexlinks"></td> |
|
403 | 410 | </tr> |
|
404 | 411 | |
|
405 | 412 | <tr class="parity1"> |
|
406 | 413 | <td><a href="/starstar/webdir/b/?style=paper">starstar/webdir/b</a></td> |
|
407 | 414 | <td>unknown</td> |
|
408 | 415 | <td>Foo Bar <foo.bar@example.com></td> |
|
409 | 416 | <td class="age">*</td> (glob) |
|
410 | 417 | <td class="indexlinks"></td> |
|
411 | 418 | </tr> |
|
412 | 419 | |
|
413 | 420 | <tr class="parity0"> |
|
414 | 421 | <td><a href="/starstar/webdir/b/d/?style=paper">starstar/webdir/b/d</a></td> |
|
415 | 422 | <td>unknown</td> |
|
416 | 423 | <td>Foo Bar <foo.bar@example.com></td> |
|
417 | 424 | <td class="age">*</td> (glob) |
|
418 | 425 | <td class="indexlinks"></td> |
|
419 | 426 | </tr> |
|
420 | 427 | |
|
421 | 428 | <tr class="parity1"> |
|
422 | 429 | <td><a href="/starstar/webdir/c/?style=paper">starstar/webdir/c</a></td> |
|
423 | 430 | <td>unknown</td> |
|
424 | 431 | <td>Foo Bar <foo.bar@example.com></td> |
|
425 | 432 | <td class="age">*</td> (glob) |
|
426 | 433 | <td class="indexlinks"></td> |
|
427 | 434 | </tr> |
|
428 | 435 | |
|
429 | 436 | <tr class="parity0"> |
|
430 | 437 | <td><a href="/starstar/webdir/notrepo/e/?style=paper">starstar/webdir/notrepo/e</a></td> |
|
431 | 438 | <td>unknown</td> |
|
432 | 439 | <td>Foo Bar <foo.bar@example.com></td> |
|
433 | 440 | <td class="age">*</td> (glob) |
|
434 | 441 | <td class="indexlinks"></td> |
|
435 | 442 | </tr> |
|
436 | 443 | |
|
437 | 444 | <tr class="parity1"> |
|
438 | 445 | <td><a href="/starstar/webdir/notrepo/e/e2/?style=paper">starstar/webdir/notrepo/e/e2</a></td> |
|
439 | 446 | <td>unknown</td> |
|
440 | 447 | <td>Foo Bar <foo.bar@example.com></td> |
|
441 | 448 | <td class="age">*</td> (glob) |
|
442 | 449 | <td class="indexlinks"></td> |
|
443 | 450 | </tr> |
|
444 | 451 | |
|
445 | 452 | <tr class="parity0"> |
|
446 | 453 | <td><a href="/starstar/webdir/notrepo/f/?style=paper">starstar/webdir/notrepo/f</a></td> |
|
447 | 454 | <td>unknown</td> |
|
448 | 455 | <td>Foo Bar <foo.bar@example.com></td> |
|
449 | 456 | <td class="age">*</td> (glob) |
|
450 | 457 | <td class="indexlinks"></td> |
|
451 | 458 | </tr> |
|
452 | 459 | |
|
453 | 460 | <tr class="parity1"> |
|
454 | 461 | <td><a href="/starstar/webdir/notrepo/f/f2/?style=paper">starstar/webdir/notrepo/f/f2</a></td> |
|
455 | 462 | <td>unknown</td> |
|
456 | 463 | <td>Foo Bar <foo.bar@example.com></td> |
|
457 | 464 | <td class="age">*</td> (glob) |
|
458 | 465 | <td class="indexlinks"></td> |
|
459 | 466 | </tr> |
|
460 | 467 | |
|
461 | 468 | <tr class="parity0"> |
|
462 | 469 | <td><a href="/astar/?style=paper">astar</a></td> |
|
463 | 470 | <td>unknown</td> |
|
464 | 471 | <td>Foo Bar <foo.bar@example.com></td> |
|
465 | 472 | <td class="age">*</td> (glob) |
|
466 | 473 | <td class="indexlinks"></td> |
|
467 | 474 | </tr> |
|
468 | 475 | |
|
469 | 476 | <tr class="parity1"> |
|
470 | 477 | <td><a href="/astar/.hg/patches/?style=paper">astar/.hg/patches</a></td> |
|
471 | 478 | <td>unknown</td> |
|
472 | 479 | <td>Foo Bar <foo.bar@example.com></td> |
|
473 | 480 | <td class="age">*</td> (glob) |
|
474 | 481 | <td class="indexlinks"></td> |
|
475 | 482 | </tr> |
|
476 | 483 | |
|
477 | 484 | </table> |
|
478 | 485 | </div> |
|
479 | 486 | </div> |
|
480 | 487 | <script type="text/javascript">process_dates()</script> |
|
481 | 488 | |
|
482 | 489 | |
|
483 | 490 | </body> |
|
484 | 491 | </html> |
|
485 | 492 | |
|
486 | 493 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw' |
|
487 | 494 | 200 Script output follows |
|
488 | 495 | |
|
489 | 496 | |
|
490 | 497 | /t/a/ |
|
491 | 498 | |
|
492 | 499 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' |
|
493 | 500 | 200 Script output follows |
|
494 | 501 | |
|
495 | 502 | |
|
496 | 503 | /t/a/ |
|
497 | 504 | |
|
498 | 505 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper' |
|
499 | 506 | 200 Script output follows |
|
500 | 507 | |
|
501 | 508 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
502 | 509 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
503 | 510 | <head> |
|
504 | 511 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
505 | 512 | <meta name="robots" content="index, nofollow" /> |
|
506 | 513 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
507 | 514 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
508 | 515 | |
|
509 | 516 | <title>Mercurial repositories index</title> |
|
510 | 517 | </head> |
|
511 | 518 | <body> |
|
512 | 519 | |
|
513 | 520 | <div class="container"> |
|
514 | 521 | <div class="menu"> |
|
515 | 522 | <a href="http://mercurial.selenic.com/"> |
|
516 | 523 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
517 | 524 | </div> |
|
518 | 525 | <div class="main"> |
|
519 | 526 | <h2>Mercurial Repositories</h2> |
|
520 | 527 | |
|
521 | 528 | <table class="bigtable"> |
|
522 | 529 | <tr> |
|
523 | 530 | <th><a href="?sort=name">Name</a></th> |
|
524 | 531 | <th><a href="?sort=description">Description</a></th> |
|
525 | 532 | <th><a href="?sort=contact">Contact</a></th> |
|
526 | 533 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
527 | 534 | <th> </th> |
|
528 | 535 | </tr> |
|
529 | 536 | |
|
530 | 537 | <tr class="parity0"> |
|
531 | 538 | <td><a href="/t/a/?style=paper">a</a></td> |
|
532 | 539 | <td>unknown</td> |
|
533 | 540 | <td>Foo Bar <foo.bar@example.com></td> |
|
534 | 541 | <td class="age">*</td> (glob) |
|
535 | 542 | <td class="indexlinks"></td> |
|
536 | 543 | </tr> |
|
537 | 544 | |
|
538 | 545 | </table> |
|
539 | 546 | </div> |
|
540 | 547 | </div> |
|
541 | 548 | <script type="text/javascript">process_dates()</script> |
|
542 | 549 | |
|
543 | 550 | |
|
544 | 551 | </body> |
|
545 | 552 | </html> |
|
546 | 553 | |
|
547 | 554 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom' |
|
548 | 555 | 200 Script output follows |
|
549 | 556 | |
|
550 | 557 | <?xml version="1.0" encoding="ascii"?> |
|
551 | 558 | <feed xmlns="http://www.w3.org/2005/Atom"> |
|
552 | 559 | <!-- Changelog --> |
|
553 | 560 | <id>http://*:$HGPORT1/t/a/</id> (glob) |
|
554 | 561 | <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob) |
|
555 | 562 | <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob) |
|
556 | 563 | <title>t/a Changelog</title> |
|
557 | 564 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
558 | 565 | |
|
559 | 566 | <entry> |
|
560 | 567 | <title>a</title> |
|
561 | 568 | <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob) |
|
562 | 569 | <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob) |
|
563 | 570 | <author> |
|
564 | 571 | <name>test</name> |
|
565 | 572 | <email>test</email> |
|
566 | 573 | </author> |
|
567 | 574 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
568 | 575 | <published>1970-01-01T00:00:01+00:00</published> |
|
569 | 576 | <content type="xhtml"> |
|
570 | 577 | <div xmlns="http://www.w3.org/1999/xhtml"> |
|
571 | 578 | <pre xml:space="preserve">a</pre> |
|
572 | 579 | </div> |
|
573 | 580 | </content> |
|
574 | 581 | </entry> |
|
575 | 582 | |
|
576 | 583 | </feed> |
|
577 | 584 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom' |
|
578 | 585 | 200 Script output follows |
|
579 | 586 | |
|
580 | 587 | <?xml version="1.0" encoding="ascii"?> |
|
581 | 588 | <feed xmlns="http://www.w3.org/2005/Atom"> |
|
582 | 589 | <!-- Changelog --> |
|
583 | 590 | <id>http://*:$HGPORT1/t/a/</id> (glob) |
|
584 | 591 | <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob) |
|
585 | 592 | <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob) |
|
586 | 593 | <title>t/a Changelog</title> |
|
587 | 594 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
588 | 595 | |
|
589 | 596 | <entry> |
|
590 | 597 | <title>a</title> |
|
591 | 598 | <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob) |
|
592 | 599 | <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob) |
|
593 | 600 | <author> |
|
594 | 601 | <name>test</name> |
|
595 | 602 | <email>test</email> |
|
596 | 603 | </author> |
|
597 | 604 | <updated>1970-01-01T00:00:01+00:00</updated> |
|
598 | 605 | <published>1970-01-01T00:00:01+00:00</published> |
|
599 | 606 | <content type="xhtml"> |
|
600 | 607 | <div xmlns="http://www.w3.org/1999/xhtml"> |
|
601 | 608 | <pre xml:space="preserve">a</pre> |
|
602 | 609 | </div> |
|
603 | 610 | </content> |
|
604 | 611 | </entry> |
|
605 | 612 | |
|
606 | 613 | </feed> |
|
607 | 614 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw' |
|
608 | 615 | 200 Script output follows |
|
609 | 616 | |
|
610 | 617 | a |
|
611 | 618 | |
|
612 | 619 | Test [paths] '*' extension |
|
613 | 620 | |
|
614 | 621 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' |
|
615 | 622 | 200 Script output follows |
|
616 | 623 | |
|
617 | 624 | |
|
618 | 625 | /coll/a/ |
|
619 | 626 | /coll/a/.hg/patches/ |
|
620 | 627 | /coll/b/ |
|
621 | 628 | /coll/c/ |
|
622 | 629 | /coll/notrepo/e/ |
|
623 | 630 | /coll/notrepo/f/ |
|
624 | 631 | |
|
625 | 632 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' |
|
626 | 633 | 200 Script output follows |
|
627 | 634 | |
|
628 | 635 | a |
|
629 | 636 | |
|
630 | 637 | Test [paths] '**' extension |
|
631 | 638 | |
|
632 | 639 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' |
|
633 | 640 | 200 Script output follows |
|
634 | 641 | |
|
635 | 642 | |
|
636 | 643 | /rcoll/a/ |
|
637 | 644 | /rcoll/a/.hg/patches/ |
|
638 | 645 | /rcoll/b/ |
|
639 | 646 | /rcoll/b/d/ |
|
640 | 647 | /rcoll/c/ |
|
641 | 648 | /rcoll/notrepo/e/ |
|
642 | 649 | /rcoll/notrepo/e/e2/ |
|
643 | 650 | /rcoll/notrepo/f/ |
|
644 | 651 | /rcoll/notrepo/f/f2/ |
|
645 | 652 | |
|
646 | 653 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' |
|
647 | 654 | 200 Script output follows |
|
648 | 655 | |
|
649 | 656 | d |
|
650 | 657 | |
|
651 | 658 | Test collapse = True |
|
652 | 659 | |
|
653 | 660 | $ "$TESTDIR/killdaemons.py" |
|
654 | 661 | $ cat >> paths.conf <<EOF |
|
655 | 662 | > [web] |
|
656 | 663 | > collapse=true |
|
657 | 664 | > EOF |
|
658 | 665 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
659 | 666 | > -A access-paths.log -E error-paths-3.log |
|
660 | 667 | $ cat hg.pid >> $DAEMON_PIDS |
|
661 | 668 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' |
|
662 | 669 | 200 Script output follows |
|
663 | 670 | |
|
664 | 671 | |
|
665 | 672 | /coll/a/ |
|
666 | 673 | /coll/a/.hg/patches/ |
|
667 | 674 | /coll/b/ |
|
668 | 675 | /coll/c/ |
|
669 | 676 | /coll/notrepo/ |
|
670 | 677 | |
|
671 | 678 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' |
|
672 | 679 | 200 Script output follows |
|
673 | 680 | |
|
674 | 681 | a |
|
675 | 682 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' |
|
676 | 683 | 200 Script output follows |
|
677 | 684 | |
|
678 | 685 | |
|
679 | 686 | /rcoll/a/ |
|
680 | 687 | /rcoll/a/.hg/patches/ |
|
681 | 688 | /rcoll/b/ |
|
682 | 689 | /rcoll/b/d/ |
|
683 | 690 | /rcoll/c/ |
|
684 | 691 | /rcoll/notrepo/ |
|
685 | 692 | |
|
686 | 693 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' |
|
687 | 694 | 200 Script output follows |
|
688 | 695 | |
|
689 | 696 | d |
|
690 | 697 | |
|
691 | 698 | Test intermediate directories |
|
692 | 699 | |
|
693 | 700 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw' |
|
694 | 701 | 200 Script output follows |
|
695 | 702 | |
|
696 | 703 | |
|
697 | 704 | /rcoll/notrepo/e/ |
|
698 | 705 | /rcoll/notrepo/e/e2/ |
|
699 | 706 | /rcoll/notrepo/f/ |
|
700 | 707 | /rcoll/notrepo/f/f2/ |
|
701 | 708 | |
|
702 | 709 | |
|
703 | 710 | Test repositories inside intermediate directories |
|
704 | 711 | |
|
705 | 712 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw' |
|
706 | 713 | 200 Script output follows |
|
707 | 714 | |
|
708 | 715 | e |
|
709 | 716 | |
|
710 | 717 | Test subrepositories inside intermediate directories |
|
711 | 718 | |
|
712 | 719 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw' |
|
713 | 720 | 200 Script output follows |
|
714 | 721 | |
|
715 | 722 | f2 |
|
716 | 723 | |
|
717 | 724 | Test descend = False |
|
718 | 725 | |
|
719 | 726 | $ "$TESTDIR/killdaemons.py" |
|
720 | 727 | $ cat >> paths.conf <<EOF |
|
721 | 728 | > descend=false |
|
722 | 729 | > EOF |
|
723 | 730 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
724 | 731 | > -A access-paths.log -E error-paths-4.log |
|
725 | 732 | $ cat hg.pid >> $DAEMON_PIDS |
|
726 | 733 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' |
|
727 | 734 | 200 Script output follows |
|
728 | 735 | |
|
729 | 736 | |
|
730 | 737 | /coll/a/ |
|
731 | 738 | /coll/b/ |
|
732 | 739 | /coll/c/ |
|
733 | 740 | |
|
734 | 741 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' |
|
735 | 742 | 200 Script output follows |
|
736 | 743 | |
|
737 | 744 | a |
|
738 | 745 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' |
|
739 | 746 | 200 Script output follows |
|
740 | 747 | |
|
741 | 748 | |
|
742 | 749 | /rcoll/a/ |
|
743 | 750 | /rcoll/b/ |
|
744 | 751 | /rcoll/c/ |
|
745 | 752 | |
|
746 | 753 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' |
|
747 | 754 | 200 Script output follows |
|
748 | 755 | |
|
749 | 756 | d |
|
750 | 757 | |
|
751 | 758 | Test intermediate directories |
|
752 | 759 | |
|
753 | 760 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw' |
|
754 | 761 | 200 Script output follows |
|
755 | 762 | |
|
756 | 763 | |
|
757 | 764 | /rcoll/notrepo/e/ |
|
758 | 765 | /rcoll/notrepo/f/ |
|
759 | 766 | |
|
760 | 767 | |
|
761 | 768 | Test repositories inside intermediate directories |
|
762 | 769 | |
|
763 | 770 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw' |
|
764 | 771 | 200 Script output follows |
|
765 | 772 | |
|
766 | 773 | e |
|
767 | 774 | |
|
768 | 775 | Test subrepositories inside intermediate directories |
|
769 | 776 | |
|
770 | 777 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw' |
|
771 | 778 | 200 Script output follows |
|
772 | 779 | |
|
773 | 780 | f2 |
|
774 | 781 | |
|
775 | 782 | Test [paths] '*' in a repo root |
|
776 | 783 | |
|
777 | 784 | $ hg id http://localhost:$HGPORT1/astar |
|
778 | 785 | 8580ff50825a |
|
779 | 786 | |
|
780 | 787 | $ "$TESTDIR/killdaemons.py" |
|
781 | 788 | $ cat > paths.conf <<EOF |
|
782 | 789 | > [paths] |
|
783 | 790 | > t/a = $root/a |
|
784 | 791 | > t/b = $root/b |
|
785 | 792 | > c = $root/c |
|
786 | 793 | > EOF |
|
787 | 794 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
788 | 795 | > -A access-paths.log -E error-paths-5.log |
|
789 | 796 | $ cat hg.pid >> $DAEMON_PIDS |
|
790 | 797 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
791 | 798 | 200 Script output follows |
|
792 | 799 | |
|
793 | 800 | |
|
794 | 801 | /t/a/ |
|
795 | 802 | /t/b/ |
|
796 | 803 | /c/ |
|
797 | 804 | |
|
798 | 805 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' |
|
799 | 806 | 200 Script output follows |
|
800 | 807 | |
|
801 | 808 | |
|
802 | 809 | /t/a/ |
|
803 | 810 | /t/b/ |
|
804 | 811 | |
|
805 | 812 | |
|
806 | 813 | Test collapse = True |
|
807 | 814 | |
|
808 | 815 | $ "$TESTDIR/killdaemons.py" |
|
809 | 816 | $ cat >> paths.conf <<EOF |
|
810 | 817 | > [web] |
|
811 | 818 | > collapse=true |
|
812 | 819 | > EOF |
|
813 | 820 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
814 | 821 | > -A access-paths.log -E error-paths-6.log |
|
815 | 822 | $ cat hg.pid >> $DAEMON_PIDS |
|
816 | 823 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
817 | 824 | 200 Script output follows |
|
818 | 825 | |
|
819 | 826 | |
|
820 | 827 | /t/ |
|
821 | 828 | /c/ |
|
822 | 829 | |
|
823 | 830 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' |
|
824 | 831 | 200 Script output follows |
|
825 | 832 | |
|
826 | 833 | |
|
827 | 834 | /t/a/ |
|
828 | 835 | /t/b/ |
|
829 | 836 | |
|
830 | 837 | |
|
831 | 838 | test descend = False |
|
832 | 839 | |
|
833 | 840 | $ "$TESTDIR/killdaemons.py" |
|
834 | 841 | $ cat >> paths.conf <<EOF |
|
835 | 842 | > descend=false |
|
836 | 843 | > EOF |
|
837 | 844 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
838 | 845 | > -A access-paths.log -E error-paths-7.log |
|
839 | 846 | $ cat hg.pid >> $DAEMON_PIDS |
|
840 | 847 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
841 | 848 | 200 Script output follows |
|
842 | 849 | |
|
843 | 850 | |
|
844 | 851 | /c/ |
|
845 | 852 | |
|
846 | 853 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' |
|
847 | 854 | 200 Script output follows |
|
848 | 855 | |
|
849 | 856 | |
|
850 | 857 | /t/a/ |
|
851 | 858 | /t/b/ |
|
852 | 859 | |
|
853 | 860 | $ "$TESTDIR/killdaemons.py" |
|
854 | 861 | $ cat > paths.conf <<EOF |
|
855 | 862 | > [paths] |
|
856 | 863 | > nostore = $root/nostore |
|
857 | 864 | > inexistent = $root/inexistent |
|
858 | 865 | > EOF |
|
859 | 866 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ |
|
860 | 867 | > -A access-paths.log -E error-paths-8.log |
|
861 | 868 | $ cat hg.pid >> $DAEMON_PIDS |
|
862 | 869 | |
|
863 | 870 | test inexistent and inaccessible repo should be ignored silently |
|
864 | 871 | |
|
865 | 872 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/' |
|
866 | 873 | 200 Script output follows |
|
867 | 874 | |
|
868 | 875 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
869 | 876 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
870 | 877 | <head> |
|
871 | 878 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
872 | 879 | <meta name="robots" content="index, nofollow" /> |
|
873 | 880 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
874 | 881 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
875 | 882 | |
|
876 | 883 | <title>Mercurial repositories index</title> |
|
877 | 884 | </head> |
|
878 | 885 | <body> |
|
879 | 886 | |
|
880 | 887 | <div class="container"> |
|
881 | 888 | <div class="menu"> |
|
882 | 889 | <a href="http://mercurial.selenic.com/"> |
|
883 | 890 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
884 | 891 | </div> |
|
885 | 892 | <div class="main"> |
|
886 | 893 | <h2>Mercurial Repositories</h2> |
|
887 | 894 | |
|
888 | 895 | <table class="bigtable"> |
|
889 | 896 | <tr> |
|
890 | 897 | <th><a href="?sort=name">Name</a></th> |
|
891 | 898 | <th><a href="?sort=description">Description</a></th> |
|
892 | 899 | <th><a href="?sort=contact">Contact</a></th> |
|
893 | 900 | <th><a href="?sort=lastchange">Last modified</a></th> |
|
894 | 901 | <th> </th> |
|
895 | 902 | </tr> |
|
896 | 903 | |
|
897 | 904 | </table> |
|
898 | 905 | </div> |
|
899 | 906 | </div> |
|
900 | 907 | <script type="text/javascript">process_dates()</script> |
|
901 | 908 | |
|
902 | 909 | |
|
903 | 910 | </body> |
|
904 | 911 | </html> |
|
905 | 912 | |
|
906 | 913 | $ cat > collections.conf <<EOF |
|
907 | 914 | > [collections] |
|
908 | 915 | > $root=$root |
|
909 | 916 | > EOF |
|
910 | 917 | $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \ |
|
911 | 918 | > --pid-file=hg.pid --webdir-conf collections.conf \ |
|
912 | 919 | > -A access-collections.log -E error-collections.log |
|
913 | 920 | $ cat hg.pid >> $DAEMON_PIDS |
|
914 | 921 | |
|
915 | 922 | collections: should succeed |
|
916 | 923 | |
|
917 | 924 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' |
|
918 | 925 | 200 Script output follows |
|
919 | 926 | |
|
920 | 927 | |
|
921 | 928 | /a/ |
|
922 | 929 | /a/.hg/patches/ |
|
923 | 930 | /b/ |
|
924 | 931 | /c/ |
|
925 | 932 | /notrepo/e/ |
|
926 | 933 | /notrepo/f/ |
|
927 | 934 | |
|
928 | 935 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw' |
|
929 | 936 | 200 Script output follows |
|
930 | 937 | |
|
931 | 938 | a |
|
932 | 939 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw' |
|
933 | 940 | 200 Script output follows |
|
934 | 941 | |
|
935 | 942 | b |
|
936 | 943 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw' |
|
937 | 944 | 200 Script output follows |
|
938 | 945 | |
|
939 | 946 | c |
|
940 | 947 | |
|
941 | 948 | atom-log with basedir / |
|
942 | 949 | |
|
943 | 950 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link' |
|
944 | 951 | <link rel="self" href="http://hg.example.com:8080/a/atom-log"/> |
|
945 | 952 | <link rel="alternate" href="http://hg.example.com:8080/a/"/> |
|
946 | 953 | <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/> |
|
947 | 954 | |
|
948 | 955 | rss-log with basedir / |
|
949 | 956 | |
|
950 | 957 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid' |
|
951 | 958 | <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid> |
|
952 | 959 | $ "$TESTDIR/killdaemons.py" |
|
953 | 960 | $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \ |
|
954 | 961 | > --pid-file=hg.pid --webdir-conf collections.conf \ |
|
955 | 962 | > -A access-collections-2.log -E error-collections-2.log |
|
956 | 963 | $ cat hg.pid >> $DAEMON_PIDS |
|
957 | 964 | |
|
958 | 965 | atom-log with basedir /foo/ |
|
959 | 966 | |
|
960 | 967 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link' |
|
961 | 968 | <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/> |
|
962 | 969 | <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/> |
|
963 | 970 | <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/> |
|
964 | 971 | |
|
965 | 972 | rss-log with basedir /foo/ |
|
966 | 973 | |
|
967 | 974 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid' |
|
968 | 975 | <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid> |
|
969 | 976 | |
|
970 | 977 | paths errors 1 |
|
971 | 978 | |
|
972 | 979 | $ cat error-paths-1.log |
|
973 | 980 | |
|
974 | 981 | paths errors 2 |
|
975 | 982 | |
|
976 | 983 | $ cat error-paths-2.log |
|
977 | 984 | |
|
978 | 985 | paths errors 3 |
|
979 | 986 | |
|
980 | 987 | $ cat error-paths-3.log |
|
981 | 988 | |
|
982 | 989 | paths errors 4 |
|
983 | 990 | |
|
984 | 991 | $ cat error-paths-4.log |
|
985 | 992 | |
|
986 | 993 | paths errors 5 |
|
987 | 994 | |
|
988 | 995 | $ cat error-paths-5.log |
|
989 | 996 | |
|
990 | 997 | paths errors 6 |
|
991 | 998 | |
|
992 | 999 | $ cat error-paths-6.log |
|
993 | 1000 | |
|
994 | 1001 | paths errors 7 |
|
995 | 1002 | |
|
996 | 1003 | $ cat error-paths-7.log |
|
997 | 1004 | |
|
998 | 1005 | paths errors 8 |
|
999 | 1006 | |
|
1000 | 1007 | $ cat error-paths-8.log |
|
1001 | 1008 | |
|
1002 | 1009 | collections errors |
|
1003 | 1010 | |
|
1004 | 1011 | $ cat error-collections.log |
|
1005 | 1012 | |
|
1006 | 1013 | collections errors 2 |
|
1007 | 1014 | |
|
1008 | 1015 | $ cat error-collections-2.log |
@@ -1,76 +1,80 b'' | |||
|
1 | 1 | Tests whether or not hgwebdir properly handles various symlink topologies. |
|
2 | 2 | |
|
3 | 3 | $ "$TESTDIR/hghave" serve symlink || exit 80 |
|
4 | ||
|
5 | hide outer repo | |
|
6 | $ hg init | |
|
7 | ||
|
4 | 8 |
$ |
|
5 | 9 | $ echo a > a/a |
|
6 | 10 | $ hg --cwd a ci -Ama -d'1 0' |
|
7 | 11 | adding a |
|
8 | 12 | $ mkdir webdir |
|
9 | 13 | $ cd webdir |
|
10 | 14 | $ hg init b |
|
11 | 15 | $ echo b > b/b |
|
12 | 16 | $ hg --cwd b ci -Amb -d'2 0' |
|
13 | 17 | adding b |
|
14 | 18 | $ hg init c |
|
15 | 19 | $ echo c > c/c |
|
16 | 20 | $ hg --cwd c ci -Amc -d'3 0' |
|
17 | 21 | adding c |
|
18 | 22 | $ ln -s ../a al |
|
19 | 23 | $ ln -s ../webdir circle |
|
20 | 24 | $ root=`pwd` |
|
21 | 25 | $ cd .. |
|
22 | 26 | $ cat > collections.conf <<EOF |
|
23 | 27 | > [collections] |
|
24 | 28 | > $root=$root |
|
25 | 29 | > EOF |
|
26 | 30 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ |
|
27 | 31 | > -A access-collections.log -E error-collections.log |
|
28 | 32 | $ cat hg.pid >> $DAEMON_PIDS |
|
29 | 33 | |
|
30 | 34 | should succeed |
|
31 | 35 | |
|
32 | 36 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' |
|
33 | 37 | 200 Script output follows |
|
34 | 38 | |
|
35 | 39 | |
|
36 | 40 | /al/ |
|
37 | 41 | /b/ |
|
38 | 42 | /c/ |
|
39 | 43 | |
|
40 | 44 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw' |
|
41 | 45 | 200 Script output follows |
|
42 | 46 | |
|
43 | 47 | a |
|
44 | 48 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw' |
|
45 | 49 | 200 Script output follows |
|
46 | 50 | |
|
47 | 51 | b |
|
48 | 52 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw' |
|
49 | 53 | 200 Script output follows |
|
50 | 54 | |
|
51 | 55 | c |
|
52 | 56 | |
|
53 | 57 | should fail |
|
54 | 58 | |
|
55 | 59 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw' |
|
56 | 60 | 404 Not Found |
|
57 | 61 | |
|
58 | 62 | |
|
59 | 63 | error: repository circle/al/file/tip/a not found |
|
60 | 64 | [1] |
|
61 | 65 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw' |
|
62 | 66 | 404 Not Found |
|
63 | 67 | |
|
64 | 68 | |
|
65 | 69 | error: repository circle/b/file/tip/a not found |
|
66 | 70 | [1] |
|
67 | 71 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw' |
|
68 | 72 | 404 Not Found |
|
69 | 73 | |
|
70 | 74 | |
|
71 | 75 | error: repository circle/c/file/tip/a not found |
|
72 | 76 | [1] |
|
73 | 77 | |
|
74 | 78 | collections errors |
|
75 | 79 | |
|
76 | 80 | $ cat error-collections.log |
@@ -1,36 +1,40 b'' | |||
|
1 | 1 | Translations are optional: |
|
2 | 2 | |
|
3 | 3 | $ "$TESTDIR/hghave" gettext || exit 80 |
|
4 | 4 | |
|
5 | #if no-outer-repo | |
|
6 | ||
|
5 | 7 | Test that translations are compiled and installed correctly. |
|
6 | 8 | |
|
7 | 9 | Default encoding in tests is "ascii" and the translation is encoded |
|
8 | 10 | using the "replace" error handler: |
|
9 | 11 | |
|
10 | 12 | $ LANGUAGE=pt_BR hg tip |
|
11 | 13 | abortado: n?o foi encontrado um reposit?rio em '$TESTTMP' (.hg n?o encontrado)! |
|
12 | 14 | [255] |
|
13 | 15 | |
|
14 | 16 | Using a more accomodating encoding: |
|
15 | 17 | |
|
16 | 18 | $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip |
|
17 | 19 | abortado: n\xc3\xa3o foi encontrado um reposit\xc3\xb3rio em '$TESTTMP' (.hg n\xc3\xa3o encontrado)! (esc) |
|
18 | 20 | [255] |
|
19 | 21 | |
|
20 | 22 | Different encoding: |
|
21 | 23 | |
|
22 | 24 | $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip |
|
23 | 25 | abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc) |
|
24 | 26 | [255] |
|
25 | 27 | |
|
28 | #endif | |
|
29 | ||
|
26 | 30 | Test keyword search in translated help text: |
|
27 | 31 | |
|
28 | 32 | $ HGENCODING=UTF-8 LANGUAGE=de hg help -k blΓ€ttern |
|
29 | 33 | Topics: |
|
30 | 34 | |
|
31 | 35 | extensions Benutzung erweiterter Funktionen |
|
32 | 36 | |
|
33 | 37 | Erweiterungen: |
|
34 | 38 | |
|
35 | 39 | pager Verwendet einen externen Pager zum Bl\xc3\xa4ttern in der Ausgabe von Befehlen (esc) |
|
36 | 40 |
@@ -1,1131 +1,1134 b'' | |||
|
1 | 1 | $ "$TESTDIR/hghave" unix-permissions serve || exit 80 |
|
2 | 2 | |
|
3 | 3 | $ cat <<EOF >> $HGRCPATH |
|
4 | 4 | > [extensions] |
|
5 | 5 | > keyword = |
|
6 | 6 | > mq = |
|
7 | 7 | > notify = |
|
8 | 8 | > record = |
|
9 | 9 | > transplant = |
|
10 | 10 | > [ui] |
|
11 | 11 | > interactive = true |
|
12 | 12 | > EOF |
|
13 | 13 | |
|
14 | hide outer repo | |
|
15 | $ hg init | |
|
16 | ||
|
14 | 17 | Run kwdemo before [keyword] files are set up |
|
15 | 18 | as it would succeed without uisetup otherwise |
|
16 | 19 | |
|
17 | 20 | $ hg --quiet kwdemo |
|
18 | 21 | [extensions] |
|
19 | 22 | keyword = |
|
20 | 23 | [keyword] |
|
21 | 24 | demo.txt = |
|
22 | 25 | [keywordset] |
|
23 | 26 | svn = False |
|
24 | 27 | [keywordmaps] |
|
25 | 28 | Author = {author|user} |
|
26 | 29 | Date = {date|utcdate} |
|
27 | 30 | Header = {root}/{file},v {node|short} {date|utcdate} {author|user} |
|
28 | 31 | Id = {file|basename},v {node|short} {date|utcdate} {author|user} |
|
29 | 32 | RCSFile = {file|basename},v |
|
30 | 33 | RCSfile = {file|basename},v |
|
31 | 34 | Revision = {node|short} |
|
32 | 35 | Source = {root}/{file},v |
|
33 | 36 | $Author: test $ |
|
34 | 37 | $Date: ????/??/?? ??:??:?? $ (glob) |
|
35 | 38 | $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
36 | 39 | $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob) |
|
37 | 40 | $RCSFile: demo.txt,v $ |
|
38 | 41 | $RCSfile: demo.txt,v $ |
|
39 | 42 | $Revision: ???????????? $ (glob) |
|
40 | 43 | $Source: */demo.txt,v $ (glob) |
|
41 | 44 | |
|
42 | 45 | $ hg --quiet kwdemo "Branch = {branches}" |
|
43 | 46 | [extensions] |
|
44 | 47 | keyword = |
|
45 | 48 | [keyword] |
|
46 | 49 | demo.txt = |
|
47 | 50 | [keywordset] |
|
48 | 51 | svn = False |
|
49 | 52 | [keywordmaps] |
|
50 | 53 | Branch = {branches} |
|
51 | 54 | $Branch: demobranch $ |
|
52 | 55 | |
|
53 | 56 | $ cat <<EOF >> $HGRCPATH |
|
54 | 57 | > [keyword] |
|
55 | 58 | > ** = |
|
56 | 59 | > b = ignore |
|
57 | 60 | > i = ignore |
|
58 | 61 | > [hooks] |
|
59 | 62 | > EOF |
|
60 | 63 | $ cp $HGRCPATH $HGRCPATH.nohooks |
|
61 | 64 | > cat <<EOF >> $HGRCPATH |
|
62 | 65 | > commit= |
|
63 | 66 | > commit.test=cp a hooktest |
|
64 | 67 | > EOF |
|
65 | 68 | |
|
66 | 69 | $ hg init Test-bndl |
|
67 | 70 | $ cd Test-bndl |
|
68 | 71 | |
|
69 | 72 | kwshrink should exit silently in empty/invalid repo |
|
70 | 73 | |
|
71 | 74 | $ hg kwshrink |
|
72 | 75 | |
|
73 | 76 | Symlinks cannot be created on Windows. |
|
74 | 77 | A bundle to test this was made with: |
|
75 | 78 | hg init t |
|
76 | 79 | cd t |
|
77 | 80 | echo a > a |
|
78 | 81 | ln -s a sym |
|
79 | 82 | hg add sym |
|
80 | 83 | hg ci -m addsym -u mercurial |
|
81 | 84 | hg bundle --base null ../test-keyword.hg |
|
82 | 85 | |
|
83 | 86 | $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg |
|
84 | 87 | pulling from *test-keyword.hg (glob) |
|
85 | 88 | requesting all changes |
|
86 | 89 | adding changesets |
|
87 | 90 | adding manifests |
|
88 | 91 | adding file changes |
|
89 | 92 | added 1 changesets with 1 changes to 1 files |
|
90 | 93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 94 | |
|
92 | 95 | $ echo 'expand $Id$' > a |
|
93 | 96 | $ echo 'do not process $Id:' >> a |
|
94 | 97 | $ echo 'xxx $' >> a |
|
95 | 98 | $ echo 'ignore $Id$' > b |
|
96 | 99 | |
|
97 | 100 | Output files as they were created |
|
98 | 101 | |
|
99 | 102 | $ cat a b |
|
100 | 103 | expand $Id$ |
|
101 | 104 | do not process $Id: |
|
102 | 105 | xxx $ |
|
103 | 106 | ignore $Id$ |
|
104 | 107 | |
|
105 | 108 | no kwfiles |
|
106 | 109 | |
|
107 | 110 | $ hg kwfiles |
|
108 | 111 | |
|
109 | 112 | untracked candidates |
|
110 | 113 | |
|
111 | 114 | $ hg -v kwfiles --unknown |
|
112 | 115 | k a |
|
113 | 116 | |
|
114 | 117 | Add files and check status |
|
115 | 118 | |
|
116 | 119 | $ hg addremove |
|
117 | 120 | adding a |
|
118 | 121 | adding b |
|
119 | 122 | $ hg status |
|
120 | 123 | A a |
|
121 | 124 | A b |
|
122 | 125 | |
|
123 | 126 | |
|
124 | 127 | Default keyword expansion including commit hook |
|
125 | 128 | Interrupted commit should not change state or run commit hook |
|
126 | 129 | |
|
127 | 130 | $ hg --debug commit |
|
128 | 131 | abort: empty commit message |
|
129 | 132 | [255] |
|
130 | 133 | $ hg status |
|
131 | 134 | A a |
|
132 | 135 | A b |
|
133 | 136 | |
|
134 | 137 | Commit with several checks |
|
135 | 138 | |
|
136 | 139 | $ hg --debug commit -mabsym -u 'User Name <user@example.com>' |
|
137 | 140 | a |
|
138 | 141 | b |
|
139 | 142 | overwriting a expanding keywords |
|
140 | 143 | running hook commit.test: cp a hooktest |
|
141 | 144 | committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
142 | 145 | $ hg status |
|
143 | 146 | ? hooktest |
|
144 | 147 | $ hg debugrebuildstate |
|
145 | 148 | $ hg --quiet identify |
|
146 | 149 | ef63ca68695b |
|
147 | 150 | |
|
148 | 151 | cat files in working directory with keywords expanded |
|
149 | 152 | |
|
150 | 153 | $ cat a b |
|
151 | 154 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
152 | 155 | do not process $Id: |
|
153 | 156 | xxx $ |
|
154 | 157 | ignore $Id$ |
|
155 | 158 | |
|
156 | 159 | hg cat files and symlink, no expansion |
|
157 | 160 | |
|
158 | 161 | $ hg cat sym a b && echo |
|
159 | 162 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
160 | 163 | do not process $Id: |
|
161 | 164 | xxx $ |
|
162 | 165 | ignore $Id$ |
|
163 | 166 | a |
|
164 | 167 | |
|
165 | 168 | $ diff a hooktest |
|
166 | 169 | |
|
167 | 170 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
168 | 171 | $ rm hooktest |
|
169 | 172 | |
|
170 | 173 | hg status of kw-ignored binary file starting with '\1\n' |
|
171 | 174 | |
|
172 | 175 | >>> open("i", "wb").write("\1\nfoo") |
|
173 | 176 | $ hg -q commit -Am metasep i |
|
174 | 177 | $ hg status |
|
175 | 178 | >>> open("i", "wb").write("\1\nbar") |
|
176 | 179 | $ hg status |
|
177 | 180 | M i |
|
178 | 181 | $ hg -q commit -m "modify metasep" i |
|
179 | 182 | $ hg status --rev 2:3 |
|
180 | 183 | M i |
|
181 | 184 | $ touch empty |
|
182 | 185 | $ hg -q commit -A -m "another file" |
|
183 | 186 | $ hg status -A --rev 3:4 i |
|
184 | 187 | C i |
|
185 | 188 | |
|
186 | 189 | $ hg -q strip -n 2 |
|
187 | 190 | |
|
188 | 191 | Test hook execution |
|
189 | 192 | |
|
190 | 193 | bundle |
|
191 | 194 | |
|
192 | 195 | $ hg bundle --base null ../kw.hg |
|
193 | 196 | 2 changesets found |
|
194 | 197 | $ cd .. |
|
195 | 198 | $ hg init Test |
|
196 | 199 | $ cd Test |
|
197 | 200 | |
|
198 | 201 | Notify on pull to check whether keywords stay as is in email |
|
199 | 202 | ie. if patch.diff wrapper acts as it should |
|
200 | 203 | |
|
201 | 204 | $ cat <<EOF >> $HGRCPATH |
|
202 | 205 | > [hooks] |
|
203 | 206 | > incoming.notify = python:hgext.notify.hook |
|
204 | 207 | > [notify] |
|
205 | 208 | > sources = pull |
|
206 | 209 | > diffstat = False |
|
207 | 210 | > maxsubject = 15 |
|
208 | 211 | > [reposubs] |
|
209 | 212 | > * = Test |
|
210 | 213 | > EOF |
|
211 | 214 | |
|
212 | 215 | Pull from bundle and trigger notify |
|
213 | 216 | |
|
214 | 217 | $ hg pull -u ../kw.hg |
|
215 | 218 | pulling from ../kw.hg |
|
216 | 219 | requesting all changes |
|
217 | 220 | adding changesets |
|
218 | 221 | adding manifests |
|
219 | 222 | adding file changes |
|
220 | 223 | added 2 changesets with 3 changes to 3 files |
|
221 | 224 | Content-Type: text/plain; charset="us-ascii" |
|
222 | 225 | MIME-Version: 1.0 |
|
223 | 226 | Content-Transfer-Encoding: 7bit |
|
224 | 227 | Date: * (glob) |
|
225 | 228 | Subject: changeset in... |
|
226 | 229 | From: mercurial |
|
227 | 230 | X-Hg-Notification: changeset a2392c293916 |
|
228 | 231 | Message-Id: <hg.a2392c293916*> (glob) |
|
229 | 232 | To: Test |
|
230 | 233 | |
|
231 | 234 | changeset a2392c293916 in $TESTTMP/Test (glob) |
|
232 | 235 | details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 |
|
233 | 236 | description: |
|
234 | 237 | addsym |
|
235 | 238 | |
|
236 | 239 | diffs (6 lines): |
|
237 | 240 | |
|
238 | 241 | diff -r 000000000000 -r a2392c293916 sym |
|
239 | 242 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
240 | 243 | +++ b/sym Sat Feb 09 20:25:47 2008 +0100 |
|
241 | 244 | @@ -0,0 +1,1 @@ |
|
242 | 245 | +a |
|
243 | 246 | \ No newline at end of file |
|
244 | 247 | Content-Type: text/plain; charset="us-ascii" |
|
245 | 248 | MIME-Version: 1.0 |
|
246 | 249 | Content-Transfer-Encoding: 7bit |
|
247 | 250 | Date:* (glob) |
|
248 | 251 | Subject: changeset in... |
|
249 | 252 | From: User Name <user@example.com> |
|
250 | 253 | X-Hg-Notification: changeset ef63ca68695b |
|
251 | 254 | Message-Id: <hg.ef63ca68695b*> (glob) |
|
252 | 255 | To: Test |
|
253 | 256 | |
|
254 | 257 | changeset ef63ca68695b in $TESTTMP/Test (glob) |
|
255 | 258 | details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b |
|
256 | 259 | description: |
|
257 | 260 | absym |
|
258 | 261 | |
|
259 | 262 | diffs (12 lines): |
|
260 | 263 | |
|
261 | 264 | diff -r a2392c293916 -r ef63ca68695b a |
|
262 | 265 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
263 | 266 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
264 | 267 | @@ -0,0 +1,3 @@ |
|
265 | 268 | +expand $Id$ |
|
266 | 269 | +do not process $Id: |
|
267 | 270 | +xxx $ |
|
268 | 271 | diff -r a2392c293916 -r ef63ca68695b b |
|
269 | 272 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
270 | 273 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
271 | 274 | @@ -0,0 +1,1 @@ |
|
272 | 275 | +ignore $Id$ |
|
273 | 276 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
274 | 277 | |
|
275 | 278 | $ cp $HGRCPATH.nohooks $HGRCPATH |
|
276 | 279 | |
|
277 | 280 | Touch files and check with status |
|
278 | 281 | |
|
279 | 282 | $ touch a b |
|
280 | 283 | $ hg status |
|
281 | 284 | |
|
282 | 285 | Update and expand |
|
283 | 286 | |
|
284 | 287 | $ rm sym a b |
|
285 | 288 | $ hg update -C |
|
286 | 289 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 290 | $ cat a b |
|
288 | 291 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
289 | 292 | do not process $Id: |
|
290 | 293 | xxx $ |
|
291 | 294 | ignore $Id$ |
|
292 | 295 | |
|
293 | 296 | Check whether expansion is filewise and file mode is preserved |
|
294 | 297 | |
|
295 | 298 | $ echo '$Id$' > c |
|
296 | 299 | $ echo 'tests for different changenodes' >> c |
|
297 | 300 | $ chmod 600 c |
|
298 | 301 | $ ls -l c | cut -b 1-10 |
|
299 | 302 | -rw------- |
|
300 | 303 | |
|
301 | 304 | commit file c |
|
302 | 305 | |
|
303 | 306 | $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>' |
|
304 | 307 | adding c |
|
305 | 308 | $ ls -l c | cut -b 1-10 |
|
306 | 309 | -rw------- |
|
307 | 310 | |
|
308 | 311 | force expansion |
|
309 | 312 | |
|
310 | 313 | $ hg -v kwexpand |
|
311 | 314 | overwriting a expanding keywords |
|
312 | 315 | overwriting c expanding keywords |
|
313 | 316 | |
|
314 | 317 | compare changenodes in a and c |
|
315 | 318 | |
|
316 | 319 | $ cat a c |
|
317 | 320 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
318 | 321 | do not process $Id: |
|
319 | 322 | xxx $ |
|
320 | 323 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
321 | 324 | tests for different changenodes |
|
322 | 325 | |
|
323 | 326 | record |
|
324 | 327 | |
|
325 | 328 | $ echo '$Id$' > r |
|
326 | 329 | $ hg add r |
|
327 | 330 | |
|
328 | 331 | record chunk |
|
329 | 332 | |
|
330 | 333 | >>> lines = open('a').readlines() |
|
331 | 334 | >>> lines.insert(1, 'foo\n') |
|
332 | 335 | >>> lines.append('bar\n') |
|
333 | 336 | >>> open('a', 'w').writelines(lines) |
|
334 | 337 | $ hg record -d '1 10' -m rectest a<<EOF |
|
335 | 338 | > y |
|
336 | 339 | > y |
|
337 | 340 | > n |
|
338 | 341 | > EOF |
|
339 | 342 | diff --git a/a b/a |
|
340 | 343 | 2 hunks, 2 lines changed |
|
341 | 344 | examine changes to 'a'? [Ynesfdaq?] |
|
342 | 345 | @@ -1,3 +1,4 @@ |
|
343 | 346 | expand $Id$ |
|
344 | 347 | +foo |
|
345 | 348 | do not process $Id: |
|
346 | 349 | xxx $ |
|
347 | 350 | record change 1/2 to 'a'? [Ynesfdaq?] |
|
348 | 351 | @@ -2,2 +3,3 @@ |
|
349 | 352 | do not process $Id: |
|
350 | 353 | xxx $ |
|
351 | 354 | +bar |
|
352 | 355 | record change 2/2 to 'a'? [Ynesfdaq?] |
|
353 | 356 | |
|
354 | 357 | $ hg identify |
|
355 | 358 | d17e03c92c97+ tip |
|
356 | 359 | $ hg status |
|
357 | 360 | M a |
|
358 | 361 | A r |
|
359 | 362 | |
|
360 | 363 | Cat modified file a |
|
361 | 364 | |
|
362 | 365 | $ cat a |
|
363 | 366 | expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $ |
|
364 | 367 | foo |
|
365 | 368 | do not process $Id: |
|
366 | 369 | xxx $ |
|
367 | 370 | bar |
|
368 | 371 | |
|
369 | 372 | Diff remaining chunk |
|
370 | 373 | |
|
371 | 374 | $ hg diff a |
|
372 | 375 | diff -r d17e03c92c97 a |
|
373 | 376 | --- a/a Wed Dec 31 23:59:51 1969 -0000 |
|
374 | 377 | +++ b/a * (glob) |
|
375 | 378 | @@ -2,3 +2,4 @@ |
|
376 | 379 | foo |
|
377 | 380 | do not process $Id: |
|
378 | 381 | xxx $ |
|
379 | 382 | +bar |
|
380 | 383 | |
|
381 | 384 | $ hg rollback |
|
382 | 385 | repository tip rolled back to revision 2 (undo commit) |
|
383 | 386 | working directory now based on revision 2 |
|
384 | 387 | |
|
385 | 388 | Record all chunks in file a |
|
386 | 389 | |
|
387 | 390 | $ echo foo > msg |
|
388 | 391 | |
|
389 | 392 | - do not use "hg record -m" here! |
|
390 | 393 | |
|
391 | 394 | $ hg record -l msg -d '1 11' a<<EOF |
|
392 | 395 | > y |
|
393 | 396 | > y |
|
394 | 397 | > y |
|
395 | 398 | > EOF |
|
396 | 399 | diff --git a/a b/a |
|
397 | 400 | 2 hunks, 2 lines changed |
|
398 | 401 | examine changes to 'a'? [Ynesfdaq?] |
|
399 | 402 | @@ -1,3 +1,4 @@ |
|
400 | 403 | expand $Id$ |
|
401 | 404 | +foo |
|
402 | 405 | do not process $Id: |
|
403 | 406 | xxx $ |
|
404 | 407 | record change 1/2 to 'a'? [Ynesfdaq?] |
|
405 | 408 | @@ -2,2 +3,3 @@ |
|
406 | 409 | do not process $Id: |
|
407 | 410 | xxx $ |
|
408 | 411 | +bar |
|
409 | 412 | record change 2/2 to 'a'? [Ynesfdaq?] |
|
410 | 413 | |
|
411 | 414 | File a should be clean |
|
412 | 415 | |
|
413 | 416 | $ hg status -A a |
|
414 | 417 | C a |
|
415 | 418 | |
|
416 | 419 | rollback and revert expansion |
|
417 | 420 | |
|
418 | 421 | $ cat a |
|
419 | 422 | expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $ |
|
420 | 423 | foo |
|
421 | 424 | do not process $Id: |
|
422 | 425 | xxx $ |
|
423 | 426 | bar |
|
424 | 427 | $ hg --verbose rollback |
|
425 | 428 | repository tip rolled back to revision 2 (undo commit) |
|
426 | 429 | working directory now based on revision 2 |
|
427 | 430 | overwriting a expanding keywords |
|
428 | 431 | $ hg status a |
|
429 | 432 | M a |
|
430 | 433 | $ cat a |
|
431 | 434 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
432 | 435 | foo |
|
433 | 436 | do not process $Id: |
|
434 | 437 | xxx $ |
|
435 | 438 | bar |
|
436 | 439 | $ echo '$Id$' > y |
|
437 | 440 | $ echo '$Id$' > z |
|
438 | 441 | $ hg add y |
|
439 | 442 | $ hg commit -Am "rollback only" z |
|
440 | 443 | $ cat z |
|
441 | 444 | $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ |
|
442 | 445 | $ hg --verbose rollback |
|
443 | 446 | repository tip rolled back to revision 2 (undo commit) |
|
444 | 447 | working directory now based on revision 2 |
|
445 | 448 | overwriting z shrinking keywords |
|
446 | 449 | |
|
447 | 450 | Only z should be overwritten |
|
448 | 451 | |
|
449 | 452 | $ hg status a y z |
|
450 | 453 | M a |
|
451 | 454 | A y |
|
452 | 455 | A z |
|
453 | 456 | $ cat z |
|
454 | 457 | $Id$ |
|
455 | 458 | $ hg forget y z |
|
456 | 459 | $ rm y z |
|
457 | 460 | |
|
458 | 461 | record added file alone |
|
459 | 462 | |
|
460 | 463 | $ hg -v record -l msg -d '1 12' r<<EOF |
|
461 | 464 | > y |
|
462 | 465 | > EOF |
|
463 | 466 | diff --git a/r b/r |
|
464 | 467 | new file mode 100644 |
|
465 | 468 | examine changes to 'r'? [Ynesfdaq?] |
|
466 | 469 | r |
|
467 | 470 | committed changeset 3:899491280810 |
|
468 | 471 | overwriting r expanding keywords |
|
469 | 472 | - status call required for dirstate.normallookup() check |
|
470 | 473 | $ hg status r |
|
471 | 474 | $ hg --verbose rollback |
|
472 | 475 | repository tip rolled back to revision 2 (undo commit) |
|
473 | 476 | working directory now based on revision 2 |
|
474 | 477 | overwriting r shrinking keywords |
|
475 | 478 | $ hg forget r |
|
476 | 479 | $ rm msg r |
|
477 | 480 | $ hg update -C |
|
478 | 481 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
479 | 482 | |
|
480 | 483 | record added keyword ignored file |
|
481 | 484 | |
|
482 | 485 | $ echo '$Id$' > i |
|
483 | 486 | $ hg add i |
|
484 | 487 | $ hg --verbose record -d '1 13' -m recignored<<EOF |
|
485 | 488 | > y |
|
486 | 489 | > EOF |
|
487 | 490 | diff --git a/i b/i |
|
488 | 491 | new file mode 100644 |
|
489 | 492 | examine changes to 'i'? [Ynesfdaq?] |
|
490 | 493 | i |
|
491 | 494 | committed changeset 3:5f40fe93bbdc |
|
492 | 495 | $ cat i |
|
493 | 496 | $Id$ |
|
494 | 497 | $ hg -q rollback |
|
495 | 498 | $ hg forget i |
|
496 | 499 | $ rm i |
|
497 | 500 | |
|
498 | 501 | amend |
|
499 | 502 | |
|
500 | 503 | $ echo amend >> a |
|
501 | 504 | $ echo amend >> b |
|
502 | 505 | $ hg -q commit -d '1 14' -m 'prepare amend' |
|
503 | 506 | |
|
504 | 507 | $ hg --debug commit --amend -d '1 15' -m 'amend without changes' | grep keywords |
|
505 | 508 | invalidating branch cache (tip differs) |
|
506 | 509 | overwriting a expanding keywords |
|
507 | 510 | $ hg -q id |
|
508 | 511 | a71343332ea9 |
|
509 | 512 | $ head -1 a |
|
510 | 513 | expand $Id: a,v a71343332ea9 1970/01/01 00:00:01 test $ |
|
511 | 514 | |
|
512 | 515 | $ hg -q strip -n tip |
|
513 | 516 | |
|
514 | 517 | Test patch queue repo |
|
515 | 518 | |
|
516 | 519 | $ hg init --mq |
|
517 | 520 | $ hg qimport -r tip -n mqtest.diff |
|
518 | 521 | $ hg commit --mq -m mqtest |
|
519 | 522 | |
|
520 | 523 | Keywords should not be expanded in patch |
|
521 | 524 | |
|
522 | 525 | $ cat .hg/patches/mqtest.diff |
|
523 | 526 | # HG changeset patch |
|
524 | 527 | # User User Name <user@example.com> |
|
525 | 528 | # Date 1 0 |
|
526 | 529 | # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad |
|
527 | 530 | # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 |
|
528 | 531 | cndiff |
|
529 | 532 | |
|
530 | 533 | diff -r ef63ca68695b -r 40a904bbbe4c c |
|
531 | 534 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
532 | 535 | +++ b/c Thu Jan 01 00:00:01 1970 +0000 |
|
533 | 536 | @@ -0,0 +1,2 @@ |
|
534 | 537 | +$Id$ |
|
535 | 538 | +tests for different changenodes |
|
536 | 539 | |
|
537 | 540 | $ hg qpop |
|
538 | 541 | popping mqtest.diff |
|
539 | 542 | patch queue now empty |
|
540 | 543 | |
|
541 | 544 | qgoto, implying qpush, should expand |
|
542 | 545 | |
|
543 | 546 | $ hg qgoto mqtest.diff |
|
544 | 547 | applying mqtest.diff |
|
545 | 548 | now at: mqtest.diff |
|
546 | 549 | $ cat c |
|
547 | 550 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
548 | 551 | tests for different changenodes |
|
549 | 552 | $ hg cat c |
|
550 | 553 | $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $ |
|
551 | 554 | tests for different changenodes |
|
552 | 555 | |
|
553 | 556 | Keywords should not be expanded in filelog |
|
554 | 557 | |
|
555 | 558 | $ hg --config 'extensions.keyword=!' cat c |
|
556 | 559 | $Id$ |
|
557 | 560 | tests for different changenodes |
|
558 | 561 | |
|
559 | 562 | qpop and move on |
|
560 | 563 | |
|
561 | 564 | $ hg qpop |
|
562 | 565 | popping mqtest.diff |
|
563 | 566 | patch queue now empty |
|
564 | 567 | |
|
565 | 568 | Copy and show added kwfiles |
|
566 | 569 | |
|
567 | 570 | $ hg cp a c |
|
568 | 571 | $ hg kwfiles |
|
569 | 572 | a |
|
570 | 573 | c |
|
571 | 574 | |
|
572 | 575 | Commit and show expansion in original and copy |
|
573 | 576 | |
|
574 | 577 | $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>' |
|
575 | 578 | c |
|
576 | 579 | c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 |
|
577 | 580 | removing unknown node 40a904bbbe4c from 1-phase boundary |
|
578 | 581 | overwriting c expanding keywords |
|
579 | 582 | committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d |
|
580 | 583 | $ cat a c |
|
581 | 584 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
582 | 585 | do not process $Id: |
|
583 | 586 | xxx $ |
|
584 | 587 | expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $ |
|
585 | 588 | do not process $Id: |
|
586 | 589 | xxx $ |
|
587 | 590 | |
|
588 | 591 | Touch copied c and check its status |
|
589 | 592 | |
|
590 | 593 | $ touch c |
|
591 | 594 | $ hg status |
|
592 | 595 | |
|
593 | 596 | Copy kwfile to keyword ignored file unexpanding keywords |
|
594 | 597 | |
|
595 | 598 | $ hg --verbose copy a i |
|
596 | 599 | copying a to i |
|
597 | 600 | overwriting i shrinking keywords |
|
598 | 601 | $ head -n 1 i |
|
599 | 602 | expand $Id$ |
|
600 | 603 | $ hg forget i |
|
601 | 604 | $ rm i |
|
602 | 605 | |
|
603 | 606 | Copy ignored file to ignored file: no overwriting |
|
604 | 607 | |
|
605 | 608 | $ hg --verbose copy b i |
|
606 | 609 | copying b to i |
|
607 | 610 | $ hg forget i |
|
608 | 611 | $ rm i |
|
609 | 612 | |
|
610 | 613 | cp symlink file; hg cp -A symlink file (part1) |
|
611 | 614 | - copied symlink points to kwfile: overwrite |
|
612 | 615 | |
|
613 | 616 | $ cp sym i |
|
614 | 617 | $ ls -l i |
|
615 | 618 | -rw-r--r--* (glob) |
|
616 | 619 | $ head -1 i |
|
617 | 620 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
618 | 621 | $ hg copy --after --verbose sym i |
|
619 | 622 | copying sym to i |
|
620 | 623 | overwriting i shrinking keywords |
|
621 | 624 | $ head -1 i |
|
622 | 625 | expand $Id$ |
|
623 | 626 | $ hg forget i |
|
624 | 627 | $ rm i |
|
625 | 628 | |
|
626 | 629 | Test different options of hg kwfiles |
|
627 | 630 | |
|
628 | 631 | $ hg kwfiles |
|
629 | 632 | a |
|
630 | 633 | c |
|
631 | 634 | $ hg -v kwfiles --ignore |
|
632 | 635 | I b |
|
633 | 636 | I sym |
|
634 | 637 | $ hg kwfiles --all |
|
635 | 638 | K a |
|
636 | 639 | K c |
|
637 | 640 | I b |
|
638 | 641 | I sym |
|
639 | 642 | |
|
640 | 643 | Diff specific revision |
|
641 | 644 | |
|
642 | 645 | $ hg diff --rev 1 |
|
643 | 646 | diff -r ef63ca68695b c |
|
644 | 647 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
645 | 648 | +++ b/c * (glob) |
|
646 | 649 | @@ -0,0 +1,3 @@ |
|
647 | 650 | +expand $Id$ |
|
648 | 651 | +do not process $Id: |
|
649 | 652 | +xxx $ |
|
650 | 653 | |
|
651 | 654 | Status after rollback: |
|
652 | 655 | |
|
653 | 656 | $ hg rollback |
|
654 | 657 | repository tip rolled back to revision 1 (undo commit) |
|
655 | 658 | working directory now based on revision 1 |
|
656 | 659 | $ hg status |
|
657 | 660 | A c |
|
658 | 661 | $ hg update --clean |
|
659 | 662 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
660 | 663 | |
|
661 | 664 | #if symlink |
|
662 | 665 | |
|
663 | 666 | cp symlink file; hg cp -A symlink file (part2) |
|
664 | 667 | - copied symlink points to kw ignored file: do not overwrite |
|
665 | 668 | |
|
666 | 669 | $ cat a > i |
|
667 | 670 | $ ln -s i symignored |
|
668 | 671 | $ hg commit -Am 'fake expansion in ignored and symlink' i symignored |
|
669 | 672 | $ cp symignored x |
|
670 | 673 | $ hg copy --after --verbose symignored x |
|
671 | 674 | copying symignored to x |
|
672 | 675 | $ head -n 1 x |
|
673 | 676 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
674 | 677 | $ hg forget x |
|
675 | 678 | $ rm x |
|
676 | 679 | |
|
677 | 680 | $ hg rollback |
|
678 | 681 | repository tip rolled back to revision 1 (undo commit) |
|
679 | 682 | working directory now based on revision 1 |
|
680 | 683 | $ hg update --clean |
|
681 | 684 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
682 | 685 | $ rm i symignored |
|
683 | 686 | |
|
684 | 687 | #endif |
|
685 | 688 | |
|
686 | 689 | Custom keywordmaps as argument to kwdemo |
|
687 | 690 | |
|
688 | 691 | $ hg --quiet kwdemo "Xinfo = {author}: {desc}" |
|
689 | 692 | [extensions] |
|
690 | 693 | keyword = |
|
691 | 694 | [keyword] |
|
692 | 695 | ** = |
|
693 | 696 | b = ignore |
|
694 | 697 | demo.txt = |
|
695 | 698 | i = ignore |
|
696 | 699 | [keywordset] |
|
697 | 700 | svn = False |
|
698 | 701 | [keywordmaps] |
|
699 | 702 | Xinfo = {author}: {desc} |
|
700 | 703 | $Xinfo: test: hg keyword configuration and expansion example $ |
|
701 | 704 | |
|
702 | 705 | Configure custom keywordmaps |
|
703 | 706 | |
|
704 | 707 | $ cat <<EOF >>$HGRCPATH |
|
705 | 708 | > [keywordmaps] |
|
706 | 709 | > Id = {file} {node|short} {date|rfc822date} {author|user} |
|
707 | 710 | > Xinfo = {author}: {desc} |
|
708 | 711 | > EOF |
|
709 | 712 | |
|
710 | 713 | Cat and hg cat files before custom expansion |
|
711 | 714 | |
|
712 | 715 | $ cat a b |
|
713 | 716 | expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $ |
|
714 | 717 | do not process $Id: |
|
715 | 718 | xxx $ |
|
716 | 719 | ignore $Id$ |
|
717 | 720 | $ hg cat sym a b && echo |
|
718 | 721 | expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $ |
|
719 | 722 | do not process $Id: |
|
720 | 723 | xxx $ |
|
721 | 724 | ignore $Id$ |
|
722 | 725 | a |
|
723 | 726 | |
|
724 | 727 | Write custom keyword and prepare multiline commit message |
|
725 | 728 | |
|
726 | 729 | $ echo '$Xinfo$' >> a |
|
727 | 730 | $ cat <<EOF >> log |
|
728 | 731 | > firstline |
|
729 | 732 | > secondline |
|
730 | 733 | > EOF |
|
731 | 734 | |
|
732 | 735 | Interrupted commit should not change state |
|
733 | 736 | |
|
734 | 737 | $ hg commit |
|
735 | 738 | abort: empty commit message |
|
736 | 739 | [255] |
|
737 | 740 | $ hg status |
|
738 | 741 | M a |
|
739 | 742 | ? c |
|
740 | 743 | ? log |
|
741 | 744 | |
|
742 | 745 | Commit with multiline message and custom expansion |
|
743 | 746 | |
|
744 | 747 | $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>' |
|
745 | 748 | a |
|
746 | 749 | removing unknown node 40a904bbbe4c from 1-phase boundary |
|
747 | 750 | overwriting a expanding keywords |
|
748 | 751 | committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
749 | 752 | $ rm log |
|
750 | 753 | |
|
751 | 754 | Stat, verify and show custom expansion (firstline) |
|
752 | 755 | |
|
753 | 756 | $ hg status |
|
754 | 757 | ? c |
|
755 | 758 | $ hg verify |
|
756 | 759 | checking changesets |
|
757 | 760 | checking manifests |
|
758 | 761 | crosschecking files in changesets and manifests |
|
759 | 762 | checking files |
|
760 | 763 | 3 files, 3 changesets, 4 total revisions |
|
761 | 764 | $ cat a b |
|
762 | 765 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
763 | 766 | do not process $Id: |
|
764 | 767 | xxx $ |
|
765 | 768 | $Xinfo: User Name <user@example.com>: firstline $ |
|
766 | 769 | ignore $Id$ |
|
767 | 770 | $ hg cat sym a b && echo |
|
768 | 771 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
769 | 772 | do not process $Id: |
|
770 | 773 | xxx $ |
|
771 | 774 | $Xinfo: User Name <user@example.com>: firstline $ |
|
772 | 775 | ignore $Id$ |
|
773 | 776 | a |
|
774 | 777 | |
|
775 | 778 | annotate |
|
776 | 779 | |
|
777 | 780 | $ hg annotate a |
|
778 | 781 | 1: expand $Id$ |
|
779 | 782 | 1: do not process $Id: |
|
780 | 783 | 1: xxx $ |
|
781 | 784 | 2: $Xinfo$ |
|
782 | 785 | |
|
783 | 786 | remove with status checks |
|
784 | 787 | |
|
785 | 788 | $ hg debugrebuildstate |
|
786 | 789 | $ hg remove a |
|
787 | 790 | $ hg --debug commit -m rma |
|
788 | 791 | committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012 |
|
789 | 792 | $ hg status |
|
790 | 793 | ? c |
|
791 | 794 | |
|
792 | 795 | Rollback, revert, and check expansion |
|
793 | 796 | |
|
794 | 797 | $ hg rollback |
|
795 | 798 | repository tip rolled back to revision 2 (undo commit) |
|
796 | 799 | working directory now based on revision 2 |
|
797 | 800 | $ hg status |
|
798 | 801 | R a |
|
799 | 802 | ? c |
|
800 | 803 | $ hg revert --no-backup --rev tip a |
|
801 | 804 | $ cat a |
|
802 | 805 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
803 | 806 | do not process $Id: |
|
804 | 807 | xxx $ |
|
805 | 808 | $Xinfo: User Name <user@example.com>: firstline $ |
|
806 | 809 | |
|
807 | 810 | Clone to test global and local configurations |
|
808 | 811 | |
|
809 | 812 | $ cd .. |
|
810 | 813 | |
|
811 | 814 | Expansion in destinaton with global configuration |
|
812 | 815 | |
|
813 | 816 | $ hg --quiet clone Test globalconf |
|
814 | 817 | $ cat globalconf/a |
|
815 | 818 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
816 | 819 | do not process $Id: |
|
817 | 820 | xxx $ |
|
818 | 821 | $Xinfo: User Name <user@example.com>: firstline $ |
|
819 | 822 | |
|
820 | 823 | No expansion in destination with local configuration in origin only |
|
821 | 824 | |
|
822 | 825 | $ hg --quiet --config 'keyword.**=ignore' clone Test localconf |
|
823 | 826 | $ cat localconf/a |
|
824 | 827 | expand $Id$ |
|
825 | 828 | do not process $Id: |
|
826 | 829 | xxx $ |
|
827 | 830 | $Xinfo$ |
|
828 | 831 | |
|
829 | 832 | Clone to test incoming |
|
830 | 833 | |
|
831 | 834 | $ hg clone -r1 Test Test-a |
|
832 | 835 | adding changesets |
|
833 | 836 | adding manifests |
|
834 | 837 | adding file changes |
|
835 | 838 | added 2 changesets with 3 changes to 3 files |
|
836 | 839 | updating to branch default |
|
837 | 840 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
838 | 841 | $ cd Test-a |
|
839 | 842 | $ cat <<EOF >> .hg/hgrc |
|
840 | 843 | > [paths] |
|
841 | 844 | > default = ../Test |
|
842 | 845 | > EOF |
|
843 | 846 | $ hg incoming |
|
844 | 847 | comparing with $TESTTMP/Test (glob) |
|
845 | 848 | searching for changes |
|
846 | 849 | changeset: 2:bb948857c743 |
|
847 | 850 | tag: tip |
|
848 | 851 | user: User Name <user@example.com> |
|
849 | 852 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
850 | 853 | summary: firstline |
|
851 | 854 | |
|
852 | 855 | Imported patch should not be rejected |
|
853 | 856 | |
|
854 | 857 | >>> import re |
|
855 | 858 | >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) |
|
856 | 859 | >>> open('a', 'wb').write(text) |
|
857 | 860 | $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' |
|
858 | 861 | a |
|
859 | 862 | overwriting a expanding keywords |
|
860 | 863 | committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082 |
|
861 | 864 | $ hg export -o ../rejecttest.diff tip |
|
862 | 865 | $ cd ../Test |
|
863 | 866 | $ hg import ../rejecttest.diff |
|
864 | 867 | applying ../rejecttest.diff |
|
865 | 868 | $ cat a b |
|
866 | 869 | expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest |
|
867 | 870 | do not process $Id: rejecttest |
|
868 | 871 | xxx $ |
|
869 | 872 | $Xinfo: User Name <user@example.com>: rejects? $ |
|
870 | 873 | ignore $Id$ |
|
871 | 874 | |
|
872 | 875 | $ hg rollback |
|
873 | 876 | repository tip rolled back to revision 2 (undo import) |
|
874 | 877 | working directory now based on revision 2 |
|
875 | 878 | $ hg update --clean |
|
876 | 879 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
877 | 880 | |
|
878 | 881 | kwexpand/kwshrink on selected files |
|
879 | 882 | |
|
880 | 883 | $ mkdir x |
|
881 | 884 | $ hg copy a x/a |
|
882 | 885 | $ hg --verbose kwshrink a |
|
883 | 886 | overwriting a shrinking keywords |
|
884 | 887 | - sleep required for dirstate.normal() check |
|
885 | 888 | $ sleep 1 |
|
886 | 889 | $ hg status a |
|
887 | 890 | $ hg --verbose kwexpand a |
|
888 | 891 | overwriting a expanding keywords |
|
889 | 892 | $ hg status a |
|
890 | 893 | |
|
891 | 894 | kwexpand x/a should abort |
|
892 | 895 | |
|
893 | 896 | $ hg --verbose kwexpand x/a |
|
894 | 897 | abort: outstanding uncommitted changes |
|
895 | 898 | [255] |
|
896 | 899 | $ cd x |
|
897 | 900 | $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>' |
|
898 | 901 | x/a |
|
899 | 902 | x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e |
|
900 | 903 | overwriting x/a expanding keywords |
|
901 | 904 | committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
902 | 905 | $ cat a |
|
903 | 906 | expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $ |
|
904 | 907 | do not process $Id: |
|
905 | 908 | xxx $ |
|
906 | 909 | $Xinfo: User Name <user@example.com>: xa $ |
|
907 | 910 | |
|
908 | 911 | kwshrink a inside directory x |
|
909 | 912 | |
|
910 | 913 | $ hg --verbose kwshrink a |
|
911 | 914 | overwriting x/a shrinking keywords |
|
912 | 915 | $ cat a |
|
913 | 916 | expand $Id$ |
|
914 | 917 | do not process $Id: |
|
915 | 918 | xxx $ |
|
916 | 919 | $Xinfo$ |
|
917 | 920 | $ cd .. |
|
918 | 921 | |
|
919 | 922 | kwexpand nonexistent |
|
920 | 923 | |
|
921 | 924 | $ hg kwexpand nonexistent |
|
922 | 925 | nonexistent:* (glob) |
|
923 | 926 | |
|
924 | 927 | |
|
925 | 928 | hg serve |
|
926 | 929 | - expand with hgweb file |
|
927 | 930 | - no expansion with hgweb annotate/changeset/filediff |
|
928 | 931 | - check errors |
|
929 | 932 | |
|
930 | 933 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
931 | 934 | $ cat hg.pid >> $DAEMON_PIDS |
|
932 | 935 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw' |
|
933 | 936 | 200 Script output follows |
|
934 | 937 | |
|
935 | 938 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
936 | 939 | do not process $Id: |
|
937 | 940 | xxx $ |
|
938 | 941 | $Xinfo: User Name <user@example.com>: firstline $ |
|
939 | 942 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw' |
|
940 | 943 | 200 Script output follows |
|
941 | 944 | |
|
942 | 945 | |
|
943 | 946 | user@1: expand $Id$ |
|
944 | 947 | user@1: do not process $Id: |
|
945 | 948 | user@1: xxx $ |
|
946 | 949 | user@2: $Xinfo$ |
|
947 | 950 | |
|
948 | 951 | |
|
949 | 952 | |
|
950 | 953 | |
|
951 | 954 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw' |
|
952 | 955 | 200 Script output follows |
|
953 | 956 | |
|
954 | 957 | |
|
955 | 958 | # HG changeset patch |
|
956 | 959 | # User User Name <user@example.com> |
|
957 | 960 | # Date 3 0 |
|
958 | 961 | # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4 |
|
959 | 962 | # Parent bb948857c743469b22bbf51f7ec8112279ca5d83 |
|
960 | 963 | xa |
|
961 | 964 | |
|
962 | 965 | diff -r bb948857c743 -r b4560182a3f9 x/a |
|
963 | 966 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
964 | 967 | +++ b/x/a Thu Jan 01 00:00:03 1970 +0000 |
|
965 | 968 | @@ -0,0 +1,4 @@ |
|
966 | 969 | +expand $Id$ |
|
967 | 970 | +do not process $Id: |
|
968 | 971 | +xxx $ |
|
969 | 972 | +$Xinfo$ |
|
970 | 973 | |
|
971 | 974 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw' |
|
972 | 975 | 200 Script output follows |
|
973 | 976 | |
|
974 | 977 | |
|
975 | 978 | diff -r ef63ca68695b -r bb948857c743 a |
|
976 | 979 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
977 | 980 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
978 | 981 | @@ -1,3 +1,4 @@ |
|
979 | 982 | expand $Id$ |
|
980 | 983 | do not process $Id: |
|
981 | 984 | xxx $ |
|
982 | 985 | +$Xinfo$ |
|
983 | 986 | |
|
984 | 987 | |
|
985 | 988 | |
|
986 | 989 | |
|
987 | 990 | $ cat errors.log |
|
988 | 991 | |
|
989 | 992 | Prepare merge and resolve tests |
|
990 | 993 | |
|
991 | 994 | $ echo '$Id$' > m |
|
992 | 995 | $ hg add m |
|
993 | 996 | $ hg commit -m 4kw |
|
994 | 997 | $ echo foo >> m |
|
995 | 998 | $ hg commit -m 5foo |
|
996 | 999 | |
|
997 | 1000 | simplemerge |
|
998 | 1001 | |
|
999 | 1002 | $ hg update 4 |
|
1000 | 1003 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1001 | 1004 | $ echo foo >> m |
|
1002 | 1005 | $ hg commit -m 6foo |
|
1003 | 1006 | created new head |
|
1004 | 1007 | $ hg merge |
|
1005 | 1008 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1006 | 1009 | (branch merge, don't forget to commit) |
|
1007 | 1010 | $ hg commit -m simplemerge |
|
1008 | 1011 | $ cat m |
|
1009 | 1012 | $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1010 | 1013 | foo |
|
1011 | 1014 | |
|
1012 | 1015 | conflict: keyword should stay outside conflict zone |
|
1013 | 1016 | |
|
1014 | 1017 | $ hg update 4 |
|
1015 | 1018 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1016 | 1019 | $ echo bar >> m |
|
1017 | 1020 | $ hg commit -m 8bar |
|
1018 | 1021 | created new head |
|
1019 | 1022 | $ hg merge |
|
1020 | 1023 | merging m |
|
1021 | 1024 | warning: conflicts during merge. |
|
1022 | 1025 | merging m incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
1023 | 1026 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1024 | 1027 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
1025 | 1028 | [1] |
|
1026 | 1029 | $ cat m |
|
1027 | 1030 | $Id$ |
|
1028 | 1031 | <<<<<<< local |
|
1029 | 1032 | bar |
|
1030 | 1033 | ======= |
|
1031 | 1034 | foo |
|
1032 | 1035 | >>>>>>> other |
|
1033 | 1036 | |
|
1034 | 1037 | resolve to local |
|
1035 | 1038 | |
|
1036 | 1039 | $ HGMERGE=internal:local hg resolve -a |
|
1037 | 1040 | $ hg commit -m localresolve |
|
1038 | 1041 | $ cat m |
|
1039 | 1042 | $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1040 | 1043 | bar |
|
1041 | 1044 | |
|
1042 | 1045 | Test restricted mode with transplant -b |
|
1043 | 1046 | |
|
1044 | 1047 | $ hg update 6 |
|
1045 | 1048 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1046 | 1049 | $ hg branch foo |
|
1047 | 1050 | marked working directory as branch foo |
|
1048 | 1051 | (branches are permanent and global, did you want a bookmark?) |
|
1049 | 1052 | $ mv a a.bak |
|
1050 | 1053 | $ echo foobranch > a |
|
1051 | 1054 | $ cat a.bak >> a |
|
1052 | 1055 | $ rm a.bak |
|
1053 | 1056 | $ hg commit -m 9foobranch |
|
1054 | 1057 | $ hg update default |
|
1055 | 1058 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1056 | 1059 | $ hg -y transplant -b foo tip |
|
1057 | 1060 | applying 4aa30d025d50 |
|
1058 | 1061 | 4aa30d025d50 transplanted to e00abbf63521 |
|
1059 | 1062 | |
|
1060 | 1063 | Expansion in changeset but not in file |
|
1061 | 1064 | |
|
1062 | 1065 | $ hg tip -p |
|
1063 | 1066 | changeset: 11:e00abbf63521 |
|
1064 | 1067 | tag: tip |
|
1065 | 1068 | parent: 9:800511b3a22d |
|
1066 | 1069 | user: test |
|
1067 | 1070 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1068 | 1071 | summary: 9foobranch |
|
1069 | 1072 | |
|
1070 | 1073 | diff -r 800511b3a22d -r e00abbf63521 a |
|
1071 | 1074 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1072 | 1075 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1073 | 1076 | @@ -1,3 +1,4 @@ |
|
1074 | 1077 | +foobranch |
|
1075 | 1078 | expand $Id$ |
|
1076 | 1079 | do not process $Id: |
|
1077 | 1080 | xxx $ |
|
1078 | 1081 | |
|
1079 | 1082 | $ head -n 2 a |
|
1080 | 1083 | foobranch |
|
1081 | 1084 | expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $ |
|
1082 | 1085 | |
|
1083 | 1086 | Turn off expansion |
|
1084 | 1087 | |
|
1085 | 1088 | $ hg -q rollback |
|
1086 | 1089 | $ hg -q update -C |
|
1087 | 1090 | |
|
1088 | 1091 | kwshrink with unknown file u |
|
1089 | 1092 | |
|
1090 | 1093 | $ cp a u |
|
1091 | 1094 | $ hg --verbose kwshrink |
|
1092 | 1095 | overwriting a shrinking keywords |
|
1093 | 1096 | overwriting m shrinking keywords |
|
1094 | 1097 | overwriting x/a shrinking keywords |
|
1095 | 1098 | |
|
1096 | 1099 | Keywords shrunk in working directory, but not yet disabled |
|
1097 | 1100 | - cat shows unexpanded keywords |
|
1098 | 1101 | - hg cat shows expanded keywords |
|
1099 | 1102 | |
|
1100 | 1103 | $ cat a b |
|
1101 | 1104 | expand $Id$ |
|
1102 | 1105 | do not process $Id: |
|
1103 | 1106 | xxx $ |
|
1104 | 1107 | $Xinfo$ |
|
1105 | 1108 | ignore $Id$ |
|
1106 | 1109 | $ hg cat sym a b && echo |
|
1107 | 1110 | expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ |
|
1108 | 1111 | do not process $Id: |
|
1109 | 1112 | xxx $ |
|
1110 | 1113 | $Xinfo: User Name <user@example.com>: firstline $ |
|
1111 | 1114 | ignore $Id$ |
|
1112 | 1115 | a |
|
1113 | 1116 | |
|
1114 | 1117 | Now disable keyword expansion |
|
1115 | 1118 | |
|
1116 | 1119 | $ rm "$HGRCPATH" |
|
1117 | 1120 | $ cat a b |
|
1118 | 1121 | expand $Id$ |
|
1119 | 1122 | do not process $Id: |
|
1120 | 1123 | xxx $ |
|
1121 | 1124 | $Xinfo$ |
|
1122 | 1125 | ignore $Id$ |
|
1123 | 1126 | $ hg cat sym a b && echo |
|
1124 | 1127 | expand $Id$ |
|
1125 | 1128 | do not process $Id: |
|
1126 | 1129 | xxx $ |
|
1127 | 1130 | $Xinfo$ |
|
1128 | 1131 | ignore $Id$ |
|
1129 | 1132 | a |
|
1130 | 1133 | |
|
1131 | 1134 | $ cd .. |
@@ -1,150 +1,153 b'' | |||
|
1 | 1 | $ "$TESTDIR/hghave" serve || exit 80 |
|
2 | 2 | |
|
3 | hide outer repo | |
|
4 | $ hg init | |
|
5 | ||
|
3 | 6 |
$ |
|
4 | 7 |
$ |
|
5 | 8 |
$ |
|
6 | 9 | $ cd webdir |
|
7 | 10 | $ hg init a |
|
8 | 11 | $ hg --cwd a qinit -c |
|
9 | 12 | $ echo a > a/a |
|
10 | 13 | $ hg --cwd a ci -A -m a |
|
11 | 14 | adding a |
|
12 | 15 | $ echo b > a/b |
|
13 | 16 | $ hg --cwd a addremove |
|
14 | 17 | adding b |
|
15 | 18 | $ hg --cwd a qnew -f b.patch |
|
16 | 19 | $ hg --cwd a qcommit -m b.patch |
|
17 | 20 | $ hg --cwd a log --template "{desc}\n" |
|
18 | 21 | [mq]: b.patch |
|
19 | 22 | a |
|
20 | 23 | $ hg --cwd a/.hg/patches log --template "{desc}\n" |
|
21 | 24 | b.patch |
|
22 | 25 | $ root=`pwd` |
|
23 | 26 | $ cd .. |
|
24 | 27 | |
|
25 | 28 | test with recursive collection |
|
26 | 29 | |
|
27 | 30 | $ cat > collections.conf <<EOF |
|
28 | 31 | > [paths] |
|
29 | 32 | > /=$root/** |
|
30 | 33 | > EOF |
|
31 | 34 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ |
|
32 | 35 | > -A access-paths.log -E error-paths-1.log |
|
33 | 36 | $ cat hg.pid >> $DAEMON_PIDS |
|
34 | 37 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' |
|
35 | 38 | 200 Script output follows |
|
36 | 39 | |
|
37 | 40 | |
|
38 | 41 | /a/ |
|
39 | 42 | /a/.hg/patches/ |
|
40 | 43 | |
|
41 | 44 | $ hg qclone http://localhost:$HGPORT/a b |
|
42 | 45 | requesting all changes |
|
43 | 46 | adding changesets |
|
44 | 47 | adding manifests |
|
45 | 48 | adding file changes |
|
46 | 49 | added 2 changesets with 2 changes to 2 files |
|
47 | 50 | requesting all changes |
|
48 | 51 | adding changesets |
|
49 | 52 | adding manifests |
|
50 | 53 | adding file changes |
|
51 | 54 | added 1 changesets with 3 changes to 3 files |
|
52 | 55 | updating to branch default |
|
53 | 56 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
54 | 57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 58 | $ hg --cwd b log --template "{desc}\n" |
|
56 | 59 | a |
|
57 | 60 | $ hg --cwd b qpush -a |
|
58 | 61 | applying b.patch |
|
59 | 62 | now at: b.patch |
|
60 | 63 | $ hg --cwd b log --template "{desc}\n" |
|
61 | 64 | imported patch b.patch |
|
62 | 65 | a |
|
63 | 66 | |
|
64 | 67 | test with normal collection |
|
65 | 68 | |
|
66 | 69 | $ cat > collections1.conf <<EOF |
|
67 | 70 | > [paths] |
|
68 | 71 | > /=$root/* |
|
69 | 72 | > EOF |
|
70 | 73 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ |
|
71 | 74 | > -A access-paths.log -E error-paths-1.log |
|
72 | 75 | $ cat hg.pid >> $DAEMON_PIDS |
|
73 | 76 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
|
74 | 77 | 200 Script output follows |
|
75 | 78 | |
|
76 | 79 | |
|
77 | 80 | /a/ |
|
78 | 81 | /a/.hg/patches/ |
|
79 | 82 | |
|
80 | 83 | $ hg qclone http://localhost:$HGPORT1/a c |
|
81 | 84 | requesting all changes |
|
82 | 85 | adding changesets |
|
83 | 86 | adding manifests |
|
84 | 87 | adding file changes |
|
85 | 88 | added 2 changesets with 2 changes to 2 files |
|
86 | 89 | requesting all changes |
|
87 | 90 | adding changesets |
|
88 | 91 | adding manifests |
|
89 | 92 | adding file changes |
|
90 | 93 | added 1 changesets with 3 changes to 3 files |
|
91 | 94 | updating to branch default |
|
92 | 95 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 97 | $ hg --cwd c log --template "{desc}\n" |
|
95 | 98 | a |
|
96 | 99 | $ hg --cwd c qpush -a |
|
97 | 100 | applying b.patch |
|
98 | 101 | now at: b.patch |
|
99 | 102 | $ hg --cwd c log --template "{desc}\n" |
|
100 | 103 | imported patch b.patch |
|
101 | 104 | a |
|
102 | 105 | |
|
103 | 106 | test with old-style collection |
|
104 | 107 | |
|
105 | 108 | $ cat > collections2.conf <<EOF |
|
106 | 109 | > [collections] |
|
107 | 110 | > $root=$root |
|
108 | 111 | > EOF |
|
109 | 112 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ |
|
110 | 113 | > -A access-paths.log -E error-paths-1.log |
|
111 | 114 | $ cat hg.pid >> $DAEMON_PIDS |
|
112 | 115 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' |
|
113 | 116 | 200 Script output follows |
|
114 | 117 | |
|
115 | 118 | |
|
116 | 119 | /a/ |
|
117 | 120 | /a/.hg/patches/ |
|
118 | 121 | |
|
119 | 122 | $ hg qclone http://localhost:$HGPORT2/a d |
|
120 | 123 | requesting all changes |
|
121 | 124 | adding changesets |
|
122 | 125 | adding manifests |
|
123 | 126 | adding file changes |
|
124 | 127 | added 2 changesets with 2 changes to 2 files |
|
125 | 128 | requesting all changes |
|
126 | 129 | adding changesets |
|
127 | 130 | adding manifests |
|
128 | 131 | adding file changes |
|
129 | 132 | added 1 changesets with 3 changes to 3 files |
|
130 | 133 | updating to branch default |
|
131 | 134 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
132 | 135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
133 | 136 | $ hg --cwd d log --template "{desc}\n" |
|
134 | 137 | a |
|
135 | 138 | $ hg --cwd d qpush -a |
|
136 | 139 | applying b.patch |
|
137 | 140 | now at: b.patch |
|
138 | 141 | $ hg --cwd d log --template "{desc}\n" |
|
139 | 142 | imported patch b.patch |
|
140 | 143 | a |
|
141 | 144 | |
|
142 | 145 | test --mq works and uses correct repository config |
|
143 | 146 | |
|
144 | 147 | $ hg --cwd d outgoing --mq |
|
145 | 148 | comparing with http://localhost:$HGPORT2/a/.hg/patches |
|
146 | 149 | searching for changes |
|
147 | 150 | no changes found |
|
148 | 151 | [1] |
|
149 | 152 | $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n' |
|
150 | 153 | 0 b.patch |
@@ -1,1548 +1,1552 b'' | |||
|
1 | 1 | $ checkundo() |
|
2 | 2 | > { |
|
3 | 3 | > if [ -f .hg/store/undo ]; then |
|
4 | 4 | > echo ".hg/store/undo still exists after $1" |
|
5 | 5 | > fi |
|
6 | 6 | > } |
|
7 | 7 | |
|
8 | 8 | $ echo "[extensions]" >> $HGRCPATH |
|
9 | 9 | $ echo "mq=" >> $HGRCPATH |
|
10 | 10 | |
|
11 | 11 | $ echo "[mq]" >> $HGRCPATH |
|
12 | 12 | $ echo "plain=true" >> $HGRCPATH |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | help |
|
16 | 16 | |
|
17 | 17 | $ hg help mq |
|
18 | 18 | mq extension - manage a stack of patches |
|
19 | 19 | |
|
20 | 20 | This extension lets you work with a stack of patches in a Mercurial |
|
21 | 21 | repository. It manages two stacks of patches - all known patches, and applied |
|
22 | 22 | patches (subset of known patches). |
|
23 | 23 | |
|
24 | 24 | Known patches are represented as patch files in the .hg/patches directory. |
|
25 | 25 | Applied patches are both patch files and changesets. |
|
26 | 26 | |
|
27 | 27 | Common tasks (use "hg help command" for more details): |
|
28 | 28 | |
|
29 | 29 | create new patch qnew |
|
30 | 30 | import existing patch qimport |
|
31 | 31 | |
|
32 | 32 | print patch series qseries |
|
33 | 33 | print applied patches qapplied |
|
34 | 34 | |
|
35 | 35 | add known patch to applied stack qpush |
|
36 | 36 | remove patch from applied stack qpop |
|
37 | 37 | refresh contents of top applied patch qrefresh |
|
38 | 38 | |
|
39 | 39 | By default, mq will automatically use git patches when required to avoid |
|
40 | 40 | losing file mode changes, copy records, binary files or empty files creations |
|
41 | 41 | or deletions. This behaviour can be configured with: |
|
42 | 42 | |
|
43 | 43 | [mq] |
|
44 | 44 | git = auto/keep/yes/no |
|
45 | 45 | |
|
46 | 46 | If set to 'keep', mq will obey the [diff] section configuration while |
|
47 | 47 | preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq |
|
48 | 48 | will override the [diff] section and always generate git or regular patches, |
|
49 | 49 | possibly losing data in the second case. |
|
50 | 50 | |
|
51 | 51 | It may be desirable for mq changesets to be kept in the secret phase (see "hg |
|
52 | 52 | help phases"), which can be enabled with the following setting: |
|
53 | 53 | |
|
54 | 54 | [mq] |
|
55 | 55 | secret = True |
|
56 | 56 | |
|
57 | 57 | You will by default be managing a patch queue named "patches". You can create |
|
58 | 58 | other, independent patch queues with the "hg qqueue" command. |
|
59 | 59 | |
|
60 | 60 | If the working directory contains uncommitted files, qpush, qpop and qgoto |
|
61 | 61 | abort immediately. If -f/--force is used, the changes are discarded. Setting: |
|
62 | 62 | |
|
63 | 63 | [mq] |
|
64 | 64 | keepchanges = True |
|
65 | 65 | |
|
66 | 66 | make them behave as if --keep-changes were passed, and non-conflicting local |
|
67 | 67 | changes will be tolerated and preserved. If incompatible options such as |
|
68 | 68 | -f/--force or --exact are passed, this setting is ignored. |
|
69 | 69 | |
|
70 | 70 | list of commands: |
|
71 | 71 | |
|
72 | 72 | qapplied print the patches already applied |
|
73 | 73 | qclone clone main and patch repository at same time |
|
74 | 74 | qdelete remove patches from queue |
|
75 | 75 | qdiff diff of the current patch and subsequent modifications |
|
76 | 76 | qfinish move applied patches into repository history |
|
77 | 77 | qfold fold the named patches into the current patch |
|
78 | 78 | qgoto push or pop patches until named patch is at top of stack |
|
79 | 79 | qguard set or print guards for a patch |
|
80 | 80 | qheader print the header of the topmost or specified patch |
|
81 | 81 | qimport import a patch or existing changeset |
|
82 | 82 | qnew create a new patch |
|
83 | 83 | qnext print the name of the next pushable patch |
|
84 | 84 | qpop pop the current patch off the stack |
|
85 | 85 | qprev print the name of the preceding applied patch |
|
86 | 86 | qpush push the next patch onto the stack |
|
87 | 87 | qqueue manage multiple patch queues |
|
88 | 88 | qrefresh update the current patch |
|
89 | 89 | qrename rename a patch |
|
90 | 90 | qselect set or print guarded patches to push |
|
91 | 91 | qseries print the entire series file |
|
92 | 92 | qtop print the name of the current patch |
|
93 | 93 | qunapplied print the patches not yet applied |
|
94 | 94 | strip strip changesets and all their descendants from the repository |
|
95 | 95 | |
|
96 | 96 | use "hg -v help mq" to show builtin aliases and global options |
|
97 | 97 | |
|
98 | 98 | $ hg init a |
|
99 | 99 | $ cd a |
|
100 | 100 | $ echo a > a |
|
101 | 101 | $ hg ci -Ama |
|
102 | 102 | adding a |
|
103 | 103 | |
|
104 | 104 | $ hg clone . ../k |
|
105 | 105 | updating to branch default |
|
106 | 106 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 107 | |
|
108 | 108 | $ mkdir b |
|
109 | 109 | $ echo z > b/z |
|
110 | 110 | $ hg ci -Ama |
|
111 | 111 | adding b/z |
|
112 | 112 | |
|
113 | 113 | |
|
114 | 114 | qinit |
|
115 | 115 | |
|
116 | 116 | $ hg qinit |
|
117 | 117 | |
|
118 | 118 | $ cd .. |
|
119 | 119 | $ hg init b |
|
120 | 120 | |
|
121 | 121 | |
|
122 | 122 | -R qinit |
|
123 | 123 | |
|
124 | 124 | $ hg -R b qinit |
|
125 | 125 | |
|
126 | 126 | $ hg init c |
|
127 | 127 | |
|
128 | 128 | |
|
129 | 129 | qinit -c |
|
130 | 130 | |
|
131 | 131 | $ hg --cwd c qinit -c |
|
132 | 132 | $ hg -R c/.hg/patches st |
|
133 | 133 | A .hgignore |
|
134 | 134 | A series |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | qinit; qinit -c |
|
138 | 138 | |
|
139 | 139 | $ hg init d |
|
140 | 140 | $ cd d |
|
141 | 141 | $ hg qinit |
|
142 | 142 | $ hg qinit -c |
|
143 | 143 | |
|
144 | 144 | qinit -c should create both files if they don't exist |
|
145 | 145 | |
|
146 | 146 | $ cat .hg/patches/.hgignore |
|
147 | 147 | ^\.hg |
|
148 | 148 | ^\.mq |
|
149 | 149 | syntax: glob |
|
150 | 150 | status |
|
151 | 151 | guards |
|
152 | 152 | $ cat .hg/patches/series |
|
153 | 153 | $ hg qinit -c |
|
154 | 154 | abort: repository $TESTTMP/d/.hg/patches already exists! (glob) |
|
155 | 155 | [255] |
|
156 | 156 | $ cd .. |
|
157 | 157 | |
|
158 | 158 | $ echo '% qinit; <stuff>; qinit -c' |
|
159 | 159 | % qinit; <stuff>; qinit -c |
|
160 | 160 | $ hg init e |
|
161 | 161 | $ cd e |
|
162 | 162 | $ hg qnew A |
|
163 | 163 | $ checkundo qnew |
|
164 | 164 | $ echo foo > foo |
|
165 | 165 | $ hg phase -r qbase |
|
166 | 166 | 0: draft |
|
167 | 167 | $ hg add foo |
|
168 | 168 | $ hg qrefresh |
|
169 | 169 | $ hg phase -r qbase |
|
170 | 170 | 0: draft |
|
171 | 171 | $ hg qnew B |
|
172 | 172 | $ echo >> foo |
|
173 | 173 | $ hg qrefresh |
|
174 | 174 | $ echo status >> .hg/patches/.hgignore |
|
175 | 175 | $ echo bleh >> .hg/patches/.hgignore |
|
176 | 176 | $ hg qinit -c |
|
177 | 177 | adding .hg/patches/A (glob) |
|
178 | 178 | adding .hg/patches/B (glob) |
|
179 | 179 | $ hg -R .hg/patches status |
|
180 | 180 | A .hgignore |
|
181 | 181 | A A |
|
182 | 182 | A B |
|
183 | 183 | A series |
|
184 | 184 | |
|
185 | 185 | qinit -c shouldn't touch these files if they already exist |
|
186 | 186 | |
|
187 | 187 | $ cat .hg/patches/.hgignore |
|
188 | 188 | status |
|
189 | 189 | bleh |
|
190 | 190 | $ cat .hg/patches/series |
|
191 | 191 | A |
|
192 | 192 | B |
|
193 | 193 | |
|
194 | 194 | add an untracked file |
|
195 | 195 | |
|
196 | 196 | $ echo >> .hg/patches/flaf |
|
197 | 197 | |
|
198 | 198 | status --mq with color (issue2096) |
|
199 | 199 | |
|
200 | 200 | $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always |
|
201 | 201 | \x1b[0;32;1mA .hgignore\x1b[0m (esc) |
|
202 | 202 | \x1b[0;32;1mA A\x1b[0m (esc) |
|
203 | 203 | \x1b[0;32;1mA B\x1b[0m (esc) |
|
204 | 204 | \x1b[0;32;1mA series\x1b[0m (esc) |
|
205 | 205 | \x1b[0;35;1;4m? flaf\x1b[0m (esc) |
|
206 | 206 | |
|
207 | 207 | try the --mq option on a command provided by an extension |
|
208 | 208 | |
|
209 | 209 | $ hg purge --mq --verbose --config extensions.purge= |
|
210 | 210 | removing file flaf |
|
211 | 211 | |
|
212 | 212 | $ cd .. |
|
213 | 213 | |
|
214 | #if no-outer-repo | |
|
215 | ||
|
214 | 216 | init --mq without repo |
|
215 | 217 | |
|
216 | 218 | $ mkdir f |
|
217 | 219 | $ cd f |
|
218 | 220 | $ hg init --mq |
|
219 | 221 | abort: there is no Mercurial repository here (.hg not found) |
|
220 | 222 | [255] |
|
221 | 223 | $ cd .. |
|
222 | 224 | |
|
225 | #endif | |
|
226 | ||
|
223 | 227 | init --mq with repo path |
|
224 | 228 | |
|
225 | 229 | $ hg init g |
|
226 | 230 | $ hg init --mq g |
|
227 | 231 | $ test -d g/.hg/patches/.hg |
|
228 | 232 | |
|
229 | 233 | init --mq with nonexistent directory |
|
230 | 234 | |
|
231 | 235 | $ hg init --mq nonexistentdir |
|
232 | 236 | abort: repository nonexistentdir not found! |
|
233 | 237 | [255] |
|
234 | 238 | |
|
235 | 239 | |
|
236 | 240 | init --mq with bundle (non "local") |
|
237 | 241 | |
|
238 | 242 | $ hg -R a bundle --all a.bundle >/dev/null |
|
239 | 243 | $ hg init --mq a.bundle |
|
240 | 244 | abort: only a local queue repository may be initialized |
|
241 | 245 | [255] |
|
242 | 246 | |
|
243 | 247 | $ cd a |
|
244 | 248 | |
|
245 | 249 | $ hg qnew -m 'foo bar' test.patch |
|
246 | 250 | |
|
247 | 251 | $ echo '# comment' > .hg/patches/series.tmp |
|
248 | 252 | $ echo >> .hg/patches/series.tmp # empty line |
|
249 | 253 | $ cat .hg/patches/series >> .hg/patches/series.tmp |
|
250 | 254 | $ mv .hg/patches/series.tmp .hg/patches/series |
|
251 | 255 | |
|
252 | 256 | |
|
253 | 257 | qrefresh |
|
254 | 258 | |
|
255 | 259 | $ echo a >> a |
|
256 | 260 | $ hg qrefresh |
|
257 | 261 | $ cat .hg/patches/test.patch |
|
258 | 262 | foo bar |
|
259 | 263 | |
|
260 | 264 | diff -r [a-f0-9]* a (re) |
|
261 | 265 | --- a/a\t(?P<date>.*) (re) |
|
262 | 266 | \+\+\+ b/a\t(?P<date2>.*) (re) |
|
263 | 267 | @@ -1,1 +1,2 @@ |
|
264 | 268 | a |
|
265 | 269 | +a |
|
266 | 270 | |
|
267 | 271 | empty qrefresh |
|
268 | 272 | |
|
269 | 273 | $ hg qrefresh -X a |
|
270 | 274 | |
|
271 | 275 | revision: |
|
272 | 276 | |
|
273 | 277 | $ hg diff -r -2 -r -1 |
|
274 | 278 | |
|
275 | 279 | patch: |
|
276 | 280 | |
|
277 | 281 | $ cat .hg/patches/test.patch |
|
278 | 282 | foo bar |
|
279 | 283 | |
|
280 | 284 | |
|
281 | 285 | working dir diff: |
|
282 | 286 | |
|
283 | 287 | $ hg diff --nodates -q |
|
284 | 288 | --- a/a |
|
285 | 289 | +++ b/a |
|
286 | 290 | @@ -1,1 +1,2 @@ |
|
287 | 291 | a |
|
288 | 292 | +a |
|
289 | 293 | |
|
290 | 294 | restore things |
|
291 | 295 | |
|
292 | 296 | $ hg qrefresh |
|
293 | 297 | $ checkundo qrefresh |
|
294 | 298 | |
|
295 | 299 | |
|
296 | 300 | qpop |
|
297 | 301 | |
|
298 | 302 | $ hg qpop |
|
299 | 303 | popping test.patch |
|
300 | 304 | patch queue now empty |
|
301 | 305 | $ checkundo qpop |
|
302 | 306 | |
|
303 | 307 | |
|
304 | 308 | qpush with dump of tag cache |
|
305 | 309 | Dump the tag cache to ensure that it has exactly one head after qpush. |
|
306 | 310 | |
|
307 | 311 | $ rm -f .hg/cache/tags |
|
308 | 312 | $ hg tags > /dev/null |
|
309 | 313 | |
|
310 | 314 | .hg/cache/tags (pre qpush): |
|
311 | 315 | |
|
312 | 316 | $ cat .hg/cache/tags |
|
313 | 317 | 1 [\da-f]{40} (re) |
|
314 | 318 | |
|
315 | 319 | $ hg qpush |
|
316 | 320 | applying test.patch |
|
317 | 321 | now at: test.patch |
|
318 | 322 | $ hg phase -r qbase |
|
319 | 323 | 2: draft |
|
320 | 324 | $ hg tags > /dev/null |
|
321 | 325 | |
|
322 | 326 | .hg/cache/tags (post qpush): |
|
323 | 327 | |
|
324 | 328 | $ cat .hg/cache/tags |
|
325 | 329 | 2 [\da-f]{40} (re) |
|
326 | 330 | |
|
327 | 331 | $ checkundo qpush |
|
328 | 332 | $ cd .. |
|
329 | 333 | |
|
330 | 334 | |
|
331 | 335 | pop/push outside repo |
|
332 | 336 | $ hg -R a qpop |
|
333 | 337 | popping test.patch |
|
334 | 338 | patch queue now empty |
|
335 | 339 | $ hg -R a qpush |
|
336 | 340 | applying test.patch |
|
337 | 341 | now at: test.patch |
|
338 | 342 | |
|
339 | 343 | $ cd a |
|
340 | 344 | $ hg qnew test2.patch |
|
341 | 345 | |
|
342 | 346 | qrefresh in subdir |
|
343 | 347 | |
|
344 | 348 | $ cd b |
|
345 | 349 | $ echo a > a |
|
346 | 350 | $ hg add a |
|
347 | 351 | $ hg qrefresh |
|
348 | 352 | |
|
349 | 353 | pop/push -a in subdir |
|
350 | 354 | |
|
351 | 355 | $ hg qpop -a |
|
352 | 356 | popping test2.patch |
|
353 | 357 | popping test.patch |
|
354 | 358 | patch queue now empty |
|
355 | 359 | $ hg --traceback qpush -a |
|
356 | 360 | applying test.patch |
|
357 | 361 | applying test2.patch |
|
358 | 362 | now at: test2.patch |
|
359 | 363 | |
|
360 | 364 | |
|
361 | 365 | setting columns & formatted tests truncating (issue1912) |
|
362 | 366 | |
|
363 | 367 | $ COLUMNS=4 hg qseries --config ui.formatted=true |
|
364 | 368 | test.patch |
|
365 | 369 | test2.patch |
|
366 | 370 | $ COLUMNS=20 hg qseries --config ui.formatted=true -vs |
|
367 | 371 | 0 A test.patch: f... |
|
368 | 372 | 1 A test2.patch: |
|
369 | 373 | $ hg qpop |
|
370 | 374 | popping test2.patch |
|
371 | 375 | now at: test.patch |
|
372 | 376 | $ hg qseries -vs |
|
373 | 377 | 0 A test.patch: foo bar |
|
374 | 378 | 1 U test2.patch: |
|
375 | 379 | $ hg sum | grep mq |
|
376 | 380 | mq: 1 applied, 1 unapplied |
|
377 | 381 | $ hg qpush |
|
378 | 382 | applying test2.patch |
|
379 | 383 | now at: test2.patch |
|
380 | 384 | $ hg sum | grep mq |
|
381 | 385 | mq: 2 applied |
|
382 | 386 | $ hg qapplied |
|
383 | 387 | test.patch |
|
384 | 388 | test2.patch |
|
385 | 389 | $ hg qtop |
|
386 | 390 | test2.patch |
|
387 | 391 | |
|
388 | 392 | |
|
389 | 393 | prev |
|
390 | 394 | |
|
391 | 395 | $ hg qapp -1 |
|
392 | 396 | test.patch |
|
393 | 397 | |
|
394 | 398 | next |
|
395 | 399 | |
|
396 | 400 | $ hg qunapp -1 |
|
397 | 401 | all patches applied |
|
398 | 402 | [1] |
|
399 | 403 | |
|
400 | 404 | $ hg qpop |
|
401 | 405 | popping test2.patch |
|
402 | 406 | now at: test.patch |
|
403 | 407 | |
|
404 | 408 | commit should fail |
|
405 | 409 | |
|
406 | 410 | $ hg commit |
|
407 | 411 | abort: cannot commit over an applied mq patch |
|
408 | 412 | [255] |
|
409 | 413 | |
|
410 | 414 | push should fail if draft |
|
411 | 415 | |
|
412 | 416 | $ hg push ../../k |
|
413 | 417 | pushing to ../../k |
|
414 | 418 | abort: source has mq patches applied |
|
415 | 419 | [255] |
|
416 | 420 | |
|
417 | 421 | |
|
418 | 422 | import should fail |
|
419 | 423 | |
|
420 | 424 | $ hg st . |
|
421 | 425 | $ echo foo >> ../a |
|
422 | 426 | $ hg diff > ../../import.diff |
|
423 | 427 | $ hg revert --no-backup ../a |
|
424 | 428 | $ hg import ../../import.diff |
|
425 | 429 | abort: cannot import over an applied patch |
|
426 | 430 | [255] |
|
427 | 431 | $ hg st |
|
428 | 432 | |
|
429 | 433 | import --no-commit should succeed |
|
430 | 434 | |
|
431 | 435 | $ hg import --no-commit ../../import.diff |
|
432 | 436 | applying ../../import.diff |
|
433 | 437 | $ hg st |
|
434 | 438 | M a |
|
435 | 439 | $ hg revert --no-backup ../a |
|
436 | 440 | |
|
437 | 441 | |
|
438 | 442 | qunapplied |
|
439 | 443 | |
|
440 | 444 | $ hg qunapplied |
|
441 | 445 | test2.patch |
|
442 | 446 | |
|
443 | 447 | |
|
444 | 448 | qpush/qpop with index |
|
445 | 449 | |
|
446 | 450 | $ hg qnew test1b.patch |
|
447 | 451 | $ echo 1b > 1b |
|
448 | 452 | $ hg add 1b |
|
449 | 453 | $ hg qrefresh |
|
450 | 454 | $ hg qpush 2 |
|
451 | 455 | applying test2.patch |
|
452 | 456 | now at: test2.patch |
|
453 | 457 | $ hg qpop 0 |
|
454 | 458 | popping test2.patch |
|
455 | 459 | popping test1b.patch |
|
456 | 460 | now at: test.patch |
|
457 | 461 | $ hg qpush test.patch+1 |
|
458 | 462 | applying test1b.patch |
|
459 | 463 | now at: test1b.patch |
|
460 | 464 | $ hg qpush test.patch+2 |
|
461 | 465 | applying test2.patch |
|
462 | 466 | now at: test2.patch |
|
463 | 467 | $ hg qpop test2.patch-1 |
|
464 | 468 | popping test2.patch |
|
465 | 469 | now at: test1b.patch |
|
466 | 470 | $ hg qpop test2.patch-2 |
|
467 | 471 | popping test1b.patch |
|
468 | 472 | now at: test.patch |
|
469 | 473 | $ hg qpush test1b.patch+1 |
|
470 | 474 | applying test1b.patch |
|
471 | 475 | applying test2.patch |
|
472 | 476 | now at: test2.patch |
|
473 | 477 | |
|
474 | 478 | |
|
475 | 479 | qpush --move |
|
476 | 480 | |
|
477 | 481 | $ hg qpop -a |
|
478 | 482 | popping test2.patch |
|
479 | 483 | popping test1b.patch |
|
480 | 484 | popping test.patch |
|
481 | 485 | patch queue now empty |
|
482 | 486 | $ hg qguard test1b.patch -- -negguard |
|
483 | 487 | $ hg qguard test2.patch -- +posguard |
|
484 | 488 | $ hg qpush --move test2.patch # can't move guarded patch |
|
485 | 489 | cannot push 'test2.patch' - guarded by '+posguard' |
|
486 | 490 | [1] |
|
487 | 491 | $ hg qselect posguard |
|
488 | 492 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
489 | 493 | $ hg qpush --move test2.patch # move to front |
|
490 | 494 | applying test2.patch |
|
491 | 495 | now at: test2.patch |
|
492 | 496 | $ hg qpush --move test1b.patch # negative guard unselected |
|
493 | 497 | applying test1b.patch |
|
494 | 498 | now at: test1b.patch |
|
495 | 499 | $ hg qpush --move test.patch # noop move |
|
496 | 500 | applying test.patch |
|
497 | 501 | now at: test.patch |
|
498 | 502 | $ hg qseries -v |
|
499 | 503 | 0 A test2.patch |
|
500 | 504 | 1 A test1b.patch |
|
501 | 505 | 2 A test.patch |
|
502 | 506 | $ hg qpop -a |
|
503 | 507 | popping test.patch |
|
504 | 508 | popping test1b.patch |
|
505 | 509 | popping test2.patch |
|
506 | 510 | patch queue now empty |
|
507 | 511 | |
|
508 | 512 | cleaning up |
|
509 | 513 | |
|
510 | 514 | $ hg qselect --none |
|
511 | 515 | guards deactivated |
|
512 | 516 | number of unguarded, unapplied patches has changed from 3 to 2 |
|
513 | 517 | $ hg qguard --none test1b.patch |
|
514 | 518 | $ hg qguard --none test2.patch |
|
515 | 519 | $ hg qpush --move test.patch |
|
516 | 520 | applying test.patch |
|
517 | 521 | now at: test.patch |
|
518 | 522 | $ hg qpush --move test1b.patch |
|
519 | 523 | applying test1b.patch |
|
520 | 524 | now at: test1b.patch |
|
521 | 525 | $ hg qpush --move bogus # nonexistent patch |
|
522 | 526 | abort: patch bogus not in series |
|
523 | 527 | [255] |
|
524 | 528 | $ hg qpush --move # no patch |
|
525 | 529 | abort: please specify the patch to move |
|
526 | 530 | [255] |
|
527 | 531 | $ hg qpush --move test.patch # already applied |
|
528 | 532 | abort: cannot push to a previous patch: test.patch |
|
529 | 533 | [255] |
|
530 | 534 | $ sed '2i\ |
|
531 | 535 | > # make qtip index different in series and fullseries |
|
532 | 536 | > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp |
|
533 | 537 | $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series |
|
534 | 538 | $ cat `hg root`/.hg/patches/series |
|
535 | 539 | # comment |
|
536 | 540 | # make qtip index different in series and fullseries |
|
537 | 541 | |
|
538 | 542 | test.patch |
|
539 | 543 | test1b.patch |
|
540 | 544 | test2.patch |
|
541 | 545 | $ hg qpush --move test2.patch |
|
542 | 546 | applying test2.patch |
|
543 | 547 | now at: test2.patch |
|
544 | 548 | |
|
545 | 549 | |
|
546 | 550 | series after move |
|
547 | 551 | |
|
548 | 552 | $ cat `hg root`/.hg/patches/series |
|
549 | 553 | # comment |
|
550 | 554 | # make qtip index different in series and fullseries |
|
551 | 555 | |
|
552 | 556 | test.patch |
|
553 | 557 | test1b.patch |
|
554 | 558 | test2.patch |
|
555 | 559 | |
|
556 | 560 | |
|
557 | 561 | pop, qapplied, qunapplied |
|
558 | 562 | |
|
559 | 563 | $ hg qseries -v |
|
560 | 564 | 0 A test.patch |
|
561 | 565 | 1 A test1b.patch |
|
562 | 566 | 2 A test2.patch |
|
563 | 567 | |
|
564 | 568 | qapplied -1 test.patch |
|
565 | 569 | |
|
566 | 570 | $ hg qapplied -1 test.patch |
|
567 | 571 | only one patch applied |
|
568 | 572 | [1] |
|
569 | 573 | |
|
570 | 574 | qapplied -1 test1b.patch |
|
571 | 575 | |
|
572 | 576 | $ hg qapplied -1 test1b.patch |
|
573 | 577 | test.patch |
|
574 | 578 | |
|
575 | 579 | qapplied -1 test2.patch |
|
576 | 580 | |
|
577 | 581 | $ hg qapplied -1 test2.patch |
|
578 | 582 | test1b.patch |
|
579 | 583 | |
|
580 | 584 | qapplied -1 |
|
581 | 585 | |
|
582 | 586 | $ hg qapplied -1 |
|
583 | 587 | test1b.patch |
|
584 | 588 | |
|
585 | 589 | qapplied |
|
586 | 590 | |
|
587 | 591 | $ hg qapplied |
|
588 | 592 | test.patch |
|
589 | 593 | test1b.patch |
|
590 | 594 | test2.patch |
|
591 | 595 | |
|
592 | 596 | qapplied test1b.patch |
|
593 | 597 | |
|
594 | 598 | $ hg qapplied test1b.patch |
|
595 | 599 | test.patch |
|
596 | 600 | test1b.patch |
|
597 | 601 | |
|
598 | 602 | qunapplied -1 |
|
599 | 603 | |
|
600 | 604 | $ hg qunapplied -1 |
|
601 | 605 | all patches applied |
|
602 | 606 | [1] |
|
603 | 607 | |
|
604 | 608 | qunapplied |
|
605 | 609 | |
|
606 | 610 | $ hg qunapplied |
|
607 | 611 | |
|
608 | 612 | popping |
|
609 | 613 | |
|
610 | 614 | $ hg qpop |
|
611 | 615 | popping test2.patch |
|
612 | 616 | now at: test1b.patch |
|
613 | 617 | |
|
614 | 618 | qunapplied -1 |
|
615 | 619 | |
|
616 | 620 | $ hg qunapplied -1 |
|
617 | 621 | test2.patch |
|
618 | 622 | |
|
619 | 623 | qunapplied |
|
620 | 624 | |
|
621 | 625 | $ hg qunapplied |
|
622 | 626 | test2.patch |
|
623 | 627 | |
|
624 | 628 | qunapplied test2.patch |
|
625 | 629 | |
|
626 | 630 | $ hg qunapplied test2.patch |
|
627 | 631 | |
|
628 | 632 | qunapplied -1 test2.patch |
|
629 | 633 | |
|
630 | 634 | $ hg qunapplied -1 test2.patch |
|
631 | 635 | all patches applied |
|
632 | 636 | [1] |
|
633 | 637 | |
|
634 | 638 | popping -a |
|
635 | 639 | |
|
636 | 640 | $ hg qpop -a |
|
637 | 641 | popping test1b.patch |
|
638 | 642 | popping test.patch |
|
639 | 643 | patch queue now empty |
|
640 | 644 | |
|
641 | 645 | qapplied |
|
642 | 646 | |
|
643 | 647 | $ hg qapplied |
|
644 | 648 | |
|
645 | 649 | qapplied -1 |
|
646 | 650 | |
|
647 | 651 | $ hg qapplied -1 |
|
648 | 652 | no patches applied |
|
649 | 653 | [1] |
|
650 | 654 | $ hg qpush |
|
651 | 655 | applying test.patch |
|
652 | 656 | now at: test.patch |
|
653 | 657 | |
|
654 | 658 | |
|
655 | 659 | push should succeed |
|
656 | 660 | |
|
657 | 661 | $ hg qpop -a |
|
658 | 662 | popping test.patch |
|
659 | 663 | patch queue now empty |
|
660 | 664 | $ hg push ../../k |
|
661 | 665 | pushing to ../../k |
|
662 | 666 | searching for changes |
|
663 | 667 | adding changesets |
|
664 | 668 | adding manifests |
|
665 | 669 | adding file changes |
|
666 | 670 | added 1 changesets with 1 changes to 1 files |
|
667 | 671 | |
|
668 | 672 | |
|
669 | 673 | we want to start with some patches applied |
|
670 | 674 | |
|
671 | 675 | $ hg qpush -a |
|
672 | 676 | applying test.patch |
|
673 | 677 | applying test1b.patch |
|
674 | 678 | applying test2.patch |
|
675 | 679 | now at: test2.patch |
|
676 | 680 | |
|
677 | 681 | % pops all patches and succeeds |
|
678 | 682 | |
|
679 | 683 | $ hg qpop -a |
|
680 | 684 | popping test2.patch |
|
681 | 685 | popping test1b.patch |
|
682 | 686 | popping test.patch |
|
683 | 687 | patch queue now empty |
|
684 | 688 | |
|
685 | 689 | % does nothing and succeeds |
|
686 | 690 | |
|
687 | 691 | $ hg qpop -a |
|
688 | 692 | no patches applied |
|
689 | 693 | |
|
690 | 694 | % fails - nothing else to pop |
|
691 | 695 | |
|
692 | 696 | $ hg qpop |
|
693 | 697 | no patches applied |
|
694 | 698 | [1] |
|
695 | 699 | |
|
696 | 700 | % pushes a patch and succeeds |
|
697 | 701 | |
|
698 | 702 | $ hg qpush |
|
699 | 703 | applying test.patch |
|
700 | 704 | now at: test.patch |
|
701 | 705 | |
|
702 | 706 | % pops a patch and succeeds |
|
703 | 707 | |
|
704 | 708 | $ hg qpop |
|
705 | 709 | popping test.patch |
|
706 | 710 | patch queue now empty |
|
707 | 711 | |
|
708 | 712 | % pushes up to test1b.patch and succeeds |
|
709 | 713 | |
|
710 | 714 | $ hg qpush test1b.patch |
|
711 | 715 | applying test.patch |
|
712 | 716 | applying test1b.patch |
|
713 | 717 | now at: test1b.patch |
|
714 | 718 | |
|
715 | 719 | % does nothing and succeeds |
|
716 | 720 | |
|
717 | 721 | $ hg qpush test1b.patch |
|
718 | 722 | qpush: test1b.patch is already at the top |
|
719 | 723 | |
|
720 | 724 | % does nothing and succeeds |
|
721 | 725 | |
|
722 | 726 | $ hg qpop test1b.patch |
|
723 | 727 | qpop: test1b.patch is already at the top |
|
724 | 728 | |
|
725 | 729 | % fails - can't push to this patch |
|
726 | 730 | |
|
727 | 731 | $ hg qpush test.patch |
|
728 | 732 | abort: cannot push to a previous patch: test.patch |
|
729 | 733 | [255] |
|
730 | 734 | |
|
731 | 735 | % fails - can't pop to this patch |
|
732 | 736 | |
|
733 | 737 | $ hg qpop test2.patch |
|
734 | 738 | abort: patch test2.patch is not applied |
|
735 | 739 | [255] |
|
736 | 740 | |
|
737 | 741 | % pops up to test.patch and succeeds |
|
738 | 742 | |
|
739 | 743 | $ hg qpop test.patch |
|
740 | 744 | popping test1b.patch |
|
741 | 745 | now at: test.patch |
|
742 | 746 | |
|
743 | 747 | % pushes all patches and succeeds |
|
744 | 748 | |
|
745 | 749 | $ hg qpush -a |
|
746 | 750 | applying test1b.patch |
|
747 | 751 | applying test2.patch |
|
748 | 752 | now at: test2.patch |
|
749 | 753 | |
|
750 | 754 | % does nothing and succeeds |
|
751 | 755 | |
|
752 | 756 | $ hg qpush -a |
|
753 | 757 | all patches are currently applied |
|
754 | 758 | |
|
755 | 759 | % fails - nothing else to push |
|
756 | 760 | |
|
757 | 761 | $ hg qpush |
|
758 | 762 | patch series already fully applied |
|
759 | 763 | [1] |
|
760 | 764 | |
|
761 | 765 | % does nothing and succeeds |
|
762 | 766 | |
|
763 | 767 | $ hg qpush test2.patch |
|
764 | 768 | qpush: test2.patch is already at the top |
|
765 | 769 | |
|
766 | 770 | strip |
|
767 | 771 | |
|
768 | 772 | $ cd ../../b |
|
769 | 773 | $ echo x>x |
|
770 | 774 | $ hg ci -Ama |
|
771 | 775 | adding x |
|
772 | 776 | $ hg strip tip |
|
773 | 777 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
774 | 778 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
775 | 779 | $ hg unbundle .hg/strip-backup/* |
|
776 | 780 | adding changesets |
|
777 | 781 | adding manifests |
|
778 | 782 | adding file changes |
|
779 | 783 | added 1 changesets with 1 changes to 1 files |
|
780 | 784 | (run 'hg update' to get a working copy) |
|
781 | 785 | |
|
782 | 786 | |
|
783 | 787 | strip with local changes, should complain |
|
784 | 788 | |
|
785 | 789 | $ hg up |
|
786 | 790 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
787 | 791 | $ echo y>y |
|
788 | 792 | $ hg add y |
|
789 | 793 | $ hg strip tip |
|
790 | 794 | abort: local changes found |
|
791 | 795 | [255] |
|
792 | 796 | |
|
793 | 797 | --force strip with local changes |
|
794 | 798 | |
|
795 | 799 | $ hg strip -f tip |
|
796 | 800 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
797 | 801 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob) |
|
798 | 802 | $ cd .. |
|
799 | 803 | |
|
800 | 804 | |
|
801 | 805 | cd b; hg qrefresh |
|
802 | 806 | |
|
803 | 807 | $ hg init refresh |
|
804 | 808 | $ cd refresh |
|
805 | 809 | $ echo a > a |
|
806 | 810 | $ hg ci -Ama |
|
807 | 811 | adding a |
|
808 | 812 | $ hg qnew -mfoo foo |
|
809 | 813 | $ echo a >> a |
|
810 | 814 | $ hg qrefresh |
|
811 | 815 | $ mkdir b |
|
812 | 816 | $ cd b |
|
813 | 817 | $ echo f > f |
|
814 | 818 | $ hg add f |
|
815 | 819 | $ hg qrefresh |
|
816 | 820 | $ cat ../.hg/patches/foo |
|
817 | 821 | foo |
|
818 | 822 | |
|
819 | 823 | diff -r cb9a9f314b8b a |
|
820 | 824 | --- a/a\t(?P<date>.*) (re) |
|
821 | 825 | \+\+\+ b/a\t(?P<date>.*) (re) |
|
822 | 826 | @@ -1,1 +1,2 @@ |
|
823 | 827 | a |
|
824 | 828 | +a |
|
825 | 829 | diff -r cb9a9f314b8b b/f |
|
826 | 830 | --- /dev/null\t(?P<date>.*) (re) |
|
827 | 831 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
828 | 832 | @@ -0,0 +1,1 @@ |
|
829 | 833 | +f |
|
830 | 834 | |
|
831 | 835 | hg qrefresh . |
|
832 | 836 | |
|
833 | 837 | $ hg qrefresh . |
|
834 | 838 | $ cat ../.hg/patches/foo |
|
835 | 839 | foo |
|
836 | 840 | |
|
837 | 841 | diff -r cb9a9f314b8b b/f |
|
838 | 842 | --- /dev/null\t(?P<date>.*) (re) |
|
839 | 843 | \+\+\+ b/b/f\t(?P<date>.*) (re) |
|
840 | 844 | @@ -0,0 +1,1 @@ |
|
841 | 845 | +f |
|
842 | 846 | $ hg status |
|
843 | 847 | M a |
|
844 | 848 | |
|
845 | 849 | |
|
846 | 850 | qpush failure |
|
847 | 851 | |
|
848 | 852 | $ cd .. |
|
849 | 853 | $ hg qrefresh |
|
850 | 854 | $ hg qnew -mbar bar |
|
851 | 855 | $ echo foo > foo |
|
852 | 856 | $ echo bar > bar |
|
853 | 857 | $ hg add foo bar |
|
854 | 858 | $ hg qrefresh |
|
855 | 859 | $ hg qpop -a |
|
856 | 860 | popping bar |
|
857 | 861 | popping foo |
|
858 | 862 | patch queue now empty |
|
859 | 863 | $ echo bar > foo |
|
860 | 864 | $ hg qpush -a |
|
861 | 865 | applying foo |
|
862 | 866 | applying bar |
|
863 | 867 | file foo already exists |
|
864 | 868 | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej |
|
865 | 869 | patch failed, unable to continue (try -v) |
|
866 | 870 | patch failed, rejects left in working dir |
|
867 | 871 | errors during apply, please fix and refresh bar |
|
868 | 872 | [2] |
|
869 | 873 | $ hg st |
|
870 | 874 | ? foo |
|
871 | 875 | ? foo.rej |
|
872 | 876 | |
|
873 | 877 | |
|
874 | 878 | mq tags |
|
875 | 879 | |
|
876 | 880 | $ hg log --template '{rev} {tags}\n' -r qparent:qtip |
|
877 | 881 | 0 qparent |
|
878 | 882 | 1 foo qbase |
|
879 | 883 | 2 bar qtip tip |
|
880 | 884 | |
|
881 | 885 | mq revset |
|
882 | 886 | |
|
883 | 887 | $ hg log -r 'mq()' --template '{rev}\n' |
|
884 | 888 | 1 |
|
885 | 889 | 2 |
|
886 | 890 | $ hg help revsets | grep -i mq |
|
887 | 891 | "mq()" |
|
888 | 892 | Changesets managed by MQ. |
|
889 | 893 | |
|
890 | 894 | bad node in status |
|
891 | 895 | |
|
892 | 896 | $ hg qpop |
|
893 | 897 | popping bar |
|
894 | 898 | now at: foo |
|
895 | 899 | $ hg strip -qn tip |
|
896 | 900 | $ hg tip |
|
897 | 901 | changeset: 0:cb9a9f314b8b |
|
898 | 902 | tag: tip |
|
899 | 903 | user: test |
|
900 | 904 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
901 | 905 | summary: a |
|
902 | 906 | |
|
903 | 907 | $ hg branches |
|
904 | 908 | default 0:cb9a9f314b8b |
|
905 | 909 | $ hg qpop |
|
906 | 910 | no patches applied |
|
907 | 911 | [1] |
|
908 | 912 | |
|
909 | 913 | $ cd .. |
|
910 | 914 | |
|
911 | 915 | |
|
912 | 916 | git patches |
|
913 | 917 | |
|
914 | 918 | $ cat >>$HGRCPATH <<EOF |
|
915 | 919 | > [diff] |
|
916 | 920 | > git = True |
|
917 | 921 | > EOF |
|
918 | 922 | $ hg init git |
|
919 | 923 | $ cd git |
|
920 | 924 | $ hg qinit |
|
921 | 925 | |
|
922 | 926 | $ hg qnew -m'new file' new |
|
923 | 927 | $ echo foo > new |
|
924 | 928 | #if execbit |
|
925 | 929 | $ chmod +x new |
|
926 | 930 | #endif |
|
927 | 931 | $ hg add new |
|
928 | 932 | $ hg qrefresh |
|
929 | 933 | #if execbit |
|
930 | 934 | $ cat .hg/patches/new |
|
931 | 935 | new file |
|
932 | 936 | |
|
933 | 937 | diff --git a/new b/new |
|
934 | 938 | new file mode 100755 |
|
935 | 939 | --- /dev/null |
|
936 | 940 | +++ b/new |
|
937 | 941 | @@ -0,0 +1,1 @@ |
|
938 | 942 | +foo |
|
939 | 943 | #else |
|
940 | 944 | $ cat .hg/patches/new |
|
941 | 945 | new file |
|
942 | 946 | |
|
943 | 947 | diff --git a/new b/new |
|
944 | 948 | new file mode 100644 |
|
945 | 949 | --- /dev/null |
|
946 | 950 | +++ b/new |
|
947 | 951 | @@ -0,0 +1,1 @@ |
|
948 | 952 | +foo |
|
949 | 953 | #endif |
|
950 | 954 | |
|
951 | 955 | $ hg qnew -m'copy file' copy |
|
952 | 956 | $ hg cp new copy |
|
953 | 957 | $ hg qrefresh |
|
954 | 958 | $ cat .hg/patches/copy |
|
955 | 959 | copy file |
|
956 | 960 | |
|
957 | 961 | diff --git a/new b/copy |
|
958 | 962 | copy from new |
|
959 | 963 | copy to copy |
|
960 | 964 | |
|
961 | 965 | $ hg qpop |
|
962 | 966 | popping copy |
|
963 | 967 | now at: new |
|
964 | 968 | $ hg qpush |
|
965 | 969 | applying copy |
|
966 | 970 | now at: copy |
|
967 | 971 | $ hg qdiff |
|
968 | 972 | diff --git a/new b/copy |
|
969 | 973 | copy from new |
|
970 | 974 | copy to copy |
|
971 | 975 | $ cat >>$HGRCPATH <<EOF |
|
972 | 976 | > [diff] |
|
973 | 977 | > git = False |
|
974 | 978 | > EOF |
|
975 | 979 | $ hg qdiff --git |
|
976 | 980 | diff --git a/new b/copy |
|
977 | 981 | copy from new |
|
978 | 982 | copy to copy |
|
979 | 983 | $ cd .. |
|
980 | 984 | |
|
981 | 985 | empty lines in status |
|
982 | 986 | |
|
983 | 987 | $ hg init emptystatus |
|
984 | 988 | $ cd emptystatus |
|
985 | 989 | $ hg qinit |
|
986 | 990 | $ printf '\n\n' > .hg/patches/status |
|
987 | 991 | $ hg qser |
|
988 | 992 | $ cd .. |
|
989 | 993 | |
|
990 | 994 | bad line in status (without ":") |
|
991 | 995 | |
|
992 | 996 | $ hg init badstatus |
|
993 | 997 | $ cd badstatus |
|
994 | 998 | $ hg qinit |
|
995 | 999 | $ printf 'babar has no colon in this line\n' > .hg/patches/status |
|
996 | 1000 | $ hg qser |
|
997 | 1001 | malformated mq status line: ['babar has no colon in this line'] |
|
998 | 1002 | $ cd .. |
|
999 | 1003 | |
|
1000 | 1004 | |
|
1001 | 1005 | test file addition in slow path |
|
1002 | 1006 | |
|
1003 | 1007 | $ hg init slow |
|
1004 | 1008 | $ cd slow |
|
1005 | 1009 | $ hg qinit |
|
1006 | 1010 | $ echo foo > foo |
|
1007 | 1011 | $ hg add foo |
|
1008 | 1012 | $ hg ci -m 'add foo' |
|
1009 | 1013 | $ hg qnew bar |
|
1010 | 1014 | $ echo bar > bar |
|
1011 | 1015 | $ hg add bar |
|
1012 | 1016 | $ hg mv foo baz |
|
1013 | 1017 | $ hg qrefresh --git |
|
1014 | 1018 | $ hg up -C 0 |
|
1015 | 1019 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1016 | 1020 | $ echo >> foo |
|
1017 | 1021 | $ hg ci -m 'change foo' |
|
1018 | 1022 | created new head |
|
1019 | 1023 | $ hg up -C 1 |
|
1020 | 1024 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1021 | 1025 | $ hg qrefresh --git |
|
1022 | 1026 | $ cat .hg/patches/bar |
|
1023 | 1027 | diff --git a/bar b/bar |
|
1024 | 1028 | new file mode 100644 |
|
1025 | 1029 | --- /dev/null |
|
1026 | 1030 | +++ b/bar |
|
1027 | 1031 | @@ -0,0 +1,1 @@ |
|
1028 | 1032 | +bar |
|
1029 | 1033 | diff --git a/foo b/baz |
|
1030 | 1034 | rename from foo |
|
1031 | 1035 | rename to baz |
|
1032 | 1036 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1033 | 1037 | 2 baz (foo) |
|
1034 | 1038 | $ hg qrefresh --git |
|
1035 | 1039 | $ cat .hg/patches/bar |
|
1036 | 1040 | diff --git a/bar b/bar |
|
1037 | 1041 | new file mode 100644 |
|
1038 | 1042 | --- /dev/null |
|
1039 | 1043 | +++ b/bar |
|
1040 | 1044 | @@ -0,0 +1,1 @@ |
|
1041 | 1045 | +bar |
|
1042 | 1046 | diff --git a/foo b/baz |
|
1043 | 1047 | rename from foo |
|
1044 | 1048 | rename to baz |
|
1045 | 1049 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1046 | 1050 | 2 baz (foo) |
|
1047 | 1051 | $ hg qrefresh |
|
1048 | 1052 | $ grep 'diff --git' .hg/patches/bar |
|
1049 | 1053 | diff --git a/bar b/bar |
|
1050 | 1054 | diff --git a/foo b/baz |
|
1051 | 1055 | |
|
1052 | 1056 | |
|
1053 | 1057 | test file move chains in the slow path |
|
1054 | 1058 | |
|
1055 | 1059 | $ hg up -C 1 |
|
1056 | 1060 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1057 | 1061 | $ echo >> foo |
|
1058 | 1062 | $ hg ci -m 'change foo again' |
|
1059 | 1063 | $ hg up -C 2 |
|
1060 | 1064 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1061 | 1065 | $ hg mv bar quux |
|
1062 | 1066 | $ hg mv baz bleh |
|
1063 | 1067 | $ hg qrefresh --git |
|
1064 | 1068 | $ cat .hg/patches/bar |
|
1065 | 1069 | diff --git a/foo b/bleh |
|
1066 | 1070 | rename from foo |
|
1067 | 1071 | rename to bleh |
|
1068 | 1072 | diff --git a/quux b/quux |
|
1069 | 1073 | new file mode 100644 |
|
1070 | 1074 | --- /dev/null |
|
1071 | 1075 | +++ b/quux |
|
1072 | 1076 | @@ -0,0 +1,1 @@ |
|
1073 | 1077 | +bar |
|
1074 | 1078 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1075 | 1079 | 3 bleh (foo) |
|
1076 | 1080 | $ hg mv quux fred |
|
1077 | 1081 | $ hg mv bleh barney |
|
1078 | 1082 | $ hg qrefresh --git |
|
1079 | 1083 | $ cat .hg/patches/bar |
|
1080 | 1084 | diff --git a/foo b/barney |
|
1081 | 1085 | rename from foo |
|
1082 | 1086 | rename to barney |
|
1083 | 1087 | diff --git a/fred b/fred |
|
1084 | 1088 | new file mode 100644 |
|
1085 | 1089 | --- /dev/null |
|
1086 | 1090 | +++ b/fred |
|
1087 | 1091 | @@ -0,0 +1,1 @@ |
|
1088 | 1092 | +bar |
|
1089 | 1093 | $ hg log -v --template '{rev} {file_copies}\n' -r . |
|
1090 | 1094 | 3 barney (foo) |
|
1091 | 1095 | |
|
1092 | 1096 | |
|
1093 | 1097 | refresh omitting an added file |
|
1094 | 1098 | |
|
1095 | 1099 | $ hg qnew baz |
|
1096 | 1100 | $ echo newfile > newfile |
|
1097 | 1101 | $ hg add newfile |
|
1098 | 1102 | $ hg qrefresh |
|
1099 | 1103 | $ hg st -A newfile |
|
1100 | 1104 | C newfile |
|
1101 | 1105 | $ hg qrefresh -X newfile |
|
1102 | 1106 | $ hg st -A newfile |
|
1103 | 1107 | A newfile |
|
1104 | 1108 | $ hg revert newfile |
|
1105 | 1109 | $ rm newfile |
|
1106 | 1110 | $ hg qpop |
|
1107 | 1111 | popping baz |
|
1108 | 1112 | now at: bar |
|
1109 | 1113 | $ hg qdel baz |
|
1110 | 1114 | |
|
1111 | 1115 | |
|
1112 | 1116 | create a git patch |
|
1113 | 1117 | |
|
1114 | 1118 | $ echo a > alexander |
|
1115 | 1119 | $ hg add alexander |
|
1116 | 1120 | $ hg qnew -f --git addalexander |
|
1117 | 1121 | $ grep diff .hg/patches/addalexander |
|
1118 | 1122 | diff --git a/alexander b/alexander |
|
1119 | 1123 | |
|
1120 | 1124 | |
|
1121 | 1125 | create a git binary patch |
|
1122 | 1126 | |
|
1123 | 1127 | $ cat > writebin.py <<EOF |
|
1124 | 1128 | > import sys |
|
1125 | 1129 | > path = sys.argv[1] |
|
1126 | 1130 | > open(path, 'wb').write('BIN\x00ARY') |
|
1127 | 1131 | > EOF |
|
1128 | 1132 | $ python writebin.py bucephalus |
|
1129 | 1133 | |
|
1130 | 1134 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1131 | 1135 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1132 | 1136 | $ hg add bucephalus |
|
1133 | 1137 | $ hg qnew -f --git addbucephalus |
|
1134 | 1138 | $ grep diff .hg/patches/addbucephalus |
|
1135 | 1139 | diff --git a/bucephalus b/bucephalus |
|
1136 | 1140 | |
|
1137 | 1141 | |
|
1138 | 1142 | check binary patches can be popped and pushed |
|
1139 | 1143 | |
|
1140 | 1144 | $ hg qpop |
|
1141 | 1145 | popping addbucephalus |
|
1142 | 1146 | now at: addalexander |
|
1143 | 1147 | $ test -f bucephalus && echo % bucephalus should not be there |
|
1144 | 1148 | [1] |
|
1145 | 1149 | $ hg qpush |
|
1146 | 1150 | applying addbucephalus |
|
1147 | 1151 | now at: addbucephalus |
|
1148 | 1152 | $ test -f bucephalus |
|
1149 | 1153 | $ python "$TESTDIR/md5sum.py" bucephalus |
|
1150 | 1154 | 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus |
|
1151 | 1155 | |
|
1152 | 1156 | |
|
1153 | 1157 | |
|
1154 | 1158 | strip again |
|
1155 | 1159 | |
|
1156 | 1160 | $ cd .. |
|
1157 | 1161 | $ hg init strip |
|
1158 | 1162 | $ cd strip |
|
1159 | 1163 | $ touch foo |
|
1160 | 1164 | $ hg add foo |
|
1161 | 1165 | $ hg ci -m 'add foo' |
|
1162 | 1166 | $ echo >> foo |
|
1163 | 1167 | $ hg ci -m 'change foo 1' |
|
1164 | 1168 | $ hg up -C 0 |
|
1165 | 1169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1166 | 1170 | $ echo 1 >> foo |
|
1167 | 1171 | $ hg ci -m 'change foo 2' |
|
1168 | 1172 | created new head |
|
1169 | 1173 | $ HGMERGE=true hg merge |
|
1170 | 1174 | merging foo |
|
1171 | 1175 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1172 | 1176 | (branch merge, don't forget to commit) |
|
1173 | 1177 | $ hg ci -m merge |
|
1174 | 1178 | $ hg log |
|
1175 | 1179 | changeset: 3:99615015637b |
|
1176 | 1180 | tag: tip |
|
1177 | 1181 | parent: 2:20cbbe65cff7 |
|
1178 | 1182 | parent: 1:d2871fc282d4 |
|
1179 | 1183 | user: test |
|
1180 | 1184 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1181 | 1185 | summary: merge |
|
1182 | 1186 | |
|
1183 | 1187 | changeset: 2:20cbbe65cff7 |
|
1184 | 1188 | parent: 0:53245c60e682 |
|
1185 | 1189 | user: test |
|
1186 | 1190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1187 | 1191 | summary: change foo 2 |
|
1188 | 1192 | |
|
1189 | 1193 | changeset: 1:d2871fc282d4 |
|
1190 | 1194 | user: test |
|
1191 | 1195 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1192 | 1196 | summary: change foo 1 |
|
1193 | 1197 | |
|
1194 | 1198 | changeset: 0:53245c60e682 |
|
1195 | 1199 | user: test |
|
1196 | 1200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1197 | 1201 | summary: add foo |
|
1198 | 1202 | |
|
1199 | 1203 | $ hg strip 1 |
|
1200 | 1204 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1201 | 1205 | saved backup bundle to $TESTTMP/strip/.hg/strip-backup/*-backup.hg (glob) |
|
1202 | 1206 | $ checkundo strip |
|
1203 | 1207 | $ hg log |
|
1204 | 1208 | changeset: 1:20cbbe65cff7 |
|
1205 | 1209 | tag: tip |
|
1206 | 1210 | user: test |
|
1207 | 1211 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1208 | 1212 | summary: change foo 2 |
|
1209 | 1213 | |
|
1210 | 1214 | changeset: 0:53245c60e682 |
|
1211 | 1215 | user: test |
|
1212 | 1216 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1213 | 1217 | summary: add foo |
|
1214 | 1218 | |
|
1215 | 1219 | $ cd .. |
|
1216 | 1220 | |
|
1217 | 1221 | |
|
1218 | 1222 | qclone |
|
1219 | 1223 | |
|
1220 | 1224 | $ qlog() |
|
1221 | 1225 | > { |
|
1222 | 1226 | > echo 'main repo:' |
|
1223 | 1227 | > hg log --template ' rev {rev}: {desc}\n' |
|
1224 | 1228 | > echo 'patch repo:' |
|
1225 | 1229 | > hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
|
1226 | 1230 | > } |
|
1227 | 1231 | $ hg init qclonesource |
|
1228 | 1232 | $ cd qclonesource |
|
1229 | 1233 | $ echo foo > foo |
|
1230 | 1234 | $ hg add foo |
|
1231 | 1235 | $ hg ci -m 'add foo' |
|
1232 | 1236 | $ hg qinit |
|
1233 | 1237 | $ hg qnew patch1 |
|
1234 | 1238 | $ echo bar >> foo |
|
1235 | 1239 | $ hg qrefresh -m 'change foo' |
|
1236 | 1240 | $ cd .. |
|
1237 | 1241 | |
|
1238 | 1242 | |
|
1239 | 1243 | repo with unversioned patch dir |
|
1240 | 1244 | |
|
1241 | 1245 | $ hg qclone qclonesource failure |
|
1242 | 1246 | abort: versioned patch repository not found (see init --mq) |
|
1243 | 1247 | [255] |
|
1244 | 1248 | |
|
1245 | 1249 | $ cd qclonesource |
|
1246 | 1250 | $ hg qinit -c |
|
1247 | 1251 | adding .hg/patches/patch1 (glob) |
|
1248 | 1252 | $ hg qci -m checkpoint |
|
1249 | 1253 | $ qlog |
|
1250 | 1254 | main repo: |
|
1251 | 1255 | rev 1: change foo |
|
1252 | 1256 | rev 0: add foo |
|
1253 | 1257 | patch repo: |
|
1254 | 1258 | rev 0: checkpoint |
|
1255 | 1259 | $ cd .. |
|
1256 | 1260 | |
|
1257 | 1261 | |
|
1258 | 1262 | repo with patches applied |
|
1259 | 1263 | |
|
1260 | 1264 | $ hg qclone qclonesource qclonedest |
|
1261 | 1265 | updating to branch default |
|
1262 | 1266 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1263 | 1267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1264 | 1268 | $ cd qclonedest |
|
1265 | 1269 | $ qlog |
|
1266 | 1270 | main repo: |
|
1267 | 1271 | rev 0: add foo |
|
1268 | 1272 | patch repo: |
|
1269 | 1273 | rev 0: checkpoint |
|
1270 | 1274 | $ cd .. |
|
1271 | 1275 | |
|
1272 | 1276 | |
|
1273 | 1277 | repo with patches unapplied |
|
1274 | 1278 | |
|
1275 | 1279 | $ cd qclonesource |
|
1276 | 1280 | $ hg qpop -a |
|
1277 | 1281 | popping patch1 |
|
1278 | 1282 | patch queue now empty |
|
1279 | 1283 | $ qlog |
|
1280 | 1284 | main repo: |
|
1281 | 1285 | rev 0: add foo |
|
1282 | 1286 | patch repo: |
|
1283 | 1287 | rev 0: checkpoint |
|
1284 | 1288 | $ cd .. |
|
1285 | 1289 | $ hg qclone qclonesource qclonedest2 |
|
1286 | 1290 | updating to branch default |
|
1287 | 1291 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1288 | 1292 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1289 | 1293 | $ cd qclonedest2 |
|
1290 | 1294 | $ qlog |
|
1291 | 1295 | main repo: |
|
1292 | 1296 | rev 0: add foo |
|
1293 | 1297 | patch repo: |
|
1294 | 1298 | rev 0: checkpoint |
|
1295 | 1299 | $ cd .. |
|
1296 | 1300 | |
|
1297 | 1301 | |
|
1298 | 1302 | Issue1033: test applying on an empty file |
|
1299 | 1303 | |
|
1300 | 1304 | $ hg init empty |
|
1301 | 1305 | $ cd empty |
|
1302 | 1306 | $ touch a |
|
1303 | 1307 | $ hg ci -Am addempty |
|
1304 | 1308 | adding a |
|
1305 | 1309 | $ echo a > a |
|
1306 | 1310 | $ hg qnew -f -e changea |
|
1307 | 1311 | $ hg qpop |
|
1308 | 1312 | popping changea |
|
1309 | 1313 | patch queue now empty |
|
1310 | 1314 | $ hg qpush |
|
1311 | 1315 | applying changea |
|
1312 | 1316 | now at: changea |
|
1313 | 1317 | $ cd .. |
|
1314 | 1318 | |
|
1315 | 1319 | test qpush with --force, issue1087 |
|
1316 | 1320 | |
|
1317 | 1321 | $ hg init forcepush |
|
1318 | 1322 | $ cd forcepush |
|
1319 | 1323 | $ echo hello > hello.txt |
|
1320 | 1324 | $ echo bye > bye.txt |
|
1321 | 1325 | $ hg ci -Ama |
|
1322 | 1326 | adding bye.txt |
|
1323 | 1327 | adding hello.txt |
|
1324 | 1328 | $ hg qnew -d '0 0' empty |
|
1325 | 1329 | $ hg qpop |
|
1326 | 1330 | popping empty |
|
1327 | 1331 | patch queue now empty |
|
1328 | 1332 | $ echo world >> hello.txt |
|
1329 | 1333 | |
|
1330 | 1334 | |
|
1331 | 1335 | qpush should fail, local changes |
|
1332 | 1336 | |
|
1333 | 1337 | $ hg qpush |
|
1334 | 1338 | abort: local changes found |
|
1335 | 1339 | [255] |
|
1336 | 1340 | |
|
1337 | 1341 | |
|
1338 | 1342 | apply force, should not discard changes with empty patch |
|
1339 | 1343 | |
|
1340 | 1344 | $ hg qpush -f |
|
1341 | 1345 | applying empty |
|
1342 | 1346 | patch empty is empty |
|
1343 | 1347 | now at: empty |
|
1344 | 1348 | $ hg diff --config diff.nodates=True |
|
1345 | 1349 | diff -r d58265112590 hello.txt |
|
1346 | 1350 | --- a/hello.txt |
|
1347 | 1351 | +++ b/hello.txt |
|
1348 | 1352 | @@ -1,1 +1,2 @@ |
|
1349 | 1353 | hello |
|
1350 | 1354 | +world |
|
1351 | 1355 | $ hg qdiff --config diff.nodates=True |
|
1352 | 1356 | diff -r 9ecee4f634e3 hello.txt |
|
1353 | 1357 | --- a/hello.txt |
|
1354 | 1358 | +++ b/hello.txt |
|
1355 | 1359 | @@ -1,1 +1,2 @@ |
|
1356 | 1360 | hello |
|
1357 | 1361 | +world |
|
1358 | 1362 | $ hg log -l1 -p |
|
1359 | 1363 | changeset: 1:d58265112590 |
|
1360 | 1364 | tag: empty |
|
1361 | 1365 | tag: qbase |
|
1362 | 1366 | tag: qtip |
|
1363 | 1367 | tag: tip |
|
1364 | 1368 | user: test |
|
1365 | 1369 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1366 | 1370 | summary: imported patch empty |
|
1367 | 1371 | |
|
1368 | 1372 | |
|
1369 | 1373 | $ hg qref -d '0 0' |
|
1370 | 1374 | $ hg qpop |
|
1371 | 1375 | popping empty |
|
1372 | 1376 | patch queue now empty |
|
1373 | 1377 | $ echo universe >> hello.txt |
|
1374 | 1378 | $ echo universe >> bye.txt |
|
1375 | 1379 | |
|
1376 | 1380 | |
|
1377 | 1381 | qpush should fail, local changes |
|
1378 | 1382 | |
|
1379 | 1383 | $ hg qpush |
|
1380 | 1384 | abort: local changes found |
|
1381 | 1385 | [255] |
|
1382 | 1386 | |
|
1383 | 1387 | |
|
1384 | 1388 | apply force, should discard changes in hello, but not bye |
|
1385 | 1389 | |
|
1386 | 1390 | $ hg qpush -f --verbose |
|
1387 | 1391 | applying empty |
|
1388 | 1392 | saving current version of hello.txt as hello.txt.orig |
|
1389 | 1393 | patching file hello.txt |
|
1390 | 1394 | hello.txt |
|
1391 | 1395 | now at: empty |
|
1392 | 1396 | $ hg st |
|
1393 | 1397 | M bye.txt |
|
1394 | 1398 | ? hello.txt.orig |
|
1395 | 1399 | $ hg diff --config diff.nodates=True |
|
1396 | 1400 | diff -r ba252371dbc1 bye.txt |
|
1397 | 1401 | --- a/bye.txt |
|
1398 | 1402 | +++ b/bye.txt |
|
1399 | 1403 | @@ -1,1 +1,2 @@ |
|
1400 | 1404 | bye |
|
1401 | 1405 | +universe |
|
1402 | 1406 | $ hg qdiff --config diff.nodates=True |
|
1403 | 1407 | diff -r 9ecee4f634e3 bye.txt |
|
1404 | 1408 | --- a/bye.txt |
|
1405 | 1409 | +++ b/bye.txt |
|
1406 | 1410 | @@ -1,1 +1,2 @@ |
|
1407 | 1411 | bye |
|
1408 | 1412 | +universe |
|
1409 | 1413 | diff -r 9ecee4f634e3 hello.txt |
|
1410 | 1414 | --- a/hello.txt |
|
1411 | 1415 | +++ b/hello.txt |
|
1412 | 1416 | @@ -1,1 +1,3 @@ |
|
1413 | 1417 | hello |
|
1414 | 1418 | +world |
|
1415 | 1419 | +universe |
|
1416 | 1420 | |
|
1417 | 1421 | |
|
1418 | 1422 | test popping revisions not in working dir ancestry |
|
1419 | 1423 | |
|
1420 | 1424 | $ hg qseries -v |
|
1421 | 1425 | 0 A empty |
|
1422 | 1426 | $ hg up qparent |
|
1423 | 1427 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1424 | 1428 | $ hg qpop |
|
1425 | 1429 | popping empty |
|
1426 | 1430 | patch queue now empty |
|
1427 | 1431 | |
|
1428 | 1432 | $ cd .. |
|
1429 | 1433 | $ hg init deletion-order |
|
1430 | 1434 | $ cd deletion-order |
|
1431 | 1435 | |
|
1432 | 1436 | $ touch a |
|
1433 | 1437 | $ hg ci -Aqm0 |
|
1434 | 1438 | |
|
1435 | 1439 | $ hg qnew rename-dir |
|
1436 | 1440 | $ hg rm a |
|
1437 | 1441 | $ hg qrefresh |
|
1438 | 1442 | |
|
1439 | 1443 | $ mkdir a b |
|
1440 | 1444 | $ touch a/a b/b |
|
1441 | 1445 | $ hg add -q a b |
|
1442 | 1446 | $ hg qrefresh |
|
1443 | 1447 | |
|
1444 | 1448 | |
|
1445 | 1449 | test popping must remove files added in subdirectories first |
|
1446 | 1450 | |
|
1447 | 1451 | $ hg qpop |
|
1448 | 1452 | popping rename-dir |
|
1449 | 1453 | patch queue now empty |
|
1450 | 1454 | $ cd .. |
|
1451 | 1455 | |
|
1452 | 1456 | |
|
1453 | 1457 | test case preservation through patch pushing especially on case |
|
1454 | 1458 | insensitive filesystem |
|
1455 | 1459 | |
|
1456 | 1460 | $ hg init casepreserve |
|
1457 | 1461 | $ cd casepreserve |
|
1458 | 1462 | |
|
1459 | 1463 | $ hg qnew add-file1 |
|
1460 | 1464 | $ echo a > TeXtFiLe.TxT |
|
1461 | 1465 | $ hg add TeXtFiLe.TxT |
|
1462 | 1466 | $ hg qrefresh |
|
1463 | 1467 | |
|
1464 | 1468 | $ hg qnew add-file2 |
|
1465 | 1469 | $ echo b > AnOtHeRFiLe.TxT |
|
1466 | 1470 | $ hg add AnOtHeRFiLe.TxT |
|
1467 | 1471 | $ hg qrefresh |
|
1468 | 1472 | |
|
1469 | 1473 | $ hg qnew modify-file |
|
1470 | 1474 | $ echo c >> AnOtHeRFiLe.TxT |
|
1471 | 1475 | $ hg qrefresh |
|
1472 | 1476 | |
|
1473 | 1477 | $ hg qapplied |
|
1474 | 1478 | add-file1 |
|
1475 | 1479 | add-file2 |
|
1476 | 1480 | modify-file |
|
1477 | 1481 | $ hg qpop -a |
|
1478 | 1482 | popping modify-file |
|
1479 | 1483 | popping add-file2 |
|
1480 | 1484 | popping add-file1 |
|
1481 | 1485 | patch queue now empty |
|
1482 | 1486 | |
|
1483 | 1487 | this qpush causes problems below, if case preservation on case |
|
1484 | 1488 | insensitive filesystem is not enough: |
|
1485 | 1489 | (1) unexpected "adding ..." messages are shown |
|
1486 | 1490 | (2) patching fails in modification of (1) files |
|
1487 | 1491 | |
|
1488 | 1492 | $ hg qpush -a |
|
1489 | 1493 | applying add-file1 |
|
1490 | 1494 | applying add-file2 |
|
1491 | 1495 | applying modify-file |
|
1492 | 1496 | now at: modify-file |
|
1493 | 1497 | |
|
1494 | 1498 | Proper phase default with mq: |
|
1495 | 1499 | |
|
1496 | 1500 | 1. mq.secret=false |
|
1497 | 1501 | |
|
1498 | 1502 | $ rm .hg/store/phaseroots |
|
1499 | 1503 | $ hg phase 'qparent::' |
|
1500 | 1504 | 0: draft |
|
1501 | 1505 | 1: draft |
|
1502 | 1506 | 2: draft |
|
1503 | 1507 | $ echo '[mq]' >> $HGRCPATH |
|
1504 | 1508 | $ echo 'secret=true' >> $HGRCPATH |
|
1505 | 1509 | $ rm -f .hg/store/phaseroots |
|
1506 | 1510 | $ hg phase 'qparent::' |
|
1507 | 1511 | 0: secret |
|
1508 | 1512 | 1: secret |
|
1509 | 1513 | 2: secret |
|
1510 | 1514 | |
|
1511 | 1515 | Test that qfinish change phase when mq.secret=true |
|
1512 | 1516 | |
|
1513 | 1517 | $ hg qfinish qbase |
|
1514 | 1518 | patch add-file1 finalized without changeset message |
|
1515 | 1519 | $ hg phase 'all()' |
|
1516 | 1520 | 0: draft |
|
1517 | 1521 | 1: secret |
|
1518 | 1522 | 2: secret |
|
1519 | 1523 | |
|
1520 | 1524 | Test that qfinish respect phases.new-commit setting |
|
1521 | 1525 | |
|
1522 | 1526 | $ echo '[phases]' >> $HGRCPATH |
|
1523 | 1527 | $ echo 'new-commit=secret' >> $HGRCPATH |
|
1524 | 1528 | $ hg qfinish qbase |
|
1525 | 1529 | patch add-file2 finalized without changeset message |
|
1526 | 1530 | $ hg phase 'all()' |
|
1527 | 1531 | 0: draft |
|
1528 | 1532 | 1: secret |
|
1529 | 1533 | 2: secret |
|
1530 | 1534 | |
|
1531 | 1535 | (restore env for next test) |
|
1532 | 1536 | |
|
1533 | 1537 | $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp |
|
1534 | 1538 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1535 | 1539 | $ hg qimport -r 1 --name add-file2 |
|
1536 | 1540 | |
|
1537 | 1541 | Test that qfinish preserve phase when mq.secret=false |
|
1538 | 1542 | |
|
1539 | 1543 | $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp |
|
1540 | 1544 | $ cp $TESTTMP/sedtmp $HGRCPATH |
|
1541 | 1545 | $ hg qfinish qbase |
|
1542 | 1546 | patch add-file2 finalized without changeset message |
|
1543 | 1547 | $ hg phase 'all()' |
|
1544 | 1548 | 0: draft |
|
1545 | 1549 | 1: secret |
|
1546 | 1550 | 2: secret |
|
1547 | 1551 | |
|
1548 | 1552 | $ cd .. |
@@ -1,370 +1,373 b'' | |||
|
1 | 1 | |
|
2 | 2 | |
|
3 | 3 | This test tries to exercise the ssh functionality with a dummy script |
|
4 | 4 | |
|
5 | 5 | creating 'remote' repo |
|
6 | 6 | |
|
7 | 7 | $ hg init remote |
|
8 | 8 | $ cd remote |
|
9 | 9 | $ echo this > foo |
|
10 | 10 | $ echo this > fooO |
|
11 | 11 | $ hg ci -A -m "init" foo fooO |
|
12 | 12 | $ cat <<EOF > .hg/hgrc |
|
13 | 13 | > [server] |
|
14 | 14 | > uncompressed = True |
|
15 | 15 | > |
|
16 | 16 | > [hooks] |
|
17 | 17 | > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog |
|
18 | 18 | > EOF |
|
19 | 19 | $ cd .. |
|
20 | 20 | |
|
21 | 21 | repo not found error |
|
22 | 22 | |
|
23 | 23 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
24 | 24 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
25 | 25 | abort: no suitable response from remote hg! |
|
26 | 26 | [255] |
|
27 | 27 | |
|
28 | 28 | non-existent absolute path |
|
29 | 29 | |
|
30 | 30 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local |
|
31 | 31 | remote: abort: there is no Mercurial repository here (.hg not found)! |
|
32 | 32 | abort: no suitable response from remote hg! |
|
33 | 33 | [255] |
|
34 | 34 | |
|
35 | 35 | clone remote via stream |
|
36 | 36 | |
|
37 | 37 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream |
|
38 | 38 | streaming all changes |
|
39 | 39 | 4 files to transfer, 392 bytes of data |
|
40 | 40 | transferred 392 bytes in * seconds (*/sec) (glob) |
|
41 | 41 | updating to branch default |
|
42 | 42 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 43 | $ cd local-stream |
|
44 | 44 | $ hg verify |
|
45 | 45 | checking changesets |
|
46 | 46 | checking manifests |
|
47 | 47 | crosschecking files in changesets and manifests |
|
48 | 48 | checking files |
|
49 | 49 | 2 files, 1 changesets, 2 total revisions |
|
50 | 50 | $ cd .. |
|
51 | 51 | |
|
52 | 52 | clone remote via pull |
|
53 | 53 | |
|
54 | 54 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
55 | 55 | requesting all changes |
|
56 | 56 | adding changesets |
|
57 | 57 | adding manifests |
|
58 | 58 | adding file changes |
|
59 | 59 | added 1 changesets with 2 changes to 2 files |
|
60 | 60 | updating to branch default |
|
61 | 61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 62 | |
|
63 | 63 | verify |
|
64 | 64 | |
|
65 | 65 | $ cd local |
|
66 | 66 | $ hg verify |
|
67 | 67 | checking changesets |
|
68 | 68 | checking manifests |
|
69 | 69 | crosschecking files in changesets and manifests |
|
70 | 70 | checking files |
|
71 | 71 | 2 files, 1 changesets, 2 total revisions |
|
72 | 72 | $ echo '[hooks]' >> .hg/hgrc |
|
73 | 73 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc |
|
74 | 74 | |
|
75 | 75 | empty default pull |
|
76 | 76 | |
|
77 | 77 | $ hg paths |
|
78 | 78 | default = ssh://user@dummy/remote |
|
79 | 79 | $ hg pull -e "python \"$TESTDIR/dummyssh\"" |
|
80 | 80 | pulling from ssh://user@dummy/remote |
|
81 | 81 | searching for changes |
|
82 | 82 | no changes found |
|
83 | 83 | |
|
84 | 84 | local change |
|
85 | 85 | |
|
86 | 86 | $ echo bleah > foo |
|
87 | 87 | $ hg ci -m "add" |
|
88 | 88 | |
|
89 | 89 | updating rc |
|
90 | 90 | |
|
91 | 91 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
92 | 92 | $ echo "[ui]" >> .hg/hgrc |
|
93 | 93 | $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
94 | 94 | |
|
95 | 95 | find outgoing |
|
96 | 96 | |
|
97 | 97 | $ hg out ssh://user@dummy/remote |
|
98 | 98 | comparing with ssh://user@dummy/remote |
|
99 | 99 | searching for changes |
|
100 | 100 | changeset: 1:a28a9d1a809c |
|
101 | 101 | tag: tip |
|
102 | 102 | user: test |
|
103 | 103 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
104 | 104 | summary: add |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | find incoming on the remote side |
|
108 | 108 | |
|
109 | 109 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
110 | 110 | comparing with ssh://user@dummy/local |
|
111 | 111 | searching for changes |
|
112 | 112 | changeset: 1:a28a9d1a809c |
|
113 | 113 | tag: tip |
|
114 | 114 | user: test |
|
115 | 115 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
116 | 116 | summary: add |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | find incoming on the remote side (using absolute path) |
|
120 | 120 | |
|
121 | 121 | $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
122 | 122 | comparing with ssh://user@dummy/$TESTTMP/local |
|
123 | 123 | searching for changes |
|
124 | 124 | changeset: 1:a28a9d1a809c |
|
125 | 125 | tag: tip |
|
126 | 126 | user: test |
|
127 | 127 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | 128 | summary: add |
|
129 | 129 | |
|
130 | 130 | |
|
131 | 131 | push |
|
132 | 132 | |
|
133 | 133 | $ hg push |
|
134 | 134 | pushing to ssh://user@dummy/remote |
|
135 | 135 | searching for changes |
|
136 | 136 | remote: adding changesets |
|
137 | 137 | remote: adding manifests |
|
138 | 138 | remote: adding file changes |
|
139 | 139 | remote: added 1 changesets with 1 changes to 1 files |
|
140 | 140 | $ cd ../remote |
|
141 | 141 | |
|
142 | 142 | check remote tip |
|
143 | 143 | |
|
144 | 144 | $ hg tip |
|
145 | 145 | changeset: 1:a28a9d1a809c |
|
146 | 146 | tag: tip |
|
147 | 147 | user: test |
|
148 | 148 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
149 | 149 | summary: add |
|
150 | 150 | |
|
151 | 151 | $ hg verify |
|
152 | 152 | checking changesets |
|
153 | 153 | checking manifests |
|
154 | 154 | crosschecking files in changesets and manifests |
|
155 | 155 | checking files |
|
156 | 156 | 2 files, 2 changesets, 3 total revisions |
|
157 | 157 | $ hg cat -r tip foo |
|
158 | 158 | bleah |
|
159 | 159 | $ echo z > z |
|
160 | 160 | $ hg ci -A -m z z |
|
161 | 161 | created new head |
|
162 | 162 | |
|
163 | 163 | test pushkeys and bookmarks |
|
164 | 164 | |
|
165 | 165 | $ cd ../local |
|
166 | 166 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
167 | 167 | bookmarks |
|
168 | 168 | phases |
|
169 | 169 | namespaces |
|
170 | 170 | $ hg book foo -r 0 |
|
171 | 171 | $ hg out -B |
|
172 | 172 | comparing with ssh://user@dummy/remote |
|
173 | 173 | searching for changed bookmarks |
|
174 | 174 | foo 1160648e36ce |
|
175 | 175 | $ hg push -B foo |
|
176 | 176 | pushing to ssh://user@dummy/remote |
|
177 | 177 | searching for changes |
|
178 | 178 | no changes found |
|
179 | 179 | exporting bookmark foo |
|
180 | 180 | [1] |
|
181 | 181 | $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
182 | 182 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
183 | 183 | $ hg book -f foo |
|
184 | 184 | $ hg push --traceback |
|
185 | 185 | pushing to ssh://user@dummy/remote |
|
186 | 186 | searching for changes |
|
187 | 187 | no changes found |
|
188 | 188 | updating bookmark foo |
|
189 | 189 | [1] |
|
190 | 190 | $ hg book -d foo |
|
191 | 191 | $ hg in -B |
|
192 | 192 | comparing with ssh://user@dummy/remote |
|
193 | 193 | searching for changed bookmarks |
|
194 | 194 | foo a28a9d1a809c |
|
195 | 195 | $ hg book -f -r 0 foo |
|
196 | 196 | $ hg pull -B foo |
|
197 | 197 | pulling from ssh://user@dummy/remote |
|
198 | 198 | no changes found |
|
199 | 199 | updating bookmark foo |
|
200 | 200 | importing bookmark foo |
|
201 | 201 | $ hg book -d foo |
|
202 | 202 | $ hg push -B foo |
|
203 | 203 | pushing to ssh://user@dummy/remote |
|
204 | 204 | searching for changes |
|
205 | 205 | no changes found |
|
206 | 206 | deleting remote bookmark foo |
|
207 | 207 | [1] |
|
208 | 208 | |
|
209 | 209 | a bad, evil hook that prints to stdout |
|
210 | 210 | |
|
211 | 211 | $ cat <<EOF > $TESTTMP/badhook |
|
212 | 212 | > import sys |
|
213 | 213 | > sys.stdout.write("KABOOM\n") |
|
214 | 214 | > EOF |
|
215 | 215 | |
|
216 | 216 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
217 | 217 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
218 | 218 | $ echo r > r |
|
219 | 219 | $ hg ci -A -m z r |
|
220 | 220 | |
|
221 | 221 | push should succeed even though it has an unexpected response |
|
222 | 222 | |
|
223 | 223 | $ hg push |
|
224 | 224 | pushing to ssh://user@dummy/remote |
|
225 | 225 | searching for changes |
|
226 | 226 | note: unsynced remote changes! |
|
227 | 227 | remote: adding changesets |
|
228 | 228 | remote: adding manifests |
|
229 | 229 | remote: adding file changes |
|
230 | 230 | remote: added 1 changesets with 1 changes to 1 files |
|
231 | 231 | remote: KABOOM |
|
232 | 232 | $ hg -R ../remote heads |
|
233 | 233 | changeset: 3:1383141674ec |
|
234 | 234 | tag: tip |
|
235 | 235 | parent: 1:a28a9d1a809c |
|
236 | 236 | user: test |
|
237 | 237 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
238 | 238 | summary: z |
|
239 | 239 | |
|
240 | 240 | changeset: 2:6c0482d977a3 |
|
241 | 241 | parent: 0:1160648e36ce |
|
242 | 242 | user: test |
|
243 | 243 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
244 | 244 | summary: z |
|
245 | 245 | |
|
246 | 246 | |
|
247 | 247 | clone bookmarks |
|
248 | 248 | |
|
249 | 249 | $ hg -R ../remote bookmark test |
|
250 | 250 | $ hg -R ../remote bookmarks |
|
251 | 251 | * test 2:6c0482d977a3 |
|
252 | 252 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
253 | 253 | requesting all changes |
|
254 | 254 | adding changesets |
|
255 | 255 | adding manifests |
|
256 | 256 | adding file changes |
|
257 | 257 | added 4 changesets with 5 changes to 4 files (+1 heads) |
|
258 | 258 | updating to branch default |
|
259 | 259 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
260 | 260 | $ hg -R local-bookmarks bookmarks |
|
261 | 261 | test 2:6c0482d977a3 |
|
262 | 262 | |
|
263 | 263 | passwords in ssh urls are not supported |
|
264 | 264 | (we use a glob here because different Python versions give different |
|
265 | 265 | results here) |
|
266 | 266 | |
|
267 | 267 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
268 | 268 | pushing to ssh://user:*@dummy/remote (glob) |
|
269 | 269 | abort: password in URL not supported! |
|
270 | 270 | [255] |
|
271 | 271 | |
|
272 | 272 | $ cd .. |
|
273 | 273 | |
|
274 | hide outer repo | |
|
275 | $ hg init | |
|
276 | ||
|
274 | 277 | Test remote paths with spaces (issue2983): |
|
275 | 278 | |
|
276 | 279 | $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
277 | 280 | $ hg -R 'a repo' tag tag |
|
278 | 281 | $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
279 | 282 | 3fb238f49e8c |
|
280 | 283 | |
|
281 | 284 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
282 | 285 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
283 | 286 | parameters: |
|
284 | 287 | |
|
285 | 288 | $ cat > ssh.sh << EOF |
|
286 | 289 | > userhost="\$1" |
|
287 | 290 | > SSH_ORIGINAL_COMMAND="\$2" |
|
288 | 291 | > export SSH_ORIGINAL_COMMAND |
|
289 | 292 | > PYTHONPATH="$PYTHONPATH" |
|
290 | 293 | > export PYTHONPATH |
|
291 | 294 | > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
292 | 295 | > EOF |
|
293 | 296 | |
|
294 | 297 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
295 | 298 | 3fb238f49e8c |
|
296 | 299 | |
|
297 | 300 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
298 | 301 | remote: Illegal repository "$TESTTMP/a'repo" (glob) |
|
299 | 302 | abort: no suitable response from remote hg! |
|
300 | 303 | [255] |
|
301 | 304 | |
|
302 | 305 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
303 | 306 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
304 | 307 | abort: no suitable response from remote hg! |
|
305 | 308 | [255] |
|
306 | 309 | |
|
307 | 310 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh" |
|
308 | 311 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
309 | 312 | [255] |
|
310 | 313 | |
|
311 | 314 | Test hg-ssh in read-only mode: |
|
312 | 315 | |
|
313 | 316 | $ cat > ssh.sh << EOF |
|
314 | 317 | > userhost="\$1" |
|
315 | 318 | > SSH_ORIGINAL_COMMAND="\$2" |
|
316 | 319 | > export SSH_ORIGINAL_COMMAND |
|
317 | 320 | > PYTHONPATH="$PYTHONPATH" |
|
318 | 321 | > export PYTHONPATH |
|
319 | 322 | > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
320 | 323 | > EOF |
|
321 | 324 | |
|
322 | 325 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
323 | 326 | requesting all changes |
|
324 | 327 | adding changesets |
|
325 | 328 | adding manifests |
|
326 | 329 | adding file changes |
|
327 | 330 | added 4 changesets with 5 changes to 4 files (+1 heads) |
|
328 | 331 | updating to branch default |
|
329 | 332 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
330 | 333 | |
|
331 | 334 | $ cd read-only-local |
|
332 | 335 | $ echo "baz" > bar |
|
333 | 336 | $ hg ci -A -m "unpushable commit" bar |
|
334 | 337 | $ hg push --ssh "sh ../ssh.sh" |
|
335 | 338 | pushing to ssh://user@dummy/*/remote (glob) |
|
336 | 339 | searching for changes |
|
337 | 340 | remote: Permission denied |
|
338 | 341 | remote: abort: prechangegroup.hg-ssh hook failed |
|
339 | 342 | remote: Permission denied |
|
340 | 343 | remote: abort: prepushkey.hg-ssh hook failed |
|
341 | 344 | abort: unexpected response: empty string |
|
342 | 345 | [255] |
|
343 | 346 | |
|
344 | 347 | $ cd .. |
|
345 | 348 | |
|
346 | 349 | $ cat dummylog |
|
347 | 350 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
348 | 351 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
349 | 352 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
350 | 353 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
351 | 354 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
352 | 355 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
353 | 356 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
354 | 357 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
355 | 358 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
356 | 359 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
357 | 360 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
358 | 361 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
359 | 362 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
360 | 363 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
361 | 364 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
362 | 365 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
363 | 366 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
364 | 367 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
365 | 368 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
366 | 369 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
367 | 370 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
368 | 371 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
369 | 372 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
370 | 373 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
@@ -1,105 +1,108 b'' | |||
|
1 | 1 | $ "$TESTDIR/hghave" serve || exit 80 |
|
2 | 2 | |
|
3 | 3 | Preparing the subrepository 'sub' |
|
4 | 4 | |
|
5 | 5 | $ hg init sub |
|
6 | 6 | $ echo sub > sub/sub |
|
7 | 7 | $ hg add -R sub |
|
8 | 8 | adding sub/sub (glob) |
|
9 | 9 | $ hg commit -R sub -m "sub import" |
|
10 | 10 | |
|
11 | 11 | Preparing the 'main' repo which depends on the subrepo 'sub' |
|
12 | 12 | |
|
13 | 13 | $ hg init main |
|
14 | 14 | $ echo main > main/main |
|
15 | 15 | $ echo "sub = ../sub" > main/.hgsub |
|
16 | 16 | $ hg clone sub main/sub |
|
17 | 17 | updating to branch default |
|
18 | 18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 19 | $ hg add -R main |
|
20 | 20 | adding main/.hgsub (glob) |
|
21 | 21 | adding main/main (glob) |
|
22 | 22 | $ hg commit -R main -m "main import" |
|
23 | 23 | |
|
24 | 24 | Cleaning both repositories, just as a clone -U |
|
25 | 25 | |
|
26 | 26 | $ hg up -C -R sub null |
|
27 | 27 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
28 | 28 | $ hg up -C -R main null |
|
29 | 29 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
30 | 30 | $ rm -rf main/sub |
|
31 | 31 | |
|
32 | hide outer repo | |
|
33 | $ hg init | |
|
34 | ||
|
32 | 35 | Serving them both using hgweb |
|
33 | 36 | |
|
34 | 37 | $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf |
|
35 | 38 | $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \ |
|
36 | 39 | > -A /dev/null -E /dev/null --pid-file hg.pid -d |
|
37 | 40 | $ cat hg.pid >> $DAEMON_PIDS |
|
38 | 41 | |
|
39 | 42 | Clone main from hgweb |
|
40 | 43 | |
|
41 | 44 | $ hg clone "http://localhost:$HGPORT/main" cloned |
|
42 | 45 | requesting all changes |
|
43 | 46 | adding changesets |
|
44 | 47 | adding manifests |
|
45 | 48 | adding file changes |
|
46 | 49 | added 1 changesets with 3 changes to 3 files |
|
47 | 50 | updating to branch default |
|
48 | 51 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
49 | 52 | requesting all changes |
|
50 | 53 | adding changesets |
|
51 | 54 | adding manifests |
|
52 | 55 | adding file changes |
|
53 | 56 | added 1 changesets with 1 changes to 1 files |
|
54 | 57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 58 | |
|
56 | 59 | Checking cloned repo ids |
|
57 | 60 | |
|
58 | 61 | $ hg id -R cloned |
|
59 | 62 | fdfeeb3e979e tip |
|
60 | 63 | $ hg id -R cloned/sub |
|
61 | 64 | 863c1745b441 tip |
|
62 | 65 | |
|
63 | 66 | subrepo debug for 'main' clone |
|
64 | 67 | |
|
65 | 68 | $ hg debugsub -R cloned |
|
66 | 69 | path sub |
|
67 | 70 | source ../sub |
|
68 | 71 | revision 863c1745b441bd97a8c4a096e87793073f4fb215 |
|
69 | 72 | |
|
70 | 73 | $ "$TESTDIR/killdaemons.py" |
|
71 | 74 | |
|
72 | 75 | subrepo paths with ssh urls |
|
73 | 76 | |
|
74 | 77 | $ cp "$TESTDIR/dummyssh" "$BINDIR/ssh" |
|
75 | 78 | |
|
76 | 79 | $ hg clone ssh://user@dummy/cloned sshclone |
|
77 | 80 | requesting all changes |
|
78 | 81 | adding changesets |
|
79 | 82 | adding manifests |
|
80 | 83 | adding file changes |
|
81 | 84 | added 1 changesets with 3 changes to 3 files |
|
82 | 85 | updating to branch default |
|
83 | 86 | cloning subrepo sub from ssh://user@dummy/sub |
|
84 | 87 | requesting all changes |
|
85 | 88 | adding changesets |
|
86 | 89 | adding manifests |
|
87 | 90 | adding file changes |
|
88 | 91 | added 1 changesets with 1 changes to 1 files |
|
89 | 92 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 93 | |
|
91 | 94 | $ hg -R sshclone push ssh://user@dummy/$TESTTMP/cloned |
|
92 | 95 | pushing to ssh://user@dummy/$TESTTMP/cloned |
|
93 | 96 | pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub |
|
94 | 97 | searching for changes |
|
95 | 98 | no changes found |
|
96 | 99 | searching for changes |
|
97 | 100 | no changes found |
|
98 | 101 | [1] |
|
99 | 102 | |
|
100 | 103 | $ cat dummylog |
|
101 | 104 | Got arguments 1:user@dummy 2:hg -R cloned serve --stdio |
|
102 | 105 | Got arguments 1:user@dummy 2:hg -R sub serve --stdio |
|
103 | 106 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio |
|
104 | 107 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio |
|
105 | 108 | $ rm "$BINDIR/ssh" |
@@ -1,42 +1,45 b'' | |||
|
1 | 1 | import os, sys, time |
|
2 | 2 | from mercurial import hg, ui, commands, util |
|
3 | 3 | |
|
4 | 4 | TESTDIR = os.environ["TESTDIR"] |
|
5 | 5 | BUNDLEPATH = os.path.join(TESTDIR, 'bundles', 'test-no-symlinks.hg') |
|
6 | 6 | |
|
7 | 7 | # only makes sense to test on os which supports symlinks |
|
8 | 8 | if not getattr(os, "symlink", False): |
|
9 | 9 | sys.exit(80) # SKIPPED_STATUS defined in run-tests.py |
|
10 | 10 | |
|
11 | u = ui.ui() | |
|
12 | # hide outer repo | |
|
13 | hg.peer(u, {}, '.', create=True) | |
|
14 | ||
|
11 | 15 | # clone with symlink support |
|
12 | u = ui.ui() | |
|
13 | 16 | hg.clone(u, {}, BUNDLEPATH, 'test0') |
|
14 | 17 | |
|
15 | 18 | repo = hg.repository(u, 'test0') |
|
16 | 19 | |
|
17 | 20 | # wait a bit, or the status call wont update the dirstate |
|
18 | 21 | time.sleep(1) |
|
19 | 22 | commands.status(u, repo) |
|
20 | 23 | |
|
21 | 24 | # now disable symlink support -- this is what os.symlink would do on a |
|
22 | 25 | # non-symlink file system |
|
23 | 26 | def symlink_failure(src, dst): |
|
24 | 27 | raise OSError, (1, "Operation not permitted") |
|
25 | 28 | os.symlink = symlink_failure |
|
26 | 29 | |
|
27 | 30 | # dereference links as if a Samba server has exported this to a |
|
28 | 31 | # Windows client |
|
29 | 32 | for f in 'test0/a.lnk', 'test0/d/b.lnk': |
|
30 | 33 | os.unlink(f) |
|
31 | 34 | fp = open(f, 'wb') |
|
32 | 35 | fp.write(util.readfile(f[:-4])) |
|
33 | 36 | fp.close() |
|
34 | 37 | |
|
35 | 38 | # reload repository |
|
36 | 39 | u = ui.ui() |
|
37 | 40 | repo = hg.repository(u, 'test0') |
|
38 | 41 | commands.status(u, repo) |
|
39 | 42 | |
|
40 | 43 | # try cloning a repo which contains symlinks |
|
41 | 44 | u = ui.ui() |
|
42 | 45 | hg.clone(u, {}, BUNDLEPATH, 'test1') |
General Comments 0
You need to be logged in to leave comments.
Login now