##// END OF EJS Templates
test: enable sparse-revlog for test-ssh-bundle1.t...
Boris Feld -
r40944:f6904d60 default
parent child Browse files
Show More
@@ -1,582 +1,588
1 TRANSITIONAL CONFIG
2 $ cat << EOF >> $HGRCPATH
3 > [format]
4 > sparse-revlog = yes
5 > EOF
6
1 7 This test is a duplicate of 'test-http.t' feel free to factor out
2 8 parts that are not bundle1/bundle2 specific.
3 9
4 10 #testcases sshv1 sshv2
5 11
6 12 #if sshv2
7 13 $ cat >> $HGRCPATH << EOF
8 14 > [experimental]
9 15 > sshpeer.advertise-v2 = true
10 16 > sshserver.support-v2 = true
11 17 > EOF
12 18 #endif
13 19
14 20 $ cat << EOF >> $HGRCPATH
15 21 > [devel]
16 22 > # This test is dedicated to interaction through old bundle
17 23 > legacy.exchange = bundle1
18 24 > EOF
19 25
20 26
21 27 This test tries to exercise the ssh functionality with a dummy script
22 28
23 29 creating 'remote' repo
24 30
25 31 $ hg init remote
26 32 $ cd remote
27 33 $ echo this > foo
28 34 $ echo this > fooO
29 35 $ hg ci -A -m "init" foo fooO
30 36
31 37 insert a closed branch (issue4428)
32 38
33 39 $ hg up null
34 40 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
35 41 $ hg branch closed
36 42 marked working directory as branch closed
37 43 (branches are permanent and global, did you want a bookmark?)
38 44 $ hg ci -mc0
39 45 $ hg ci --close-branch -mc1
40 46 $ hg up -q default
41 47
42 48 configure for serving
43 49
44 50 $ cat <<EOF > .hg/hgrc
45 51 > [server]
46 52 > uncompressed = True
47 53 >
48 54 > [hooks]
49 55 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
50 56 > EOF
51 57 $ cd $TESTTMP
52 58
53 59 repo not found error
54 60
55 61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
56 62 remote: abort: repository nonexistent not found!
57 63 abort: no suitable response from remote hg!
58 64 [255]
59 65
60 66 non-existent absolute path
61 67
62 68 #if no-msys
63 69 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
64 70 remote: abort: repository /$TESTTMP/nonexistent not found!
65 71 abort: no suitable response from remote hg!
66 72 [255]
67 73 #endif
68 74
69 75 clone remote via stream
70 76
71 77 #if no-reposimplestore
72 78
73 79 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream
74 80 streaming all changes
75 81 4 files to transfer, 602 bytes of data
76 82 transferred 602 bytes in * seconds (*) (glob)
77 83 searching for changes
78 84 no changes found
79 85 updating to branch default
80 86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
81 87 $ cd local-stream
82 88 $ hg verify
83 89 checking changesets
84 90 checking manifests
85 91 crosschecking files in changesets and manifests
86 92 checking files
87 93 checked 3 changesets with 2 changes to 2 files
88 94 $ hg branches
89 95 default 0:1160648e36ce
90 96 $ cd $TESTTMP
91 97
92 98 clone bookmarks via stream
93 99
94 100 $ hg -R local-stream book mybook
95 101 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
96 102 streaming all changes
97 103 4 files to transfer, 602 bytes of data
98 104 transferred 602 bytes in * seconds (*) (glob)
99 105 searching for changes
100 106 no changes found
101 107 updating to branch default
102 108 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 109 $ cd stream2
104 110 $ hg book
105 111 mybook 0:1160648e36ce
106 112 $ cd $TESTTMP
107 113 $ rm -rf local-stream stream2
108 114
109 115 #endif
110 116
111 117 clone remote via pull
112 118
113 119 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
114 120 requesting all changes
115 121 adding changesets
116 122 adding manifests
117 123 adding file changes
118 124 added 3 changesets with 2 changes to 2 files
119 125 new changesets 1160648e36ce:ad076bfb429d
120 126 updating to branch default
121 127 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 128
123 129 verify
124 130
125 131 $ cd local
126 132 $ hg verify
127 133 checking changesets
128 134 checking manifests
129 135 crosschecking files in changesets and manifests
130 136 checking files
131 137 checked 3 changesets with 2 changes to 2 files
132 138 $ cat >> .hg/hgrc <<EOF
133 139 > [hooks]
134 140 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
135 141 > EOF
136 142
137 143 empty default pull
138 144
139 145 $ hg paths
140 146 default = ssh://user@dummy/remote
141 147 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
142 148 pulling from ssh://user@dummy/remote
143 149 searching for changes
144 150 no changes found
145 151
146 152 pull from wrong ssh URL
147 153
148 154 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
149 155 pulling from ssh://user@dummy/doesnotexist
150 156 remote: abort: repository doesnotexist not found!
151 157 abort: no suitable response from remote hg!
152 158 [255]
153 159
154 160 local change
155 161
156 162 $ echo bleah > foo
157 163 $ hg ci -m "add"
158 164
159 165 updating rc
160 166
161 167 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
162 168 $ echo "[ui]" >> .hg/hgrc
163 169 $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc
164 170
165 171 find outgoing
166 172
167 173 $ hg out ssh://user@dummy/remote
168 174 comparing with ssh://user@dummy/remote
169 175 searching for changes
170 176 changeset: 3:a28a9d1a809c
171 177 tag: tip
172 178 parent: 0:1160648e36ce
173 179 user: test
174 180 date: Thu Jan 01 00:00:00 1970 +0000
175 181 summary: add
176 182
177 183
178 184 find incoming on the remote side
179 185
180 186 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
181 187 comparing with ssh://user@dummy/local
182 188 searching for changes
183 189 changeset: 3:a28a9d1a809c
184 190 tag: tip
185 191 parent: 0:1160648e36ce
186 192 user: test
187 193 date: Thu Jan 01 00:00:00 1970 +0000
188 194 summary: add
189 195
190 196
191 197 find incoming on the remote side (using absolute path)
192 198
193 199 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
194 200 comparing with ssh://user@dummy/$TESTTMP/local
195 201 searching for changes
196 202 changeset: 3:a28a9d1a809c
197 203 tag: tip
198 204 parent: 0:1160648e36ce
199 205 user: test
200 206 date: Thu Jan 01 00:00:00 1970 +0000
201 207 summary: add
202 208
203 209
204 210 push
205 211
206 212 $ hg push
207 213 pushing to ssh://user@dummy/remote
208 214 searching for changes
209 215 remote: adding changesets
210 216 remote: adding manifests
211 217 remote: adding file changes
212 218 remote: added 1 changesets with 1 changes to 1 files
213 219 $ cd $TESTTMP/remote
214 220
215 221 check remote tip
216 222
217 223 $ hg tip
218 224 changeset: 3:a28a9d1a809c
219 225 tag: tip
220 226 parent: 0:1160648e36ce
221 227 user: test
222 228 date: Thu Jan 01 00:00:00 1970 +0000
223 229 summary: add
224 230
225 231 $ hg verify
226 232 checking changesets
227 233 checking manifests
228 234 crosschecking files in changesets and manifests
229 235 checking files
230 236 checked 4 changesets with 3 changes to 2 files
231 237 $ hg cat -r tip foo
232 238 bleah
233 239 $ echo z > z
234 240 $ hg ci -A -m z z
235 241 created new head
236 242
237 243 test pushkeys and bookmarks
238 244
239 245 $ cd $TESTTMP/local
240 246 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
241 247 bookmarks
242 248 namespaces
243 249 phases
244 250 $ hg book foo -r 0
245 251 $ hg out -B
246 252 comparing with ssh://user@dummy/remote
247 253 searching for changed bookmarks
248 254 foo 1160648e36ce
249 255 $ hg push -B foo
250 256 pushing to ssh://user@dummy/remote
251 257 searching for changes
252 258 no changes found
253 259 exporting bookmark foo
254 260 [1]
255 261 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
256 262 foo 1160648e36cec0054048a7edc4110c6f84fde594
257 263 $ hg book -f foo
258 264 $ hg push --traceback
259 265 pushing to ssh://user@dummy/remote
260 266 searching for changes
261 267 no changes found
262 268 updating bookmark foo
263 269 [1]
264 270 $ hg book -d foo
265 271 $ hg in -B
266 272 comparing with ssh://user@dummy/remote
267 273 searching for changed bookmarks
268 274 foo a28a9d1a809c
269 275 $ hg book -f -r 0 foo
270 276 $ hg pull -B foo
271 277 pulling from ssh://user@dummy/remote
272 278 no changes found
273 279 updating bookmark foo
274 280 $ hg book -d foo
275 281 $ hg push -B foo
276 282 pushing to ssh://user@dummy/remote
277 283 searching for changes
278 284 no changes found
279 285 deleting remote bookmark foo
280 286 [1]
281 287
282 288 a bad, evil hook that prints to stdout
283 289
284 290 $ cat <<EOF > $TESTTMP/badhook
285 291 > import sys
286 292 > sys.stdout.write("KABOOM\n")
287 293 > EOF
288 294
289 295 $ echo '[hooks]' >> ../remote/.hg/hgrc
290 296 $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc
291 297 $ echo r > r
292 298 $ hg ci -A -m z r
293 299
294 300 push should succeed even though it has an unexpected response
295 301
296 302 $ hg push
297 303 pushing to ssh://user@dummy/remote
298 304 searching for changes
299 305 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
300 306 remote: adding changesets
301 307 remote: adding manifests
302 308 remote: adding file changes
303 309 remote: added 1 changesets with 1 changes to 1 files
304 310 remote: KABOOM
305 311 $ hg -R ../remote heads
306 312 changeset: 5:1383141674ec
307 313 tag: tip
308 314 parent: 3:a28a9d1a809c
309 315 user: test
310 316 date: Thu Jan 01 00:00:00 1970 +0000
311 317 summary: z
312 318
313 319 changeset: 4:6c0482d977a3
314 320 parent: 0:1160648e36ce
315 321 user: test
316 322 date: Thu Jan 01 00:00:00 1970 +0000
317 323 summary: z
318 324
319 325
320 326 clone bookmarks
321 327
322 328 $ hg -R ../remote bookmark test
323 329 $ hg -R ../remote bookmarks
324 330 * test 4:6c0482d977a3
325 331 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
326 332 requesting all changes
327 333 adding changesets
328 334 adding manifests
329 335 adding file changes
330 336 added 6 changesets with 5 changes to 4 files (+1 heads)
331 337 new changesets 1160648e36ce:1383141674ec
332 338 updating to branch default
333 339 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
334 340 $ hg -R local-bookmarks bookmarks
335 341 test 4:6c0482d977a3
336 342
337 343 passwords in ssh urls are not supported
338 344 (we use a glob here because different Python versions give different
339 345 results here)
340 346
341 347 $ hg push ssh://user:erroneouspwd@dummy/remote
342 348 pushing to ssh://user:*@dummy/remote (glob)
343 349 abort: password in URL not supported!
344 350 [255]
345 351
346 352 $ cd $TESTTMP
347 353
348 354 hide outer repo
349 355 $ hg init
350 356
351 357 Test remote paths with spaces (issue2983):
352 358
353 359 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
354 360 $ touch "$TESTTMP/a repo/test"
355 361 $ hg -R 'a repo' commit -A -m "test"
356 362 adding test
357 363 $ hg -R 'a repo' tag tag
358 364 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
359 365 73649e48688a
360 366
361 367 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
362 368 abort: unknown revision 'noNoNO'!
363 369 [255]
364 370
365 371 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
366 372
367 373 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
368 374 destination directory: a repo
369 375 abort: destination 'a repo' is not empty
370 376 [255]
371 377
372 378 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
373 379 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
374 380 parameters:
375 381
376 382 $ cat > ssh.sh << EOF
377 383 > userhost="\$1"
378 384 > SSH_ORIGINAL_COMMAND="\$2"
379 385 > export SSH_ORIGINAL_COMMAND
380 386 > PYTHONPATH="$PYTHONPATH"
381 387 > export PYTHONPATH
382 388 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
383 389 > EOF
384 390
385 391 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
386 392 73649e48688a
387 393
388 394 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
389 395 remote: Illegal repository "$TESTTMP/a'repo"
390 396 abort: no suitable response from remote hg!
391 397 [255]
392 398
393 399 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
394 400 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
395 401 abort: no suitable response from remote hg!
396 402 [255]
397 403
398 404 $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh"
399 405 Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation
400 406 [255]
401 407
402 408 Test hg-ssh in read-only mode:
403 409
404 410 $ cat > ssh.sh << EOF
405 411 > userhost="\$1"
406 412 > SSH_ORIGINAL_COMMAND="\$2"
407 413 > export SSH_ORIGINAL_COMMAND
408 414 > PYTHONPATH="$PYTHONPATH"
409 415 > export PYTHONPATH
410 416 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
411 417 > EOF
412 418
413 419 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
414 420 requesting all changes
415 421 adding changesets
416 422 adding manifests
417 423 adding file changes
418 424 added 6 changesets with 5 changes to 4 files (+1 heads)
419 425 new changesets 1160648e36ce:1383141674ec
420 426 updating to branch default
421 427 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
422 428
423 429 $ cd read-only-local
424 430 $ echo "baz" > bar
425 431 $ hg ci -A -m "unpushable commit" bar
426 432 $ hg push --ssh "sh ../ssh.sh"
427 433 pushing to ssh://user@dummy/*/remote (glob)
428 434 searching for changes
429 435 remote: Permission denied
430 436 remote: abort: pretxnopen.hg-ssh hook failed
431 437 remote: Permission denied
432 438 remote: pushkey-abort: prepushkey.hg-ssh hook failed
433 439 updating 6c0482d977a3 to public failed!
434 440 [1]
435 441
436 442 $ cd $TESTTMP
437 443
438 444 stderr from remote commands should be printed before stdout from local code (issue4336)
439 445
440 446 $ hg clone remote stderr-ordering
441 447 updating to branch default
442 448 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 449 $ cd stderr-ordering
444 450 $ cat >> localwrite.py << EOF
445 451 > from mercurial import exchange, extensions
446 452 >
447 453 > def wrappedpush(orig, repo, *args, **kwargs):
448 454 > res = orig(repo, *args, **kwargs)
449 455 > repo.ui.write(b'local stdout\n')
450 456 > return res
451 457 >
452 458 > def extsetup(ui):
453 459 > extensions.wrapfunction(exchange, b'push', wrappedpush)
454 460 > EOF
455 461
456 462 $ cat >> .hg/hgrc << EOF
457 463 > [paths]
458 464 > default-push = ssh://user@dummy/remote
459 465 > [ui]
460 466 > ssh = "$PYTHON" "$TESTDIR/dummyssh"
461 467 > [extensions]
462 468 > localwrite = localwrite.py
463 469 > EOF
464 470
465 471 $ echo localwrite > foo
466 472 $ hg commit -m 'testing localwrite'
467 473 $ hg push
468 474 pushing to ssh://user@dummy/remote
469 475 searching for changes
470 476 remote: adding changesets
471 477 remote: adding manifests
472 478 remote: adding file changes
473 479 remote: added 1 changesets with 1 changes to 1 files
474 480 remote: KABOOM
475 481 local stdout
476 482
477 483 debug output
478 484
479 485 $ hg pull --debug ssh://user@dummy/remote
480 486 pulling from ssh://user@dummy/remote
481 487 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
482 488 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
483 489 sending hello command
484 490 sending between command
485 remote: 427 (sshv1 !)
491 remote: 440 (sshv1 !)
486 492 protocol upgraded to exp-ssh-v2-0003 (sshv2 !)
487 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
493 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
488 494 remote: 1 (sshv1 !)
489 495 sending protocaps command
490 496 preparing listkeys for "bookmarks"
491 497 sending listkeys command
492 498 received listkey for "bookmarks": 45 bytes
493 499 query 1; heads
494 500 sending batch command
495 501 searching for changes
496 502 all remote heads known locally
497 503 no changes found
498 504 preparing listkeys for "phases"
499 505 sending listkeys command
500 506 received listkey for "phases": 15 bytes
501 507 checking for updated bookmarks
502 508
503 509 $ cd $TESTTMP
504 510
505 511 $ cat dummylog
506 512 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
507 513 Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio (no-msys !)
508 514 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
509 515 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !)
510 516 Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !)
511 517 Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !)
512 518 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
513 519 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
514 520 Got arguments 1:user@dummy 2:hg -R local serve --stdio
515 521 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
516 522 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
517 523 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
518 524 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
519 525 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
520 526 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
521 527 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
522 528 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
523 529 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
524 530 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
525 531 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
526 532 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
527 533 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
528 534 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
529 535 Got arguments 1:user@dummy 2:hg init 'a repo'
530 536 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
531 537 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
532 538 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
533 539 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
534 540 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
535 541 changegroup-in-remote hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
536 542 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
537 543
538 544 remote hook failure is attributed to remote
539 545
540 546 $ cat > $TESTTMP/failhook << EOF
541 547 > def hook(ui, repo, **kwargs):
542 548 > ui.write(b'hook failure!\n')
543 549 > ui.flush()
544 550 > return 1
545 551 > EOF
546 552
547 553 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
548 554
549 555 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
550 556 $ cd hookout
551 557 $ touch hookfailure
552 558 $ hg -q commit -A -m 'remote hook failure'
553 559 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push
554 560 pushing to ssh://user@dummy/remote
555 561 searching for changes
556 562 remote: adding changesets
557 563 remote: adding manifests
558 564 remote: adding file changes
559 565 remote: added 1 changesets with 1 changes to 1 files
560 566 remote: hook failure!
561 567 remote: transaction abort!
562 568 remote: rollback completed
563 569 remote: abort: pretxnchangegroup.fail hook failed
564 570 [1]
565 571
566 572 abort during pull is properly reported as such
567 573
568 574 $ echo morefoo >> ../remote/foo
569 575 $ hg -R ../remote commit --message "more foo to be pulled"
570 576 $ cat >> ../remote/.hg/hgrc << EOF
571 577 > [extensions]
572 578 > crash = ${TESTDIR}/crashgetbundler.py
573 579 > EOF
574 580 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull
575 581 pulling from ssh://user@dummy/remote
576 582 searching for changes
577 583 adding changesets
578 584 remote: abort: this is an exercise
579 585 transaction abort!
580 586 rollback completed
581 587 abort: stream ended unexpectedly (got 0 bytes, expected 4)
582 588 [255]
General Comments 0
You need to be logged in to leave comments. Login now