summaryrefslogtreecommitdiff
path: root/tests/test-clone.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-clone.t')
-rw-r--r--tests/test-clone.t118
1 files changed, 5 insertions, 113 deletions
diff --git a/tests/test-clone.t b/tests/test-clone.t
index 3f83949..4e2aded 100644
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -10,7 +10,7 @@ Prepare repo a:
Create a non-inlined filelog:
- $ python -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
+ $ python -c 'for x in range(10000): print x' >> data1
$ for j in 0 1 2 3 4 5 6 7 8 9; do
> cat data1 >> b
> hg commit -m test
@@ -43,20 +43,13 @@ Default operation:
Invalid dest '' must abort:
$ hg clone . ''
- abort: empty destination path is not valid
+ abort: No such file or directory
[255]
No update, with debug option:
-#if hardlink
$ hg --debug clone -U . ../c
linked 8 files
- listing keys for "bookmarks"
-#else
- $ hg --debug clone -U . ../c
- copied 8 files
- listing keys for "bookmarks"
-#endif
$ cd ../c
$ cat a 2>/dev/null || echo "a not present"
a not present
@@ -92,7 +85,7 @@ Check that path aliases are expanded:
$ hg clone -q -U --config 'paths.foobar=a#0' foobar f
$ hg -R f showconfig paths.default
- $TESTTMP/a#0 (glob)
+ $TESTTMP/a#0
Use --pull:
@@ -114,7 +107,7 @@ Use --pull:
Invalid dest '' with --pull must abort (issue2528):
$ hg clone --pull a ''
- abort: empty destination path is not valid
+ abort: No such file or directory
[255]
Clone to '.':
@@ -139,7 +132,6 @@ Adding some more history to repo a:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch stable
marked working directory as branch stable
- (branches are permanent and global, did you want a bookmark?)
$ echo some text >a
$ hg ci -m "starting branch stable"
$ hg tag ref2
@@ -451,9 +443,8 @@ iterable in addbranchrevs()
$ rm -r ua
$ cat <<EOF > branchclone.py
- > from mercurial import ui, hg, extensions
+ > from mercurial import ui, hg
> myui = ui.ui()
- > extensions.loadall(myui)
> repo = hg.repository(myui, 'a')
> hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
> EOF
@@ -466,102 +457,3 @@ iterable in addbranchrevs()
updating to branch stable
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm -r ua
-
-
-Testing failures:
-
- $ mkdir fail
- $ cd fail
-
-No local source
-
- $ hg clone a b
- abort: repository a not found!
- [255]
-
-No remote source
-
- $ hg clone http://127.0.0.1:3121/a b
- abort: error: *refused* (glob)
- [255]
- $ rm -rf b # work around bug with http clone
-
-
-#if unix-permissions
-
-Inaccessible source
-
- $ mkdir a
- $ chmod 000 a
- $ hg clone a b
- abort: repository a not found!
- [255]
-
-Inaccessible destination
-
- $ hg init b
- $ cd b
- $ hg clone . ../a
- abort: Permission denied: ../a
- [255]
- $ cd ..
- $ chmod 700 a
- $ rm -r a b
-
-#endif
-
-
-#if fifo
-
-Source of wrong type
-
- $ mkfifo a
- $ hg clone a b
- abort: repository a not found!
- [255]
- $ rm a
-
-#endif
-
-Default destination, same directory
-
- $ hg init q
- $ hg clone q
- destination directory: q
- abort: destination 'q' is not empty
- [255]
-
-destination directory not empty
-
- $ mkdir a
- $ echo stuff > a/a
- $ hg clone q a
- abort: destination 'a' is not empty
- [255]
-
-
-#if unix-permissions
-
-leave existing directory in place after clone failure
-
- $ hg init c
- $ cd c
- $ echo c > c
- $ hg commit -A -m test
- adding c
- $ chmod -rx .hg/store/data
- $ cd ..
- $ mkdir d
- $ hg clone c d 2> err
- [255]
- $ test -d d
- $ test -d d/.hg
- [1]
-
-reenable perm to allow deletion
-
- $ chmod +rx c/.hg/store/data
-
-#endif
-
- $ cd ..