##// END OF EJS Templates
tests: roll test-clone-failure.t into test-clone.t
Adrian Buehlmann -
r16847:cda5402b default
parent child Browse files
Show More
@@ -458,3 +458,101 b' iterable in addbranchrevs()'
458 updating to branch stable
458 updating to branch stable
459 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
459 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
460 $ rm -r ua
460 $ rm -r ua
461
462
463 Testing failures:
464
465 $ mkdir fail
466 $ cd fail
467
468 No local source
469
470 $ hg clone a b
471 abort: repository a not found!
472 [255]
473
474 No remote source
475
476 $ hg clone http://127.0.0.1:3121/a b
477 abort: error: *refused* (glob)
478 [255]
479 $ rm -rf b # work around bug with http clone
480
481
482 #if unix-permissions
483
484 Inaccessible source
485
486 $ mkdir a
487 $ chmod 000 a
488 $ hg clone a b
489 abort: repository a not found!
490 [255]
491
492 Inaccessible destination
493
494 $ hg init b
495 $ cd b
496 $ hg clone . ../a
497 abort: Permission denied: ../a
498 [255]
499 $ cd ..
500 $ chmod 700 a
501 $ rm -r a b
502
503 #endif
504
505
506 Source of wrong type
507
508 $ if "$TESTDIR/hghave" -q fifo; then
509 > mkfifo a
510 > hg clone a b
511 > rm a
512 > else
513 > echo "abort: repository a not found!"
514 > fi
515 abort: repository a not found!
516
517 Default destination, same directory
518
519 $ hg init q
520 $ hg clone q
521 destination directory: q
522 abort: destination 'q' is not empty
523 [255]
524
525 destination directory not empty
526
527 $ mkdir a
528 $ echo stuff > a/a
529 $ hg clone q a
530 abort: destination 'a' is not empty
531 [255]
532
533
534 #if unix-permissions
535
536 leave existing directory in place after clone failure
537
538 $ hg init c
539 $ cd c
540 $ echo c > c
541 $ hg commit -A -m test
542 adding c
543 $ chmod -rx .hg/store/data
544 $ cd ..
545 $ mkdir d
546 $ hg clone c d 2> err
547 [255]
548 $ test -d d
549 $ test -d d/.hg
550 [1]
551
552 reenable perm to allow deletion
553
554 $ chmod +rx c/.hg/store/data
555
556 #endif
557
558 $ cd ..
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now