##// END OF EJS Templates
tests: tolerate http2...
timeless -
r28996:b74ca9ac stable
parent child Browse files
Show More
@@ -1,881 +1,883
1 1 #if windows
2 2 $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH"
3 3 #else
4 4 $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH"
5 5 #endif
6 6 $ export PYTHONPATH
7 7
8 8 typical client does not want echo-back messages, so test without it:
9 9
10 10 $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new
11 11 $ mv $HGRCPATH.new $HGRCPATH
12 12
13 13 $ hg init repo
14 14 $ cd repo
15 15
16 16 >>> from hgclient import readchannel, runcommand, check
17 17 >>> @check
18 18 ... def hellomessage(server):
19 19 ... ch, data = readchannel(server)
20 20 ... print '%c, %r' % (ch, data)
21 21 ... # run an arbitrary command to make sure the next thing the server
22 22 ... # sends isn't part of the hello message
23 23 ... runcommand(server, ['id'])
24 24 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
25 25 *** runcommand id
26 26 000000000000 tip
27 27
28 28 >>> from hgclient import check
29 29 >>> @check
30 30 ... def unknowncommand(server):
31 31 ... server.stdin.write('unknowncommand\n')
32 32 abort: unknown command unknowncommand
33 33
34 34 >>> from hgclient import readchannel, runcommand, check
35 35 >>> @check
36 36 ... def checkruncommand(server):
37 37 ... # hello block
38 38 ... readchannel(server)
39 39 ...
40 40 ... # no args
41 41 ... runcommand(server, [])
42 42 ...
43 43 ... # global options
44 44 ... runcommand(server, ['id', '--quiet'])
45 45 ...
46 46 ... # make sure global options don't stick through requests
47 47 ... runcommand(server, ['id'])
48 48 ...
49 49 ... # --config
50 50 ... runcommand(server, ['id', '--config', 'ui.quiet=True'])
51 51 ...
52 52 ... # make sure --config doesn't stick
53 53 ... runcommand(server, ['id'])
54 54 ...
55 55 ... # negative return code should be masked
56 56 ... runcommand(server, ['id', '-runknown'])
57 57 *** runcommand
58 58 Mercurial Distributed SCM
59 59
60 60 basic commands:
61 61
62 62 add add the specified files on the next commit
63 63 annotate show changeset information by line for each file
64 64 clone make a copy of an existing repository
65 65 commit commit the specified files or all outstanding changes
66 66 diff diff repository (or selected files)
67 67 export dump the header and diffs for one or more changesets
68 68 forget forget the specified files on the next commit
69 69 init create a new repository in the given directory
70 70 log show revision history of entire repository or files
71 71 merge merge another revision into working directory
72 72 pull pull changes from the specified source
73 73 push push changes to the specified destination
74 74 remove remove the specified files on the next commit
75 75 serve start stand-alone webserver
76 76 status show changed files in the working directory
77 77 summary summarize working directory state
78 78 update update working directory (or switch revisions)
79 79
80 80 (use "hg help" for the full list of commands or "hg -v" for details)
81 81 *** runcommand id --quiet
82 82 000000000000
83 83 *** runcommand id
84 84 000000000000 tip
85 85 *** runcommand id --config ui.quiet=True
86 86 000000000000
87 87 *** runcommand id
88 88 000000000000 tip
89 89 *** runcommand id -runknown
90 90 abort: unknown revision 'unknown'!
91 91 [255]
92 92
93 93 >>> from hgclient import readchannel, check
94 94 >>> @check
95 95 ... def inputeof(server):
96 96 ... readchannel(server)
97 97 ... server.stdin.write('runcommand\n')
98 98 ... # close stdin while server is waiting for input
99 99 ... server.stdin.close()
100 100 ...
101 101 ... # server exits with 1 if the pipe closed while reading the command
102 102 ... print 'server exit code =', server.wait()
103 103 server exit code = 1
104 104
105 105 >>> from hgclient import readchannel, runcommand, check, stringio
106 106 >>> @check
107 107 ... def serverinput(server):
108 108 ... readchannel(server)
109 109 ...
110 110 ... patch = """
111 111 ... # HG changeset patch
112 112 ... # User test
113 113 ... # Date 0 0
114 114 ... # Node ID c103a3dec114d882c98382d684d8af798d09d857
115 115 ... # Parent 0000000000000000000000000000000000000000
116 116 ... 1
117 117 ...
118 118 ... diff -r 000000000000 -r c103a3dec114 a
119 119 ... --- /dev/null Thu Jan 01 00:00:00 1970 +0000
120 120 ... +++ b/a Thu Jan 01 00:00:00 1970 +0000
121 121 ... @@ -0,0 +1,1 @@
122 122 ... +1
123 123 ... """
124 124 ...
125 125 ... runcommand(server, ['import', '-'], input=stringio(patch))
126 126 ... runcommand(server, ['log'])
127 127 *** runcommand import -
128 128 applying patch from stdin
129 129 *** runcommand log
130 130 changeset: 0:eff892de26ec
131 131 tag: tip
132 132 user: test
133 133 date: Thu Jan 01 00:00:00 1970 +0000
134 134 summary: 1
135 135
136 136
137 137 check that --cwd doesn't persist between requests:
138 138
139 139 $ mkdir foo
140 140 $ touch foo/bar
141 141 >>> from hgclient import readchannel, runcommand, check
142 142 >>> @check
143 143 ... def cwd(server):
144 144 ... readchannel(server)
145 145 ... runcommand(server, ['--cwd', 'foo', 'st', 'bar'])
146 146 ... runcommand(server, ['st', 'foo/bar'])
147 147 *** runcommand --cwd foo st bar
148 148 ? bar
149 149 *** runcommand st foo/bar
150 150 ? foo/bar
151 151
152 152 $ rm foo/bar
153 153
154 154
155 155 check that local configs for the cached repo aren't inherited when -R is used:
156 156
157 157 $ cat <<EOF >> .hg/hgrc
158 158 > [ui]
159 159 > foo = bar
160 160 > EOF
161 161
162 162 >>> from hgclient import readchannel, sep, runcommand, check
163 163 >>> @check
164 164 ... def localhgrc(server):
165 165 ... readchannel(server)
166 166 ...
167 167 ... # the cached repo local hgrc contains ui.foo=bar, so showconfig should
168 168 ... # show it
169 169 ... runcommand(server, ['showconfig'], outfilter=sep)
170 170 ...
171 171 ... # but not for this repo
172 172 ... runcommand(server, ['init', 'foo'])
173 173 ... runcommand(server, ['-R', 'foo', 'showconfig', 'ui', 'defaults'])
174 174 *** runcommand showconfig
175 175 bundle.mainreporoot=$TESTTMP/repo
176 176 defaults.backout=-d "0 0"
177 177 defaults.commit=-d "0 0"
178 178 defaults.shelve=--date "0 0"
179 179 defaults.tag=-d "0 0"
180 180 devel.all-warnings=true
181 181 largefiles.usercache=$TESTTMP/.cache/largefiles
182 182 ui.slash=True
183 183 ui.interactive=False
184 184 ui.mergemarkers=detailed
185 ui.usehttp2=true (?)
185 186 ui.foo=bar
186 187 ui.nontty=true
187 188 *** runcommand init foo
188 189 *** runcommand -R foo showconfig ui defaults
189 190 defaults.backout=-d "0 0"
190 191 defaults.commit=-d "0 0"
191 192 defaults.shelve=--date "0 0"
192 193 defaults.tag=-d "0 0"
193 194 ui.slash=True
194 195 ui.interactive=False
195 196 ui.mergemarkers=detailed
197 ui.usehttp2=true (?)
196 198 ui.nontty=true
197 199
198 200 $ rm -R foo
199 201
200 202 #if windows
201 203 $ PYTHONPATH="$TESTTMP/repo;$PYTHONPATH"
202 204 #else
203 205 $ PYTHONPATH="$TESTTMP/repo:$PYTHONPATH"
204 206 #endif
205 207
206 208 $ cat <<EOF > hook.py
207 209 > import sys
208 210 > def hook(**args):
209 211 > print 'hook talking'
210 212 > print 'now try to read something: %r' % sys.stdin.read()
211 213 > EOF
212 214
213 215 >>> from hgclient import readchannel, runcommand, check, stringio
214 216 >>> @check
215 217 ... def hookoutput(server):
216 218 ... readchannel(server)
217 219 ... runcommand(server, ['--config',
218 220 ... 'hooks.pre-identify=python:hook.hook',
219 221 ... 'id'],
220 222 ... input=stringio('some input'))
221 223 *** runcommand --config hooks.pre-identify=python:hook.hook id
222 224 hook talking
223 225 now try to read something: 'some input'
224 226 eff892de26ec tip
225 227
226 228 $ rm hook.py*
227 229
228 230 $ echo a >> a
229 231 >>> import os
230 232 >>> from hgclient import readchannel, runcommand, check
231 233 >>> @check
232 234 ... def outsidechanges(server):
233 235 ... readchannel(server)
234 236 ... runcommand(server, ['status'])
235 237 ... os.system('hg ci -Am2')
236 238 ... runcommand(server, ['tip'])
237 239 ... runcommand(server, ['status'])
238 240 *** runcommand status
239 241 M a
240 242 *** runcommand tip
241 243 changeset: 1:d3a0a68be6de
242 244 tag: tip
243 245 user: test
244 246 date: Thu Jan 01 00:00:00 1970 +0000
245 247 summary: 2
246 248
247 249 *** runcommand status
248 250
249 251 >>> import os
250 252 >>> from hgclient import readchannel, runcommand, check
251 253 >>> @check
252 254 ... def bookmarks(server):
253 255 ... readchannel(server)
254 256 ... runcommand(server, ['bookmarks'])
255 257 ...
256 258 ... # changes .hg/bookmarks
257 259 ... os.system('hg bookmark -i bm1')
258 260 ... os.system('hg bookmark -i bm2')
259 261 ... runcommand(server, ['bookmarks'])
260 262 ...
261 263 ... # changes .hg/bookmarks.current
262 264 ... os.system('hg upd bm1 -q')
263 265 ... runcommand(server, ['bookmarks'])
264 266 ...
265 267 ... runcommand(server, ['bookmarks', 'bm3'])
266 268 ... f = open('a', 'ab')
267 269 ... f.write('a\n')
268 270 ... f.close()
269 271 ... runcommand(server, ['commit', '-Amm'])
270 272 ... runcommand(server, ['bookmarks'])
271 273 *** runcommand bookmarks
272 274 no bookmarks set
273 275 *** runcommand bookmarks
274 276 bm1 1:d3a0a68be6de
275 277 bm2 1:d3a0a68be6de
276 278 *** runcommand bookmarks
277 279 * bm1 1:d3a0a68be6de
278 280 bm2 1:d3a0a68be6de
279 281 *** runcommand bookmarks bm3
280 282 *** runcommand commit -Amm
281 283 *** runcommand bookmarks
282 284 bm1 1:d3a0a68be6de
283 285 bm2 1:d3a0a68be6de
284 286 * bm3 2:aef17e88f5f0
285 287
286 288 >>> import os
287 289 >>> from hgclient import readchannel, runcommand, check
288 290 >>> @check
289 291 ... def tagscache(server):
290 292 ... readchannel(server)
291 293 ... runcommand(server, ['id', '-t', '-r', '0'])
292 294 ... os.system('hg tag -r 0 foo')
293 295 ... runcommand(server, ['id', '-t', '-r', '0'])
294 296 *** runcommand id -t -r 0
295 297
296 298 *** runcommand id -t -r 0
297 299 foo
298 300
299 301 >>> import os
300 302 >>> from hgclient import readchannel, runcommand, check
301 303 >>> @check
302 304 ... def setphase(server):
303 305 ... readchannel(server)
304 306 ... runcommand(server, ['phase', '-r', '.'])
305 307 ... os.system('hg phase -r . -p')
306 308 ... runcommand(server, ['phase', '-r', '.'])
307 309 *** runcommand phase -r .
308 310 3: draft
309 311 *** runcommand phase -r .
310 312 3: public
311 313
312 314 $ echo a >> a
313 315 >>> from hgclient import readchannel, runcommand, check
314 316 >>> @check
315 317 ... def rollback(server):
316 318 ... readchannel(server)
317 319 ... runcommand(server, ['phase', '-r', '.', '-p'])
318 320 ... runcommand(server, ['commit', '-Am.'])
319 321 ... runcommand(server, ['rollback'])
320 322 ... runcommand(server, ['phase', '-r', '.'])
321 323 *** runcommand phase -r . -p
322 324 no phases changed
323 325 *** runcommand commit -Am.
324 326 *** runcommand rollback
325 327 repository tip rolled back to revision 3 (undo commit)
326 328 working directory now based on revision 3
327 329 *** runcommand phase -r .
328 330 3: public
329 331
330 332 >>> import os
331 333 >>> from hgclient import readchannel, runcommand, check
332 334 >>> @check
333 335 ... def branch(server):
334 336 ... readchannel(server)
335 337 ... runcommand(server, ['branch'])
336 338 ... os.system('hg branch foo')
337 339 ... runcommand(server, ['branch'])
338 340 ... os.system('hg branch default')
339 341 *** runcommand branch
340 342 default
341 343 marked working directory as branch foo
342 344 (branches are permanent and global, did you want a bookmark?)
343 345 *** runcommand branch
344 346 foo
345 347 marked working directory as branch default
346 348 (branches are permanent and global, did you want a bookmark?)
347 349
348 350 $ touch .hgignore
349 351 >>> import os
350 352 >>> from hgclient import readchannel, runcommand, check
351 353 >>> @check
352 354 ... def hgignore(server):
353 355 ... readchannel(server)
354 356 ... runcommand(server, ['commit', '-Am.'])
355 357 ... f = open('ignored-file', 'ab')
356 358 ... f.write('')
357 359 ... f.close()
358 360 ... f = open('.hgignore', 'ab')
359 361 ... f.write('ignored-file')
360 362 ... f.close()
361 363 ... runcommand(server, ['status', '-i', '-u'])
362 364 *** runcommand commit -Am.
363 365 adding .hgignore
364 366 *** runcommand status -i -u
365 367 I ignored-file
366 368
367 369 cache of non-public revisions should be invalidated on repository change
368 370 (issue4855):
369 371
370 372 >>> import os
371 373 >>> from hgclient import readchannel, runcommand, check
372 374 >>> @check
373 375 ... def phasesetscacheaftercommit(server):
374 376 ... readchannel(server)
375 377 ... # load _phasecache._phaserevs and _phasesets
376 378 ... runcommand(server, ['log', '-qr', 'draft()'])
377 379 ... # create draft commits by another process
378 380 ... for i in xrange(5, 7):
379 381 ... f = open('a', 'ab')
380 382 ... f.seek(0, os.SEEK_END)
381 383 ... f.write('a\n')
382 384 ... f.close()
383 385 ... os.system('hg commit -Aqm%d' % i)
384 386 ... # new commits should be listed as draft revisions
385 387 ... runcommand(server, ['log', '-qr', 'draft()'])
386 388 *** runcommand log -qr draft()
387 389 4:7966c8e3734d
388 390 *** runcommand log -qr draft()
389 391 4:7966c8e3734d
390 392 5:41f6602d1c4f
391 393 6:10501e202c35
392 394
393 395 >>> import os
394 396 >>> from hgclient import readchannel, runcommand, check
395 397 >>> @check
396 398 ... def phasesetscacheafterstrip(server):
397 399 ... readchannel(server)
398 400 ... # load _phasecache._phaserevs and _phasesets
399 401 ... runcommand(server, ['log', '-qr', 'draft()'])
400 402 ... # strip cached revisions by another process
401 403 ... os.system('hg --config extensions.strip= strip -q 5')
402 404 ... # shouldn't abort by "unknown revision '6'"
403 405 ... runcommand(server, ['log', '-qr', 'draft()'])
404 406 *** runcommand log -qr draft()
405 407 4:7966c8e3734d
406 408 5:41f6602d1c4f
407 409 6:10501e202c35
408 410 *** runcommand log -qr draft()
409 411 4:7966c8e3734d
410 412
411 413 cache of phase roots should be invalidated on strip (issue3827):
412 414
413 415 >>> import os
414 416 >>> from hgclient import readchannel, sep, runcommand, check
415 417 >>> @check
416 418 ... def phasecacheafterstrip(server):
417 419 ... readchannel(server)
418 420 ...
419 421 ... # create new head, 5:731265503d86
420 422 ... runcommand(server, ['update', '-C', '0'])
421 423 ... f = open('a', 'ab')
422 424 ... f.write('a\n')
423 425 ... f.close()
424 426 ... runcommand(server, ['commit', '-Am.', 'a'])
425 427 ... runcommand(server, ['log', '-Gq'])
426 428 ...
427 429 ... # make it public; draft marker moves to 4:7966c8e3734d
428 430 ... runcommand(server, ['phase', '-p', '.'])
429 431 ... # load _phasecache.phaseroots
430 432 ... runcommand(server, ['phase', '.'], outfilter=sep)
431 433 ...
432 434 ... # strip 1::4 outside server
433 435 ... os.system('hg -q --config extensions.mq= strip 1')
434 436 ...
435 437 ... # shouldn't raise "7966c8e3734d: no node!"
436 438 ... runcommand(server, ['branches'])
437 439 *** runcommand update -C 0
438 440 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
439 441 (leaving bookmark bm3)
440 442 *** runcommand commit -Am. a
441 443 created new head
442 444 *** runcommand log -Gq
443 445 @ 5:731265503d86
444 446 |
445 447 | o 4:7966c8e3734d
446 448 | |
447 449 | o 3:b9b85890c400
448 450 | |
449 451 | o 2:aef17e88f5f0
450 452 | |
451 453 | o 1:d3a0a68be6de
452 454 |/
453 455 o 0:eff892de26ec
454 456
455 457 *** runcommand phase -p .
456 458 *** runcommand phase .
457 459 5: public
458 460 *** runcommand branches
459 461 default 1:731265503d86
460 462
461 463 in-memory cache must be reloaded if transaction is aborted. otherwise
462 464 changelog and manifest would have invalid node:
463 465
464 466 $ echo a >> a
465 467 >>> from hgclient import readchannel, runcommand, check
466 468 >>> @check
467 469 ... def txabort(server):
468 470 ... readchannel(server)
469 471 ... runcommand(server, ['commit', '--config', 'hooks.pretxncommit=false',
470 472 ... '-mfoo'])
471 473 ... runcommand(server, ['verify'])
472 474 *** runcommand commit --config hooks.pretxncommit=false -mfoo
473 475 transaction abort!
474 476 rollback completed
475 477 abort: pretxncommit hook exited with status 1
476 478 [255]
477 479 *** runcommand verify
478 480 checking changesets
479 481 checking manifests
480 482 crosschecking files in changesets and manifests
481 483 checking files
482 484 1 files, 2 changesets, 2 total revisions
483 485 $ hg revert --no-backup -aq
484 486
485 487 $ cat >> .hg/hgrc << EOF
486 488 > [experimental]
487 489 > evolution=createmarkers
488 490 > EOF
489 491
490 492 >>> import os
491 493 >>> from hgclient import readchannel, runcommand, check
492 494 >>> @check
493 495 ... def obsolete(server):
494 496 ... readchannel(server)
495 497 ...
496 498 ... runcommand(server, ['up', 'null'])
497 499 ... runcommand(server, ['phase', '-df', 'tip'])
498 500 ... cmd = 'hg debugobsolete `hg log -r tip --template {node}`'
499 501 ... if os.name == 'nt':
500 502 ... cmd = 'sh -c "%s"' % cmd # run in sh, not cmd.exe
501 503 ... os.system(cmd)
502 504 ... runcommand(server, ['log', '--hidden'])
503 505 ... runcommand(server, ['log'])
504 506 *** runcommand up null
505 507 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
506 508 *** runcommand phase -df tip
507 509 *** runcommand log --hidden
508 510 changeset: 1:731265503d86
509 511 tag: tip
510 512 user: test
511 513 date: Thu Jan 01 00:00:00 1970 +0000
512 514 summary: .
513 515
514 516 changeset: 0:eff892de26ec
515 517 bookmark: bm1
516 518 bookmark: bm2
517 519 bookmark: bm3
518 520 user: test
519 521 date: Thu Jan 01 00:00:00 1970 +0000
520 522 summary: 1
521 523
522 524 *** runcommand log
523 525 changeset: 0:eff892de26ec
524 526 bookmark: bm1
525 527 bookmark: bm2
526 528 bookmark: bm3
527 529 tag: tip
528 530 user: test
529 531 date: Thu Jan 01 00:00:00 1970 +0000
530 532 summary: 1
531 533
532 534
533 535 $ cat <<EOF >> .hg/hgrc
534 536 > [extensions]
535 537 > mq =
536 538 > EOF
537 539
538 540 >>> import os
539 541 >>> from hgclient import readchannel, runcommand, check
540 542 >>> @check
541 543 ... def mqoutsidechanges(server):
542 544 ... readchannel(server)
543 545 ...
544 546 ... # load repo.mq
545 547 ... runcommand(server, ['qapplied'])
546 548 ... os.system('hg qnew 0.diff')
547 549 ... # repo.mq should be invalidated
548 550 ... runcommand(server, ['qapplied'])
549 551 ...
550 552 ... runcommand(server, ['qpop', '--all'])
551 553 ... os.system('hg qqueue --create foo')
552 554 ... # repo.mq should be recreated to point to new queue
553 555 ... runcommand(server, ['qqueue', '--active'])
554 556 *** runcommand qapplied
555 557 *** runcommand qapplied
556 558 0.diff
557 559 *** runcommand qpop --all
558 560 popping 0.diff
559 561 patch queue now empty
560 562 *** runcommand qqueue --active
561 563 foo
562 564
563 565 $ cat <<EOF > dbgui.py
564 566 > import os, sys
565 567 > from mercurial import cmdutil, commands
566 568 > cmdtable = {}
567 569 > command = cmdutil.command(cmdtable)
568 570 > @command("debuggetpass", norepo=True)
569 571 > def debuggetpass(ui):
570 572 > ui.write("%s\\n" % ui.getpass())
571 573 > @command("debugprompt", norepo=True)
572 574 > def debugprompt(ui):
573 575 > ui.write("%s\\n" % ui.prompt("prompt:"))
574 576 > @command("debugreadstdin", norepo=True)
575 577 > def debugreadstdin(ui):
576 578 > ui.write("read: %r\n" % sys.stdin.read(1))
577 579 > @command("debugwritestdout", norepo=True)
578 580 > def debugwritestdout(ui):
579 581 > os.write(1, "low-level stdout fd and\n")
580 582 > sys.stdout.write("stdout should be redirected to /dev/null\n")
581 583 > sys.stdout.flush()
582 584 > EOF
583 585 $ cat <<EOF >> .hg/hgrc
584 586 > [extensions]
585 587 > dbgui = dbgui.py
586 588 > EOF
587 589
588 590 >>> from hgclient import readchannel, runcommand, check, stringio
589 591 >>> @check
590 592 ... def getpass(server):
591 593 ... readchannel(server)
592 594 ... runcommand(server, ['debuggetpass', '--config',
593 595 ... 'ui.interactive=True'],
594 596 ... input=stringio('1234\n'))
595 597 ... runcommand(server, ['debugprompt', '--config',
596 598 ... 'ui.interactive=True'],
597 599 ... input=stringio('5678\n'))
598 600 ... runcommand(server, ['debugreadstdin'])
599 601 ... runcommand(server, ['debugwritestdout'])
600 602 *** runcommand debuggetpass --config ui.interactive=True
601 603 password: 1234
602 604 *** runcommand debugprompt --config ui.interactive=True
603 605 prompt: 5678
604 606 *** runcommand debugreadstdin
605 607 read: ''
606 608 *** runcommand debugwritestdout
607 609
608 610
609 611 run commandserver in commandserver, which is silly but should work:
610 612
611 613 >>> from hgclient import readchannel, runcommand, check, stringio
612 614 >>> @check
613 615 ... def nested(server):
614 616 ... print '%c, %r' % readchannel(server)
615 617 ... class nestedserver(object):
616 618 ... stdin = stringio('getencoding\n')
617 619 ... stdout = stringio()
618 620 ... runcommand(server, ['serve', '--cmdserver', 'pipe'],
619 621 ... output=nestedserver.stdout, input=nestedserver.stdin)
620 622 ... nestedserver.stdout.seek(0)
621 623 ... print '%c, %r' % readchannel(nestedserver) # hello
622 624 ... print '%c, %r' % readchannel(nestedserver) # getencoding
623 625 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
624 626 *** runcommand serve --cmdserver pipe
625 627 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
626 628 r, '*' (glob)
627 629
628 630
629 631 start without repository:
630 632
631 633 $ cd ..
632 634
633 635 >>> from hgclient import readchannel, runcommand, check
634 636 >>> @check
635 637 ... def hellomessage(server):
636 638 ... ch, data = readchannel(server)
637 639 ... print '%c, %r' % (ch, data)
638 640 ... # run an arbitrary command to make sure the next thing the server
639 641 ... # sends isn't part of the hello message
640 642 ... runcommand(server, ['id'])
641 643 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
642 644 *** runcommand id
643 645 abort: there is no Mercurial repository here (.hg not found)
644 646 [255]
645 647
646 648 >>> from hgclient import readchannel, runcommand, check
647 649 >>> @check
648 650 ... def startwithoutrepo(server):
649 651 ... readchannel(server)
650 652 ... runcommand(server, ['init', 'repo2'])
651 653 ... runcommand(server, ['id', '-R', 'repo2'])
652 654 *** runcommand init repo2
653 655 *** runcommand id -R repo2
654 656 000000000000 tip
655 657
656 658
657 659 don't fall back to cwd if invalid -R path is specified (issue4805):
658 660
659 661 $ cd repo
660 662 $ hg serve --cmdserver pipe -R ../nonexistent
661 663 abort: repository ../nonexistent not found!
662 664 [255]
663 665 $ cd ..
664 666
665 667
666 668 unix domain socket:
667 669
668 670 $ cd repo
669 671 $ hg update -q
670 672
671 673 #if unix-socket unix-permissions
672 674
673 675 >>> from hgclient import unixserver, readchannel, runcommand, check, stringio
674 676 >>> server = unixserver('.hg/server.sock', '.hg/server.log')
675 677 >>> def hellomessage(conn):
676 678 ... ch, data = readchannel(conn)
677 679 ... print '%c, %r' % (ch, data)
678 680 ... runcommand(conn, ['id'])
679 681 >>> check(hellomessage, server.connect)
680 682 o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob)
681 683 *** runcommand id
682 684 eff892de26ec tip bm1/bm2/bm3
683 685 >>> def unknowncommand(conn):
684 686 ... readchannel(conn)
685 687 ... conn.stdin.write('unknowncommand\n')
686 688 >>> check(unknowncommand, server.connect) # error sent to server.log
687 689 >>> def serverinput(conn):
688 690 ... readchannel(conn)
689 691 ... patch = """
690 692 ... # HG changeset patch
691 693 ... # User test
692 694 ... # Date 0 0
693 695 ... 2
694 696 ...
695 697 ... diff -r eff892de26ec -r 1ed24be7e7a0 a
696 698 ... --- a/a
697 699 ... +++ b/a
698 700 ... @@ -1,1 +1,2 @@
699 701 ... 1
700 702 ... +2
701 703 ... """
702 704 ... runcommand(conn, ['import', '-'], input=stringio(patch))
703 705 ... runcommand(conn, ['log', '-rtip', '-q'])
704 706 >>> check(serverinput, server.connect)
705 707 *** runcommand import -
706 708 applying patch from stdin
707 709 *** runcommand log -rtip -q
708 710 2:1ed24be7e7a0
709 711 >>> server.shutdown()
710 712
711 713 $ cat .hg/server.log
712 714 listening at .hg/server.sock
713 715 abort: unknown command unknowncommand
714 716 killed!
715 717 $ rm .hg/server.log
716 718
717 719 if server crashed before hello, traceback will be sent to 'e' channel as
718 720 last ditch:
719 721
720 722 $ cat <<EOF >> .hg/hgrc
721 723 > [cmdserver]
722 724 > log = inexistent/path.log
723 725 > EOF
724 726 >>> from hgclient import unixserver, readchannel, check
725 727 >>> server = unixserver('.hg/server.sock', '.hg/server.log')
726 728 >>> def earlycrash(conn):
727 729 ... while True:
728 730 ... try:
729 731 ... ch, data = readchannel(conn)
730 732 ... if not data.startswith(' '):
731 733 ... print '%c, %r' % (ch, data)
732 734 ... except EOFError:
733 735 ... break
734 736 >>> check(earlycrash, server.connect)
735 737 e, 'Traceback (most recent call last):\n'
736 738 e, "IOError: *" (glob)
737 739 >>> server.shutdown()
738 740
739 741 $ cat .hg/server.log | grep -v '^ '
740 742 listening at .hg/server.sock
741 743 Traceback (most recent call last):
742 744 IOError: * (glob)
743 745 killed!
744 746 #endif
745 747 #if no-unix-socket
746 748
747 749 $ hg serve --cmdserver unix -a .hg/server.sock
748 750 abort: unsupported platform
749 751 [255]
750 752
751 753 #endif
752 754
753 755 $ cd ..
754 756
755 757 Test that accessing to invalid changelog cache is avoided at
756 758 subsequent operations even if repo object is reused even after failure
757 759 of transaction (see 0a7610758c42 also)
758 760
759 761 "hg log" after failure of transaction is needed to detect invalid
760 762 cache in repoview: this can't detect by "hg verify" only.
761 763
762 764 Combination of "finalization" and "empty-ness of changelog" (2 x 2 =
763 765 4) are tested, because '00changelog.i' are differently changed in each
764 766 cases.
765 767
766 768 $ cat > $TESTTMP/failafterfinalize.py <<EOF
767 769 > # extension to abort transaction after finalization forcibly
768 770 > from mercurial import commands, error, extensions, lock as lockmod
769 771 > def fail(tr):
770 772 > raise error.Abort('fail after finalization')
771 773 > def reposetup(ui, repo):
772 774 > class failrepo(repo.__class__):
773 775 > def commitctx(self, ctx, error=False):
774 776 > if self.ui.configbool('failafterfinalize', 'fail'):
775 777 > # 'sorted()' by ASCII code on category names causes
776 778 > # invoking 'fail' after finalization of changelog
777 779 > # using "'cl-%i' % id(self)" as category name
778 780 > self.currenttransaction().addfinalize('zzzzzzzz', fail)
779 781 > return super(failrepo, self).commitctx(ctx, error)
780 782 > repo.__class__ = failrepo
781 783 > EOF
782 784
783 785 $ hg init repo3
784 786 $ cd repo3
785 787
786 788 $ cat <<EOF >> $HGRCPATH
787 789 > [ui]
788 790 > logtemplate = {rev} {desc|firstline} ({files})\n
789 791 >
790 792 > [extensions]
791 793 > failafterfinalize = $TESTTMP/failafterfinalize.py
792 794 > EOF
793 795
794 796 - test failure with "empty changelog"
795 797
796 798 $ echo foo > foo
797 799 $ hg add foo
798 800
799 801 (failuer before finalization)
800 802
801 803 >>> from hgclient import readchannel, runcommand, check
802 804 >>> @check
803 805 ... def abort(server):
804 806 ... readchannel(server)
805 807 ... runcommand(server, ['commit',
806 808 ... '--config', 'hooks.pretxncommit=false',
807 809 ... '-mfoo'])
808 810 ... runcommand(server, ['log'])
809 811 ... runcommand(server, ['verify', '-q'])
810 812 *** runcommand commit --config hooks.pretxncommit=false -mfoo
811 813 transaction abort!
812 814 rollback completed
813 815 abort: pretxncommit hook exited with status 1
814 816 [255]
815 817 *** runcommand log
816 818 *** runcommand verify -q
817 819
818 820 (failuer after finalization)
819 821
820 822 >>> from hgclient import readchannel, runcommand, check
821 823 >>> @check
822 824 ... def abort(server):
823 825 ... readchannel(server)
824 826 ... runcommand(server, ['commit',
825 827 ... '--config', 'failafterfinalize.fail=true',
826 828 ... '-mfoo'])
827 829 ... runcommand(server, ['log'])
828 830 ... runcommand(server, ['verify', '-q'])
829 831 *** runcommand commit --config failafterfinalize.fail=true -mfoo
830 832 transaction abort!
831 833 rollback completed
832 834 abort: fail after finalization
833 835 [255]
834 836 *** runcommand log
835 837 *** runcommand verify -q
836 838
837 839 - test failure with "not-empty changelog"
838 840
839 841 $ echo bar > bar
840 842 $ hg add bar
841 843 $ hg commit -mbar bar
842 844
843 845 (failure before finalization)
844 846
845 847 >>> from hgclient import readchannel, runcommand, check
846 848 >>> @check
847 849 ... def abort(server):
848 850 ... readchannel(server)
849 851 ... runcommand(server, ['commit',
850 852 ... '--config', 'hooks.pretxncommit=false',
851 853 ... '-mfoo', 'foo'])
852 854 ... runcommand(server, ['log'])
853 855 ... runcommand(server, ['verify', '-q'])
854 856 *** runcommand commit --config hooks.pretxncommit=false -mfoo foo
855 857 transaction abort!
856 858 rollback completed
857 859 abort: pretxncommit hook exited with status 1
858 860 [255]
859 861 *** runcommand log
860 862 0 bar (bar)
861 863 *** runcommand verify -q
862 864
863 865 (failure after finalization)
864 866
865 867 >>> from hgclient import readchannel, runcommand, check
866 868 >>> @check
867 869 ... def abort(server):
868 870 ... readchannel(server)
869 871 ... runcommand(server, ['commit',
870 872 ... '--config', 'failafterfinalize.fail=true',
871 873 ... '-mfoo', 'foo'])
872 874 ... runcommand(server, ['log'])
873 875 ... runcommand(server, ['verify', '-q'])
874 876 *** runcommand commit --config failafterfinalize.fail=true -mfoo foo
875 877 transaction abort!
876 878 rollback completed
877 879 abort: fail after finalization
878 880 [255]
879 881 *** runcommand log
880 882 0 bar (bar)
881 883 *** runcommand verify -q
@@ -1,333 +1,333
1 1 #require serve
2 2
3 3 This test is a duplicate of 'test-http.t', feel free to factor out
4 4 parts that are not bundle1/bundle2 specific.
5 5
6 6 $ cat << EOF >> $HGRCPATH
7 7 > [experimental]
8 8 > # This test is dedicated to interaction through old bundle
9 9 > bundle2-exp = False
10 10 > EOF
11 11
12 12 $ hg init test
13 13 $ cd test
14 14 $ echo foo>foo
15 15 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
16 16 $ echo foo>foo.d/foo
17 17 $ echo bar>foo.d/bAr.hg.d/BaR
18 18 $ echo bar>foo.d/baR.d.hg/bAR
19 19 $ hg commit -A -m 1
20 20 adding foo
21 21 adding foo.d/bAr.hg.d/BaR
22 22 adding foo.d/baR.d.hg/bAR
23 23 adding foo.d/foo
24 24 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
25 25 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
26 26
27 27 Test server address cannot be reused
28 28
29 29 #if windows
30 30 $ hg serve -p $HGPORT1 2>&1
31 31 abort: cannot start server at ':$HGPORT1': * (glob)
32 32 [255]
33 33 #else
34 34 $ hg serve -p $HGPORT1 2>&1
35 35 abort: cannot start server at ':$HGPORT1': Address already in use
36 36 [255]
37 37 #endif
38 38 $ cd ..
39 39 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
40 40
41 41 clone via stream
42 42
43 43 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
44 44 streaming all changes
45 45 6 files to transfer, 606 bytes of data
46 46 transferred * bytes in * seconds (*/sec) (glob)
47 47 searching for changes
48 48 no changes found
49 49 updating to branch default
50 50 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 51 $ hg verify -R copy
52 52 checking changesets
53 53 checking manifests
54 54 crosschecking files in changesets and manifests
55 55 checking files
56 56 4 files, 1 changesets, 4 total revisions
57 57
58 58 try to clone via stream, should use pull instead
59 59
60 60 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
61 61 requesting all changes
62 62 adding changesets
63 63 adding manifests
64 64 adding file changes
65 65 added 1 changesets with 4 changes to 4 files
66 66 updating to branch default
67 67 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 68
69 69 clone via pull
70 70
71 71 $ hg clone http://localhost:$HGPORT1/ copy-pull
72 72 requesting all changes
73 73 adding changesets
74 74 adding manifests
75 75 adding file changes
76 76 added 1 changesets with 4 changes to 4 files
77 77 updating to branch default
78 78 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 79 $ hg verify -R copy-pull
80 80 checking changesets
81 81 checking manifests
82 82 crosschecking files in changesets and manifests
83 83 checking files
84 84 4 files, 1 changesets, 4 total revisions
85 85 $ cd test
86 86 $ echo bar > bar
87 87 $ hg commit -A -d '1 0' -m 2
88 88 adding bar
89 89 $ cd ..
90 90
91 91 clone over http with --update
92 92
93 93 $ hg clone http://localhost:$HGPORT1/ updated --update 0
94 94 requesting all changes
95 95 adding changesets
96 96 adding manifests
97 97 adding file changes
98 98 added 2 changesets with 5 changes to 5 files
99 99 updating to branch default
100 100 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 101 $ hg log -r . -R updated
102 102 changeset: 0:8b6053c928fe
103 103 user: test
104 104 date: Thu Jan 01 00:00:00 1970 +0000
105 105 summary: 1
106 106
107 107 $ rm -rf updated
108 108
109 109 incoming via HTTP
110 110
111 111 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
112 112 adding changesets
113 113 adding manifests
114 114 adding file changes
115 115 added 1 changesets with 4 changes to 4 files
116 116 updating to branch default
117 117 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 118 $ cd partial
119 119 $ touch LOCAL
120 120 $ hg ci -qAm LOCAL
121 121 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
122 122 comparing with http://localhost:$HGPORT1/
123 123 searching for changes
124 124 2
125 125 $ cd ..
126 126
127 127 pull
128 128
129 129 $ cd copy-pull
130 130 $ echo '[hooks]' >> .hg/hgrc
131 131 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
132 132 $ hg pull
133 133 pulling from http://localhost:$HGPORT1/
134 134 searching for changes
135 135 adding changesets
136 136 adding manifests
137 137 adding file changes
138 138 added 1 changesets with 1 changes to 1 files
139 139 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob)
140 140 (run 'hg update' to get a working copy)
141 141 $ cd ..
142 142
143 143 clone from invalid URL
144 144
145 145 $ hg clone http://localhost:$HGPORT/bad
146 146 abort: HTTP Error 404: Not Found
147 147 [255]
148 148
149 149 test http authentication
150 150 + use the same server to test server side streaming preference
151 151
152 152 $ cd test
153 153 $ cat << EOT > userpass.py
154 154 > import base64
155 155 > from mercurial.hgweb import common
156 156 > def perform_authentication(hgweb, req, op):
157 157 > auth = req.env.get('HTTP_AUTHORIZATION')
158 158 > if not auth:
159 159 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
160 160 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
161 161 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
162 162 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
163 163 > def extsetup():
164 164 > common.permhooks.insert(0, perform_authentication)
165 165 > EOT
166 166 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
167 167 > --config server.preferuncompressed=True \
168 168 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
169 169 $ cat pid >> $DAEMON_PIDS
170 170
171 171 $ cat << EOF > get_pass.py
172 172 > import getpass
173 173 > def newgetpass(arg):
174 174 > return "pass"
175 175 > getpass.getpass = newgetpass
176 176 > EOF
177 177
178 178 $ hg id http://localhost:$HGPORT2/
179 179 abort: http authorization required for http://localhost:$HGPORT2/
180 180 [255]
181 181 $ hg id http://localhost:$HGPORT2/
182 182 abort: http authorization required for http://localhost:$HGPORT2/
183 183 [255]
184 184 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
185 185 http authorization required for http://localhost:$HGPORT2/
186 186 realm: mercurial
187 187 user: user
188 188 password: 5fed3813f7f5
189 189 $ hg id http://user:pass@localhost:$HGPORT2/
190 190 5fed3813f7f5
191 191 $ echo '[auth]' >> .hg/hgrc
192 192 $ echo 'l.schemes=http' >> .hg/hgrc
193 193 $ echo 'l.prefix=lo' >> .hg/hgrc
194 194 $ echo 'l.username=user' >> .hg/hgrc
195 195 $ echo 'l.password=pass' >> .hg/hgrc
196 196 $ hg id http://localhost:$HGPORT2/
197 197 5fed3813f7f5
198 198 $ hg id http://localhost:$HGPORT2/
199 199 5fed3813f7f5
200 200 $ hg id http://user@localhost:$HGPORT2/
201 201 5fed3813f7f5
202 202 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
203 203 streaming all changes
204 204 7 files to transfer, 916 bytes of data
205 205 transferred * bytes in * seconds (*/sec) (glob)
206 206 searching for changes
207 207 no changes found
208 208 updating to branch default
209 209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 210 --pull should override server's preferuncompressed
211 211 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
212 212 requesting all changes
213 213 adding changesets
214 214 adding manifests
215 215 adding file changes
216 216 added 2 changesets with 5 changes to 5 files
217 217 updating to branch default
218 218 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
219 219
220 220 $ hg id http://user2@localhost:$HGPORT2/
221 221 abort: http authorization required for http://localhost:$HGPORT2/
222 222 [255]
223 223 $ hg id http://user:pass2@localhost:$HGPORT2/
224 224 abort: HTTP Error 403: no
225 225 [255]
226 226
227 227 $ hg -R dest tag -r tip top
228 228 $ hg -R dest push http://user:pass@localhost:$HGPORT2/
229 229 pushing to http://user:***@localhost:$HGPORT2/
230 230 searching for changes
231 231 remote: adding changesets
232 232 remote: adding manifests
233 233 remote: adding file changes
234 234 remote: added 1 changesets with 1 changes to 1 files
235 235 $ hg rollback -q
236 236
237 237 $ cut -c38- ../access.log
238 238 "GET /?cmd=capabilities HTTP/1.1" 200 -
239 239 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
240 240 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
241 241 "GET /?cmd=capabilities HTTP/1.1" 200 -
242 242 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
243 243 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
244 244 "GET /?cmd=capabilities HTTP/1.1" 200 -
245 245 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
246 246 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
247 247 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
248 248 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
249 249 "GET /?cmd=capabilities HTTP/1.1" 200 -
250 250 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
251 251 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
252 252 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
253 253 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
254 254 "GET /?cmd=capabilities HTTP/1.1" 200 -
255 255 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
256 256 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
257 257 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
258 258 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
259 259 "GET /?cmd=capabilities HTTP/1.1" 200 -
260 260 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
261 261 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
262 262 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
263 263 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
264 264 "GET /?cmd=capabilities HTTP/1.1" 200 -
265 265 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
266 266 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
267 267 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
268 268 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
269 269 "GET /?cmd=capabilities HTTP/1.1" 200 -
270 270 "GET /?cmd=branchmap HTTP/1.1" 200 -
271 271 "GET /?cmd=stream_out HTTP/1.1" 401 -
272 272 "GET /?cmd=stream_out HTTP/1.1" 200 -
273 273 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
274 274 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d
275 275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
276 276 "GET /?cmd=capabilities HTTP/1.1" 200 -
277 277 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks
278 278 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
279 279 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
280 280 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
281 281 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
282 282 "GET /?cmd=capabilities HTTP/1.1" 200 -
283 283 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
284 284 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
285 285 "GET /?cmd=capabilities HTTP/1.1" 200 -
286 286 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
287 287 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
288 288 "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces
289 289 "GET /?cmd=capabilities HTTP/1.1" 200 -
290 290 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872
291 291 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases
292 292 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
293 293 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
294 294 "GET /?cmd=branchmap HTTP/1.1" 200 -
295 295 "GET /?cmd=branchmap HTTP/1.1" 200 -
296 296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
297 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524
297 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
298 298 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
299 299
300 300 $ cd ..
301 301
302 302 clone of serve with repo in root and unserved subrepo (issue2970)
303 303
304 304 $ hg --cwd test init sub
305 305 $ echo empty > test/sub/empty
306 306 $ hg --cwd test/sub add empty
307 307 $ hg --cwd test/sub commit -qm 'add empty'
308 308 $ hg --cwd test/sub tag -r 0 something
309 309 $ echo sub = sub > test/.hgsub
310 310 $ hg --cwd test add .hgsub
311 311 $ hg --cwd test commit -qm 'add subrepo'
312 312 $ hg clone http://localhost:$HGPORT noslash-clone
313 313 requesting all changes
314 314 adding changesets
315 315 adding manifests
316 316 adding file changes
317 317 added 3 changesets with 7 changes to 7 files
318 318 updating to branch default
319 319 abort: HTTP Error 404: Not Found
320 320 [255]
321 321 $ hg clone http://localhost:$HGPORT/ slash-clone
322 322 requesting all changes
323 323 adding changesets
324 324 adding manifests
325 325 adding file changes
326 326 added 3 changesets with 7 changes to 7 files
327 327 updating to branch default
328 328 abort: HTTP Error 404: Not Found
329 329 [255]
330 330
331 331 check error log
332 332
333 333 $ cat error.log
@@ -1,323 +1,323
1 1 #require serve
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo foo>foo
6 6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
7 7 $ echo foo>foo.d/foo
8 8 $ echo bar>foo.d/bAr.hg.d/BaR
9 9 $ echo bar>foo.d/baR.d.hg/bAR
10 10 $ hg commit -A -m 1
11 11 adding foo
12 12 adding foo.d/bAr.hg.d/BaR
13 13 adding foo.d/baR.d.hg/bAR
14 14 adding foo.d/foo
15 15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
16 16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
17 17
18 18 Test server address cannot be reused
19 19
20 20 #if windows
21 21 $ hg serve -p $HGPORT1 2>&1
22 22 abort: cannot start server at ':$HGPORT1': * (glob)
23 23 [255]
24 24 #else
25 25 $ hg serve -p $HGPORT1 2>&1
26 26 abort: cannot start server at ':$HGPORT1': Address already in use
27 27 [255]
28 28 #endif
29 29 $ cd ..
30 30 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
31 31
32 32 clone via stream
33 33
34 34 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
35 35 streaming all changes
36 36 6 files to transfer, 606 bytes of data
37 37 transferred * bytes in * seconds (*/sec) (glob)
38 38 searching for changes
39 39 no changes found
40 40 updating to branch default
41 41 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 42 $ hg verify -R copy
43 43 checking changesets
44 44 checking manifests
45 45 crosschecking files in changesets and manifests
46 46 checking files
47 47 4 files, 1 changesets, 4 total revisions
48 48
49 49 try to clone via stream, should use pull instead
50 50
51 51 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
52 52 requesting all changes
53 53 adding changesets
54 54 adding manifests
55 55 adding file changes
56 56 added 1 changesets with 4 changes to 4 files
57 57 updating to branch default
58 58 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
59 59
60 60 clone via pull
61 61
62 62 $ hg clone http://localhost:$HGPORT1/ copy-pull
63 63 requesting all changes
64 64 adding changesets
65 65 adding manifests
66 66 adding file changes
67 67 added 1 changesets with 4 changes to 4 files
68 68 updating to branch default
69 69 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 70 $ hg verify -R copy-pull
71 71 checking changesets
72 72 checking manifests
73 73 crosschecking files in changesets and manifests
74 74 checking files
75 75 4 files, 1 changesets, 4 total revisions
76 76 $ cd test
77 77 $ echo bar > bar
78 78 $ hg commit -A -d '1 0' -m 2
79 79 adding bar
80 80 $ cd ..
81 81
82 82 clone over http with --update
83 83
84 84 $ hg clone http://localhost:$HGPORT1/ updated --update 0
85 85 requesting all changes
86 86 adding changesets
87 87 adding manifests
88 88 adding file changes
89 89 added 2 changesets with 5 changes to 5 files
90 90 updating to branch default
91 91 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 92 $ hg log -r . -R updated
93 93 changeset: 0:8b6053c928fe
94 94 user: test
95 95 date: Thu Jan 01 00:00:00 1970 +0000
96 96 summary: 1
97 97
98 98 $ rm -rf updated
99 99
100 100 incoming via HTTP
101 101
102 102 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
103 103 adding changesets
104 104 adding manifests
105 105 adding file changes
106 106 added 1 changesets with 4 changes to 4 files
107 107 updating to branch default
108 108 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 109 $ cd partial
110 110 $ touch LOCAL
111 111 $ hg ci -qAm LOCAL
112 112 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
113 113 comparing with http://localhost:$HGPORT1/
114 114 searching for changes
115 115 2
116 116 $ cd ..
117 117
118 118 pull
119 119
120 120 $ cd copy-pull
121 121 $ echo '[hooks]' >> .hg/hgrc
122 122 $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc
123 123 $ hg pull
124 124 pulling from http://localhost:$HGPORT1/
125 125 searching for changes
126 126 adding changesets
127 127 adding manifests
128 128 adding file changes
129 129 added 1 changesets with 1 changes to 1 files
130 130 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob)
131 131 (run 'hg update' to get a working copy)
132 132 $ cd ..
133 133
134 134 clone from invalid URL
135 135
136 136 $ hg clone http://localhost:$HGPORT/bad
137 137 abort: HTTP Error 404: Not Found
138 138 [255]
139 139
140 140 test http authentication
141 141 + use the same server to test server side streaming preference
142 142
143 143 $ cd test
144 144 $ cat << EOT > userpass.py
145 145 > import base64
146 146 > from mercurial.hgweb import common
147 147 > def perform_authentication(hgweb, req, op):
148 148 > auth = req.env.get('HTTP_AUTHORIZATION')
149 149 > if not auth:
150 150 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
151 151 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
152 152 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
153 153 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
154 154 > def extsetup():
155 155 > common.permhooks.insert(0, perform_authentication)
156 156 > EOT
157 157 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
158 158 > --config server.preferuncompressed=True \
159 159 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
160 160 $ cat pid >> $DAEMON_PIDS
161 161
162 162 $ cat << EOF > get_pass.py
163 163 > import getpass
164 164 > def newgetpass(arg):
165 165 > return "pass"
166 166 > getpass.getpass = newgetpass
167 167 > EOF
168 168
169 169 $ hg id http://localhost:$HGPORT2/
170 170 abort: http authorization required for http://localhost:$HGPORT2/
171 171 [255]
172 172 $ hg id http://localhost:$HGPORT2/
173 173 abort: http authorization required for http://localhost:$HGPORT2/
174 174 [255]
175 175 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
176 176 http authorization required for http://localhost:$HGPORT2/
177 177 realm: mercurial
178 178 user: user
179 179 password: 5fed3813f7f5
180 180 $ hg id http://user:pass@localhost:$HGPORT2/
181 181 5fed3813f7f5
182 182 $ echo '[auth]' >> .hg/hgrc
183 183 $ echo 'l.schemes=http' >> .hg/hgrc
184 184 $ echo 'l.prefix=lo' >> .hg/hgrc
185 185 $ echo 'l.username=user' >> .hg/hgrc
186 186 $ echo 'l.password=pass' >> .hg/hgrc
187 187 $ hg id http://localhost:$HGPORT2/
188 188 5fed3813f7f5
189 189 $ hg id http://localhost:$HGPORT2/
190 190 5fed3813f7f5
191 191 $ hg id http://user@localhost:$HGPORT2/
192 192 5fed3813f7f5
193 193 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
194 194 streaming all changes
195 195 7 files to transfer, 916 bytes of data
196 196 transferred * bytes in * seconds (*/sec) (glob)
197 197 searching for changes
198 198 no changes found
199 199 updating to branch default
200 200 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
201 201 --pull should override server's preferuncompressed
202 202 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
203 203 requesting all changes
204 204 adding changesets
205 205 adding manifests
206 206 adding file changes
207 207 added 2 changesets with 5 changes to 5 files
208 208 updating to branch default
209 209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 210
211 211 $ hg id http://user2@localhost:$HGPORT2/
212 212 abort: http authorization required for http://localhost:$HGPORT2/
213 213 [255]
214 214 $ hg id http://user:pass2@localhost:$HGPORT2/
215 215 abort: HTTP Error 403: no
216 216 [255]
217 217
218 218 $ hg -R dest tag -r tip top
219 219 $ hg -R dest push http://user:pass@localhost:$HGPORT2/
220 220 pushing to http://user:***@localhost:$HGPORT2/
221 221 searching for changes
222 222 remote: adding changesets
223 223 remote: adding manifests
224 224 remote: adding file changes
225 225 remote: added 1 changesets with 1 changes to 1 files
226 226 $ hg rollback -q
227 227
228 228 $ cut -c38- ../access.log
229 229 "GET /?cmd=capabilities HTTP/1.1" 200 -
230 230 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
231 231 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
232 232 "GET /?cmd=capabilities HTTP/1.1" 200 -
233 233 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
234 234 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
235 235 "GET /?cmd=capabilities HTTP/1.1" 200 -
236 236 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
237 237 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
238 238 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
239 239 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
240 240 "GET /?cmd=capabilities HTTP/1.1" 200 -
241 241 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
242 242 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
243 243 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
244 244 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
245 245 "GET /?cmd=capabilities HTTP/1.1" 200 -
246 246 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
247 247 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
248 248 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
249 249 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
250 250 "GET /?cmd=capabilities HTTP/1.1" 200 -
251 251 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
252 252 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
253 253 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
254 254 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
255 255 "GET /?cmd=capabilities HTTP/1.1" 200 -
256 256 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
257 257 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
258 258 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
259 259 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
260 260 "GET /?cmd=capabilities HTTP/1.1" 200 -
261 261 "GET /?cmd=branchmap HTTP/1.1" 200 -
262 262 "GET /?cmd=stream_out HTTP/1.1" 401 -
263 263 "GET /?cmd=stream_out HTTP/1.1" 200 -
264 264 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d
265 265 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
266 266 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
267 267 "GET /?cmd=capabilities HTTP/1.1" 200 -
268 268 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
269 269 "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
270 270 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
271 271 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
272 272 "GET /?cmd=capabilities HTTP/1.1" 200 -
273 273 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
274 274 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
275 275 "GET /?cmd=capabilities HTTP/1.1" 200 -
276 276 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
277 277 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
278 278 "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces
279 279 "GET /?cmd=capabilities HTTP/1.1" 200 -
280 280 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872
281 281 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases
282 282 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
283 283 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
284 284 "GET /?cmd=branchmap HTTP/1.1" 200 -
285 285 "GET /?cmd=branchmap HTTP/1.1" 200 -
286 286 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
287 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365
287 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
288 288 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
289 289
290 290 $ cd ..
291 291
292 292 clone of serve with repo in root and unserved subrepo (issue2970)
293 293
294 294 $ hg --cwd test init sub
295 295 $ echo empty > test/sub/empty
296 296 $ hg --cwd test/sub add empty
297 297 $ hg --cwd test/sub commit -qm 'add empty'
298 298 $ hg --cwd test/sub tag -r 0 something
299 299 $ echo sub = sub > test/.hgsub
300 300 $ hg --cwd test add .hgsub
301 301 $ hg --cwd test commit -qm 'add subrepo'
302 302 $ hg clone http://localhost:$HGPORT noslash-clone
303 303 requesting all changes
304 304 adding changesets
305 305 adding manifests
306 306 adding file changes
307 307 added 3 changesets with 7 changes to 7 files
308 308 updating to branch default
309 309 abort: HTTP Error 404: Not Found
310 310 [255]
311 311 $ hg clone http://localhost:$HGPORT/ slash-clone
312 312 requesting all changes
313 313 adding changesets
314 314 adding manifests
315 315 adding file changes
316 316 added 3 changesets with 7 changes to 7 files
317 317 updating to branch default
318 318 abort: HTTP Error 404: Not Found
319 319 [255]
320 320
321 321 check error log
322 322
323 323 $ cat error.log
@@ -1,536 +1,536
1 1 #require killdaemons
2 2
3 3 Tests discovery against servers without getbundle support:
4 4
5 5 $ CAP="getbundle bundle2"
6 6 $ . "$TESTDIR/notcapable"
7 7 $ cat >> $HGRCPATH <<EOF
8 8 > [ui]
9 9 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
10 10 > EOF
11 11
12 12 Setup HTTP server control:
13 13
14 14 $ remote=http://localhost:$HGPORT/
15 15 $ export remote
16 16 $ tstart() {
17 17 > echo '[web]' > $1/.hg/hgrc
18 18 > echo 'push_ssl = false' >> $1/.hg/hgrc
19 19 > echo 'allow_push = *' >> $1/.hg/hgrc
20 20 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
21 21 > cat hg.pid >> $DAEMON_PIDS
22 22 > }
23 23 $ tstop() {
24 24 > killdaemons.py
25 25 > [ "$1" ] && cut -d' ' -f6- access.log && cat errors.log
26 26 > rm access.log errors.log
27 27 > }
28 28
29 29 Both are empty:
30 30
31 31 $ hg init empty1
32 32 $ hg init empty2
33 33 $ tstart empty2
34 34 $ hg incoming -R empty1 $remote
35 35 comparing with http://localhost:$HGPORT/
36 36 no changes found
37 37 [1]
38 38 $ hg outgoing -R empty1 $remote
39 39 comparing with http://localhost:$HGPORT/
40 40 no changes found
41 41 [1]
42 42 $ hg pull -R empty1 $remote
43 43 pulling from http://localhost:$HGPORT/
44 44 no changes found
45 45 $ hg push -R empty1 $remote
46 46 pushing to http://localhost:$HGPORT/
47 47 no changes found
48 48 [1]
49 49 $ tstop
50 50
51 51 Base repo:
52 52
53 53 $ hg init main
54 54 $ cd main
55 55 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
56 56 $ hg log -G
57 57 o 11 a19bfa7e7328: r11 both
58 58 |
59 59 o 10 8b6bad1512e1: r10 both
60 60 |
61 61 o 9 025829e08038: r9 both
62 62 |\
63 63 | o 8 d8f638ac69e9: r8 name2
64 64 | |
65 65 | o 7 b6b4d315a2ac: r7 name2
66 66 | |
67 67 | o 6 6c6f5d5f3c11: r6 name2
68 68 | |
69 69 | o 5 70314b29987d: r5 name2
70 70 | |
71 71 o | 4 e71dbbc70e03: r4 name1
72 72 | |
73 73 o | 3 2c8d5d5ec612: r3 name1
74 74 | |
75 75 o | 2 a7892891da29: r2 name1
76 76 |/
77 77 o 1 0019a3b924fd: r1
78 78 |
79 79 o 0 d57206cc072a: r0
80 80
81 81 $ cd ..
82 82 $ tstart main
83 83
84 84 Full clone:
85 85
86 86 $ hg clone main full
87 87 updating to branch default
88 88 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 89 $ cd full
90 90 $ hg incoming $remote
91 91 comparing with http://localhost:$HGPORT/
92 92 searching for changes
93 93 no changes found
94 94 [1]
95 95 $ hg outgoing $remote
96 96 comparing with http://localhost:$HGPORT/
97 97 searching for changes
98 98 no changes found
99 99 [1]
100 100 $ hg pull $remote
101 101 pulling from http://localhost:$HGPORT/
102 102 searching for changes
103 103 no changes found
104 104 $ hg push $remote
105 105 pushing to http://localhost:$HGPORT/
106 106 searching for changes
107 107 no changes found
108 108 [1]
109 109 $ cd ..
110 110
111 111 Local is empty:
112 112
113 113 $ cd empty1
114 114 $ hg incoming $remote
115 115 comparing with http://localhost:$HGPORT/
116 116 0 d57206cc072a: r0
117 117 1 0019a3b924fd: r1
118 118 2 a7892891da29: r2 name1
119 119 3 2c8d5d5ec612: r3 name1
120 120 4 e71dbbc70e03: r4 name1
121 121 5 70314b29987d: r5 name2
122 122 6 6c6f5d5f3c11: r6 name2
123 123 7 b6b4d315a2ac: r7 name2
124 124 8 d8f638ac69e9: r8 name2
125 125 9 025829e08038: r9 both
126 126 10 8b6bad1512e1: r10 both
127 127 11 a19bfa7e7328: r11 both
128 128 $ hg outgoing $remote
129 129 comparing with http://localhost:$HGPORT/
130 130 no changes found
131 131 [1]
132 132 $ hg push $remote
133 133 pushing to http://localhost:$HGPORT/
134 134 no changes found
135 135 [1]
136 136 $ hg pull $remote
137 137 pulling from http://localhost:$HGPORT/
138 138 requesting all changes
139 139 adding changesets
140 140 adding manifests
141 141 adding file changes
142 142 added 12 changesets with 24 changes to 2 files
143 143 (run 'hg update' to get a working copy)
144 144 $ hg incoming $remote
145 145 comparing with http://localhost:$HGPORT/
146 146 searching for changes
147 147 no changes found
148 148 [1]
149 149 $ cd ..
150 150
151 151 Local is subset:
152 152
153 153 $ hg clone main subset --rev name2 ; cd subset
154 154 adding changesets
155 155 adding manifests
156 156 adding file changes
157 157 added 6 changesets with 12 changes to 2 files
158 158 updating to branch name2
159 159 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 160 $ hg incoming $remote
161 161 comparing with http://localhost:$HGPORT/
162 162 searching for changes
163 163 6 a7892891da29: r2 name1
164 164 7 2c8d5d5ec612: r3 name1
165 165 8 e71dbbc70e03: r4 name1
166 166 9 025829e08038: r9 both
167 167 10 8b6bad1512e1: r10 both
168 168 11 a19bfa7e7328: r11 both
169 169 $ hg outgoing $remote
170 170 comparing with http://localhost:$HGPORT/
171 171 searching for changes
172 172 no changes found
173 173 [1]
174 174 $ hg push $remote
175 175 pushing to http://localhost:$HGPORT/
176 176 searching for changes
177 177 no changes found
178 178 [1]
179 179 $ hg pull $remote
180 180 pulling from http://localhost:$HGPORT/
181 181 searching for changes
182 182 adding changesets
183 183 adding manifests
184 184 adding file changes
185 185 added 6 changesets with 12 changes to 2 files
186 186 (run 'hg update' to get a working copy)
187 187 $ hg incoming $remote
188 188 comparing with http://localhost:$HGPORT/
189 189 searching for changes
190 190 no changes found
191 191 [1]
192 192 $ cd ..
193 193 $ tstop
194 194
195 195 Remote is empty:
196 196
197 197 $ tstart empty2
198 198 $ cd main
199 199 $ hg incoming $remote
200 200 comparing with http://localhost:$HGPORT/
201 201 searching for changes
202 202 no changes found
203 203 [1]
204 204 $ hg outgoing $remote
205 205 comparing with http://localhost:$HGPORT/
206 206 searching for changes
207 207 0 d57206cc072a: r0
208 208 1 0019a3b924fd: r1
209 209 2 a7892891da29: r2 name1
210 210 3 2c8d5d5ec612: r3 name1
211 211 4 e71dbbc70e03: r4 name1
212 212 5 70314b29987d: r5 name2
213 213 6 6c6f5d5f3c11: r6 name2
214 214 7 b6b4d315a2ac: r7 name2
215 215 8 d8f638ac69e9: r8 name2
216 216 9 025829e08038: r9 both
217 217 10 8b6bad1512e1: r10 both
218 218 11 a19bfa7e7328: r11 both
219 219 $ hg pull $remote
220 220 pulling from http://localhost:$HGPORT/
221 221 searching for changes
222 222 no changes found
223 223 $ hg push $remote
224 224 pushing to http://localhost:$HGPORT/
225 225 searching for changes
226 226 remote: adding changesets
227 227 remote: adding manifests
228 228 remote: adding file changes
229 229 remote: added 12 changesets with 24 changes to 2 files
230 230 $ hg outgoing $remote
231 231 comparing with http://localhost:$HGPORT/
232 232 searching for changes
233 233 no changes found
234 234 [1]
235 235 $ cd ..
236 236 $ tstop
237 237
238 238 Local is superset:
239 239
240 240 $ hg clone main subset2 --rev name2
241 241 adding changesets
242 242 adding manifests
243 243 adding file changes
244 244 added 6 changesets with 12 changes to 2 files
245 245 updating to branch name2
246 246 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
247 247 $ tstart subset2
248 248 $ cd main
249 249 $ hg incoming $remote
250 250 comparing with http://localhost:$HGPORT/
251 251 searching for changes
252 252 no changes found
253 253 [1]
254 254 $ hg outgoing $remote
255 255 comparing with http://localhost:$HGPORT/
256 256 searching for changes
257 257 2 a7892891da29: r2 name1
258 258 3 2c8d5d5ec612: r3 name1
259 259 4 e71dbbc70e03: r4 name1
260 260 9 025829e08038: r9 both
261 261 10 8b6bad1512e1: r10 both
262 262 11 a19bfa7e7328: r11 both
263 263 $ hg pull $remote
264 264 pulling from http://localhost:$HGPORT/
265 265 searching for changes
266 266 no changes found
267 267 $ hg push $remote
268 268 pushing to http://localhost:$HGPORT/
269 269 searching for changes
270 270 abort: push creates new remote branches: both, name1!
271 271 (use 'hg push --new-branch' to create new remote branches)
272 272 [255]
273 273 $ hg push $remote --new-branch
274 274 pushing to http://localhost:$HGPORT/
275 275 searching for changes
276 276 remote: adding changesets
277 277 remote: adding manifests
278 278 remote: adding file changes
279 279 remote: added 6 changesets with 12 changes to 2 files
280 280 $ hg outgoing $remote
281 281 comparing with http://localhost:$HGPORT/
282 282 searching for changes
283 283 no changes found
284 284 [1]
285 285 $ cd ..
286 286 $ tstop
287 287
288 288 Partial pull:
289 289
290 290 $ tstart main
291 291 $ hg clone $remote partial --rev name2
292 292 adding changesets
293 293 adding manifests
294 294 adding file changes
295 295 added 6 changesets with 12 changes to 2 files
296 296 updating to branch name2
297 297 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
298 298 $ cd partial
299 299 $ hg incoming $remote
300 300 comparing with http://localhost:$HGPORT/
301 301 searching for changes
302 302 6 a7892891da29: r2 name1
303 303 7 2c8d5d5ec612: r3 name1
304 304 8 e71dbbc70e03: r4 name1
305 305 9 025829e08038: r9 both
306 306 10 8b6bad1512e1: r10 both
307 307 11 a19bfa7e7328: r11 both
308 308 $ hg incoming $remote --rev name1
309 309 comparing with http://localhost:$HGPORT/
310 310 searching for changes
311 311 6 a7892891da29: r2 name1
312 312 7 2c8d5d5ec612: r3 name1
313 313 8 e71dbbc70e03: r4 name1
314 314 $ hg pull $remote --rev name1
315 315 pulling from http://localhost:$HGPORT/
316 316 searching for changes
317 317 adding changesets
318 318 adding manifests
319 319 adding file changes
320 320 added 3 changesets with 6 changes to 2 files (+1 heads)
321 321 (run 'hg heads' to see heads)
322 322 $ hg incoming $remote
323 323 comparing with http://localhost:$HGPORT/
324 324 searching for changes
325 325 9 025829e08038: r9 both
326 326 10 8b6bad1512e1: r10 both
327 327 11 a19bfa7e7328: r11 both
328 328 $ cd ..
329 329 $ tstop
330 330
331 331 Both have new stuff in new named branches:
332 332
333 333 $ hg clone main repo1a --rev name1 -q
334 334 $ hg clone repo1a repo1b -q
335 335 $ hg clone main repo2a --rev name2 -q
336 336 $ hg clone repo2a repo2b -q
337 337 $ tstart repo1a
338 338
339 339 $ cd repo2a
340 340 $ hg incoming $remote
341 341 comparing with http://localhost:$HGPORT/
342 342 searching for changes
343 343 6 a7892891da29: r2 name1
344 344 7 2c8d5d5ec612: r3 name1
345 345 8 e71dbbc70e03: r4 name1
346 346 $ hg outgoing $remote
347 347 comparing with http://localhost:$HGPORT/
348 348 searching for changes
349 349 2 70314b29987d: r5 name2
350 350 3 6c6f5d5f3c11: r6 name2
351 351 4 b6b4d315a2ac: r7 name2
352 352 5 d8f638ac69e9: r8 name2
353 353 $ hg push $remote --new-branch
354 354 pushing to http://localhost:$HGPORT/
355 355 searching for changes
356 356 remote: adding changesets
357 357 remote: adding manifests
358 358 remote: adding file changes
359 359 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
360 360 $ hg pull $remote
361 361 pulling from http://localhost:$HGPORT/
362 362 searching for changes
363 363 adding changesets
364 364 adding manifests
365 365 adding file changes
366 366 added 3 changesets with 6 changes to 2 files (+1 heads)
367 367 (run 'hg heads' to see heads)
368 368 $ hg incoming $remote
369 369 comparing with http://localhost:$HGPORT/
370 370 searching for changes
371 371 no changes found
372 372 [1]
373 373 $ hg outgoing $remote
374 374 comparing with http://localhost:$HGPORT/
375 375 searching for changes
376 376 no changes found
377 377 [1]
378 378 $ cd ..
379 379 $ tstop
380 380
381 381 $ tstart repo1b
382 382 $ cd repo2b
383 383 $ hg incoming $remote
384 384 comparing with http://localhost:$HGPORT/
385 385 searching for changes
386 386 6 a7892891da29: r2 name1
387 387 7 2c8d5d5ec612: r3 name1
388 388 8 e71dbbc70e03: r4 name1
389 389 $ hg outgoing $remote
390 390 comparing with http://localhost:$HGPORT/
391 391 searching for changes
392 392 2 70314b29987d: r5 name2
393 393 3 6c6f5d5f3c11: r6 name2
394 394 4 b6b4d315a2ac: r7 name2
395 395 5 d8f638ac69e9: r8 name2
396 396 $ hg pull $remote
397 397 pulling from http://localhost:$HGPORT/
398 398 searching for changes
399 399 adding changesets
400 400 adding manifests
401 401 adding file changes
402 402 added 3 changesets with 6 changes to 2 files (+1 heads)
403 403 (run 'hg heads' to see heads)
404 404 $ hg push $remote --new-branch
405 405 pushing to http://localhost:$HGPORT/
406 406 searching for changes
407 407 remote: adding changesets
408 408 remote: adding manifests
409 409 remote: adding file changes
410 410 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
411 411 $ hg incoming $remote
412 412 comparing with http://localhost:$HGPORT/
413 413 searching for changes
414 414 no changes found
415 415 [1]
416 416 $ hg outgoing $remote
417 417 comparing with http://localhost:$HGPORT/
418 418 searching for changes
419 419 no changes found
420 420 [1]
421 421 $ cd ..
422 422 $ tstop
423 423
424 424 Both have new stuff in existing named branches:
425 425
426 426 $ rm -r repo1a repo1b repo2a repo2b
427 427 $ hg clone main repo1a --rev 3 --rev 8 -q
428 428 $ hg clone repo1a repo1b -q
429 429 $ hg clone main repo2a --rev 4 --rev 7 -q
430 430 $ hg clone repo2a repo2b -q
431 431 $ tstart repo1a
432 432
433 433 $ cd repo2a
434 434 $ hg incoming $remote
435 435 comparing with http://localhost:$HGPORT/
436 436 searching for changes
437 437 8 d8f638ac69e9: r8 name2
438 438 $ hg outgoing $remote
439 439 comparing with http://localhost:$HGPORT/
440 440 searching for changes
441 441 4 e71dbbc70e03: r4 name1
442 442 $ hg push $remote --new-branch
443 443 pushing to http://localhost:$HGPORT/
444 444 searching for changes
445 445 remote: adding changesets
446 446 remote: adding manifests
447 447 remote: adding file changes
448 448 remote: added 1 changesets with 2 changes to 2 files
449 449 $ hg pull $remote
450 450 pulling from http://localhost:$HGPORT/
451 451 searching for changes
452 452 adding changesets
453 453 adding manifests
454 454 adding file changes
455 455 added 1 changesets with 2 changes to 2 files
456 456 (run 'hg update' to get a working copy)
457 457 $ hg incoming $remote
458 458 comparing with http://localhost:$HGPORT/
459 459 searching for changes
460 460 no changes found
461 461 [1]
462 462 $ hg outgoing $remote
463 463 comparing with http://localhost:$HGPORT/
464 464 searching for changes
465 465 no changes found
466 466 [1]
467 467 $ cd ..
468 468 $ tstop
469 469
470 470 $ tstart repo1b
471 471 $ cd repo2b
472 472 $ hg incoming $remote
473 473 comparing with http://localhost:$HGPORT/
474 474 searching for changes
475 475 8 d8f638ac69e9: r8 name2
476 476 $ hg outgoing $remote
477 477 comparing with http://localhost:$HGPORT/
478 478 searching for changes
479 479 4 e71dbbc70e03: r4 name1
480 480 $ hg pull $remote
481 481 pulling from http://localhost:$HGPORT/
482 482 searching for changes
483 483 adding changesets
484 484 adding manifests
485 485 adding file changes
486 486 added 1 changesets with 2 changes to 2 files
487 487 (run 'hg update' to get a working copy)
488 488 $ hg push $remote --new-branch
489 489 pushing to http://localhost:$HGPORT/
490 490 searching for changes
491 491 remote: adding changesets
492 492 remote: adding manifests
493 493 remote: adding file changes
494 494 remote: added 1 changesets with 2 changes to 2 files
495 495 $ hg incoming $remote
496 496 comparing with http://localhost:$HGPORT/
497 497 searching for changes
498 498 no changes found
499 499 [1]
500 500 $ hg outgoing $remote
501 501 comparing with http://localhost:$HGPORT/
502 502 searching for changes
503 503 no changes found
504 504 [1]
505 505 $ cd ..
506 506 $ tstop show
507 507 "GET /?cmd=capabilities HTTP/1.1" 200 -
508 508 "GET /?cmd=heads HTTP/1.1" 200 -
509 509 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
510 510 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
511 511 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961
512 512 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
513 513 "GET /?cmd=capabilities HTTP/1.1" 200 -
514 514 "GET /?cmd=heads HTTP/1.1" 200 -
515 515 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
516 516 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
517 517 "GET /?cmd=capabilities HTTP/1.1" 200 -
518 518 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
519 519 "GET /?cmd=heads HTTP/1.1" 200 -
520 520 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961
521 521 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785
522 522 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961
523 523 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
524 524 "GET /?cmd=capabilities HTTP/1.1" 200 -
525 525 "GET /?cmd=heads HTTP/1.1" 200 -
526 526 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
527 527 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
528 528 "GET /?cmd=branchmap HTTP/1.1" 200 -
529 529 "GET /?cmd=branchmap HTTP/1.1" 200 -
530 530 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
531 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91
531 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+1827a5bb63e602382eb89dd58f2ac9f3b007ad91* (glob)
532 532 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
533 533 "GET /?cmd=capabilities HTTP/1.1" 200 -
534 534 "GET /?cmd=heads HTTP/1.1" 200 -
535 535 "GET /?cmd=capabilities HTTP/1.1" 200 -
536 536 "GET /?cmd=heads HTTP/1.1" 200 -
@@ -1,45 +1,45
1 1 #require killdaemons
2 2
3 3 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
4 4
5 5 $ cat << EOF >> $HGRCPATH
6 6 > [experimental]
7 7 > # This tests is intended for bundle1 only.
8 8 > # bundle2 carries the head information inside the bundle itself and
9 9 > # always uses 'force' as the heads value.
10 10 > bundle2-exp = False
11 11 > EOF
12 12
13 13 Create a remote repository.
14 14
15 15 $ hg init remote
16 16 $ hg serve -R remote --config web.push_ssl=False --config web.allow_push=* -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
17 17 $ cat hg1.pid >> $DAEMON_PIDS
18 18
19 19 Clone the repository and push a change.
20 20
21 21 $ hg clone http://localhost:$HGPORT/ local
22 22 no changes found
23 23 updating to branch default
24 24 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 25 $ touch local/README
26 26 $ hg ci -R local -A -m hoge
27 27 adding README
28 28 $ hg push -R local
29 29 pushing to http://localhost:$HGPORT/
30 30 searching for changes
31 31 remote: adding changesets
32 32 remote: adding manifests
33 33 remote: adding file changes
34 34 remote: added 1 changesets with 1 changes to 1 files
35 35
36 36 Ensure hashed heads format is used.
37 37 The hash here is always the same since the remote repository only has the null head.
38 38
39 39 $ cat access.log | grep unbundle
40 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f (glob)
40 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f* (glob)
41 41
42 42 Explicitly kill daemons to let the test exit on Windows
43 43
44 44 $ killdaemons.py
45 45
@@ -1,162 +1,162
1 1 #require killdaemons
2 2
3 3 Test wire protocol argument passing
4 4
5 5 Setup repo:
6 6
7 7 $ hg init repo
8 8
9 9 Local:
10 10
11 11 $ hg debugwireargs repo eins zwei --three drei --four vier
12 12 eins zwei drei vier None
13 13 $ hg debugwireargs repo eins zwei --four vier
14 14 eins zwei None vier None
15 15 $ hg debugwireargs repo eins zwei
16 16 eins zwei None None None
17 17 $ hg debugwireargs repo eins zwei --five fuenf
18 18 eins zwei None None fuenf
19 19
20 20 HTTP:
21 21
22 22 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid \
23 23 > -E error.log -A access.log \
24 24 > --config experimental.httppostargs=yes
25 25 $ cat hg1.pid >> $DAEMON_PIDS
26 26
27 27 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
28 28 un deux trois quatre None
29 29 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
30 30 un deux trois qu atre None
31 31 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
32 32 eins zwei None vier None
33 33 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
34 34 eins zwei None None None
35 35 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
36 36 eins zwei None None None
37 37 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
38 38 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
39 39 $ cat error.log
40 40 $ cat access.log
41 41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
42 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39 (glob)
43 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39 (glob)
42 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
43 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
44 44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
45 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43 (glob)
46 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43 (glob)
45 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
46 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
47 47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
48 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27 (glob)
49 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27 (glob)
48 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
49 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
50 50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
51 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
52 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
51 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
52 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
53 53 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
54 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
55 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
54 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
55 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
56 56 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
57 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033 (glob)
58 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033 (glob)
57 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
58 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
59 59
60 60 HTTP without args-in-POST:
61 61 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg1.pid -E error.log -A access.log
62 62 $ cat hg1.pid >> $DAEMON_PIDS
63 63
64 64 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois quatre
65 65 un deux trois quatre None
66 66 $ hg debugwireargs http://localhost:$HGPORT1/ \ un deux trois\ qu\ \ atre
67 67 un deux trois qu atre None
68 68 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --four vier
69 69 eins zwei None vier None
70 70 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei
71 71 eins zwei None None None
72 72 $ hg debugwireargs http://localhost:$HGPORT1/ eins zwei --five fuenf
73 73 eins zwei None None None
74 74 $ hg debugwireargs http://localhost:$HGPORT1/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
75 75 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
76 76 $ cat error.log
77 77 $ cat access.log
78 78 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
79 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39 (glob)
80 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39 (glob)
79 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
80 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:39* (glob)
81 81 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
82 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43 (glob)
83 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43 (glob)
82 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
83 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:43* (glob)
84 84 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
85 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27 (glob)
86 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27 (glob)
85 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
86 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:27* (glob)
87 87 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
88 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
89 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
88 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
89 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
90 90 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
91 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
92 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17 (glob)
91 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
92 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:17* (glob)
93 93 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
94 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033 (glob)
95 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033 (glob)
94 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
95 * - - [*] "POST /?cmd=debugwireargs HTTP/1.1" 200 - x-hgargs-post:1033* (glob)
96 96 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
97 97 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
98 98 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
99 99 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
100 100 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
101 101 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
102 102 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
103 103 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
104 104 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
105 105 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
106 106 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
107 107 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
108 108 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
109 109 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
110 110 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
111 111 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
112 112 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
113 113 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
114 114
115 115 HTTP without the httpheader capability:
116 116
117 117 $ HGRCPATH="`pwd`/repo/.hgrc"
118 118 $ export HGRCPATH
119 119 $ CAP=httpheader
120 120 $ . "$TESTDIR/notcapable"
121 121
122 122 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
123 123 $ cat hg2.pid >> $DAEMON_PIDS
124 124
125 125 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
126 126 un deux trois quatre None
127 127 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
128 128 eins zwei None vier None
129 129 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
130 130 eins zwei None None None
131 131 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
132 132 eins zwei None None None
133 133 $ cat error2.log
134 134 $ cat access2.log
135 135 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
136 136 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
137 137 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
138 138 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
139 139 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
140 140 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
141 141 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
142 142 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
143 143 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
144 144 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
145 145 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
146 146 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
147 147
148 148 SSH (try to exercise the ssh functionality with a dummy script):
149 149
150 150 $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo uno due tre quattro
151 151 uno due tre quattro None
152 152 $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --four vier
153 153 eins zwei None vier None
154 154 $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei
155 155 eins zwei None None None
156 156 $ hg debugwireargs --ssh "python $TESTDIR/dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
157 157 eins zwei None None None
158 158
159 159 Explicitly kill daemons to let the test exit on Windows
160 160
161 161 $ killdaemons.py
162 162
General Comments 0
You need to be logged in to leave comments. Login now