Show More
@@ -0,0 +1,28 b'' | |||||
|
1 | #!/bin/bash | |||
|
2 | ||||
|
3 | set -x | |||
|
4 | mkdir a | |||
|
5 | cd a | |||
|
6 | hg init | |||
|
7 | echo a > a | |||
|
8 | hg add a | |||
|
9 | hg commit -t test -u test -d '0 0' | |||
|
10 | ||||
|
11 | # Default operation | |||
|
12 | hg clone . ../b | |||
|
13 | cd ../b | |||
|
14 | cat a | |||
|
15 | hg verify | |||
|
16 | ||||
|
17 | # No update | |||
|
18 | hg clone -U . ../c | |||
|
19 | cd ../c | |||
|
20 | cat a | |||
|
21 | hg verify | |||
|
22 | ||||
|
23 | # Default destination | |||
|
24 | mkdir ../d | |||
|
25 | cd ../d | |||
|
26 | hg clone ../a | |||
|
27 | cd a | |||
|
28 | hg cat a |
@@ -0,0 +1,43 b'' | |||||
|
1 | #!/bin/bash | |||
|
2 | ||||
|
3 | set -x | |||
|
4 | ||||
|
5 | # No local source | |||
|
6 | hg clone a b | |||
|
7 | echo $? | |||
|
8 | ||||
|
9 | # No remote source | |||
|
10 | hg clone http://127.0.0.1:3121/a b | |||
|
11 | echo $? | |||
|
12 | rm -rf b # work around bug with http clone | |||
|
13 | ||||
|
14 | # Inaccessible source | |||
|
15 | mkdir a | |||
|
16 | chmod 000 a | |||
|
17 | hg clone a b | |||
|
18 | echo $? | |||
|
19 | ||||
|
20 | # Inaccessible destination | |||
|
21 | mkdir b | |||
|
22 | cd b | |||
|
23 | hg init | |||
|
24 | hg clone . ../a | |||
|
25 | echo $? | |||
|
26 | cd .. | |||
|
27 | chmod 700 a | |||
|
28 | rm -rf a b | |||
|
29 | ||||
|
30 | # Source of wrong type | |||
|
31 | mkfifo a | |||
|
32 | hg clone a b | |||
|
33 | echo $? | |||
|
34 | rm a | |||
|
35 | ||||
|
36 | # Default destination, same directory | |||
|
37 | mkdir q | |||
|
38 | cd q | |||
|
39 | hg init | |||
|
40 | cd .. | |||
|
41 | hg clone q | |||
|
42 | ||||
|
43 | true |
@@ -0,0 +1,44 b'' | |||||
|
1 | + hg clone a b | |||
|
2 | abort: No such file or directory: a | |||
|
3 | + echo 255 | |||
|
4 | 255 | |||
|
5 | + hg clone http://127.0.0.1:3121/a b | |||
|
6 | requesting all changes | |||
|
7 | adding changesets | |||
|
8 | abort: error 111: Connection refused | |||
|
9 | transaction abort! | |||
|
10 | rollback completed | |||
|
11 | + echo 255 | |||
|
12 | 255 | |||
|
13 | + rm -rf b | |||
|
14 | + mkdir a | |||
|
15 | + chmod 000 a | |||
|
16 | + hg clone a b | |||
|
17 | cp: cannot stat `a/.hg': Permission denied | |||
|
18 | abort: cp exited with status 1 | |||
|
19 | + echo 255 | |||
|
20 | 255 | |||
|
21 | + mkdir b | |||
|
22 | + cd b | |||
|
23 | + hg init | |||
|
24 | + hg clone . ../a | |||
|
25 | abort: destination '../a' already exists | |||
|
26 | + echo 1 | |||
|
27 | 1 | |||
|
28 | + cd .. | |||
|
29 | + chmod 700 a | |||
|
30 | + rm -rf a b | |||
|
31 | + mkfifo a | |||
|
32 | + hg clone a b | |||
|
33 | cp: cannot stat `a/.hg': Not a directory | |||
|
34 | abort: cp exited with status 1 | |||
|
35 | + echo 255 | |||
|
36 | 255 | |||
|
37 | + rm a | |||
|
38 | + mkdir q | |||
|
39 | + cd q | |||
|
40 | + hg init | |||
|
41 | + cd .. | |||
|
42 | + hg clone q | |||
|
43 | abort: destination 'q' already exists | |||
|
44 | + true |
@@ -0,0 +1,32 b'' | |||||
|
1 | + mkdir a | |||
|
2 | + cd a | |||
|
3 | + hg init | |||
|
4 | + echo a | |||
|
5 | + hg add a | |||
|
6 | + hg commit -t test -u test -d '0 0' | |||
|
7 | + hg clone . ../b | |||
|
8 | + cd ../b | |||
|
9 | + cat a | |||
|
10 | a | |||
|
11 | + hg verify | |||
|
12 | checking changesets | |||
|
13 | checking manifests | |||
|
14 | crosschecking files in changesets and manifests | |||
|
15 | checking files | |||
|
16 | 1 files, 1 changesets, 1 total revisions | |||
|
17 | + hg clone -U . ../c | |||
|
18 | + cd ../c | |||
|
19 | + cat a | |||
|
20 | cat: a: No such file or directory | |||
|
21 | + hg verify | |||
|
22 | checking changesets | |||
|
23 | checking manifests | |||
|
24 | crosschecking files in changesets and manifests | |||
|
25 | checking files | |||
|
26 | 1 files, 1 changesets, 1 total revisions | |||
|
27 | + mkdir ../d | |||
|
28 | + cd ../d | |||
|
29 | + hg clone ../a | |||
|
30 | + cd a | |||
|
31 | + hg cat a | |||
|
32 | a |
General Comments 0
You need to be logged in to leave comments.
Login now