Show More
@@ -660,3 +660,44 b' then pull (and update):' | |||||
660 | $ cd .. |
|
660 | $ cd .. | |
661 |
|
661 | |||
662 | #endif |
|
662 | #endif | |
|
663 | ||||
|
664 | Test drive letter | |||
|
665 | ----------------- | |||
|
666 | ||||
|
667 | Windows has a weird relative path that can change the drive letter, which | |||
|
668 | should also be prohibited on Windows. | |||
|
669 | ||||
|
670 | prepare tampered repo: | |||
|
671 | ||||
|
672 | $ hg init driveletter | |||
|
673 | $ cd driveletter | |||
|
674 | $ hg import --bypass -qm 'add subrepo "X:"' - <<'EOF' | |||
|
675 | > diff --git a/.hgsub b/.hgsub | |||
|
676 | > new file mode 100644 | |||
|
677 | > --- /dev/null | |||
|
678 | > +++ b/.hgsub | |||
|
679 | > @@ -0,0 +1,1 @@ | |||
|
680 | > +X: = foo | |||
|
681 | > diff --git a/.hgsubstate b/.hgsubstate | |||
|
682 | > new file mode 100644 | |||
|
683 | > --- /dev/null | |||
|
684 | > +++ b/.hgsubstate | |||
|
685 | > @@ -0,0 +1,1 @@ | |||
|
686 | > +0000000000000000000000000000000000000000 X: | |||
|
687 | > EOF | |||
|
688 | $ cd .. | |||
|
689 | ||||
|
690 | on clone (and update): | |||
|
691 | ||||
|
692 | #if windows | |||
|
693 | ||||
|
694 | $ hg clone -q driveletter driveletter2 | |||
|
695 | abort: path contains illegal component: X: | |||
|
696 | ||||
|
697 | #else | |||
|
698 | ||||
|
699 | $ hg clone -q driveletter driveletter2 | |||
|
700 | $ ls driveletter2 | |||
|
701 | X: | |||
|
702 | ||||
|
703 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now