Show More
@@ -1,24 +1,25 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 | # |
|
2 | # | |
3 | # Corrupt an hg repo with two pulls. |
|
3 | # Corrupt an hg repo with two pulls. | |
4 | # |
|
4 | # | |
5 |
|
5 | |||
6 | # create one repo with a long history |
|
6 | # create one repo with a long history | |
7 | hg init source1 |
|
7 | hg init source1 | |
8 | cd source1 |
|
8 | cd source1 | |
9 | touch foo |
|
9 | touch foo | |
10 | hg add foo |
|
10 | hg add foo | |
11 | for i in 1 2 3 4 5 6 7 8 9 10; do |
|
11 | for i in 1 2 3 4 5 6 7 8 9 10; do | |
12 | echo $i >> foo |
|
12 | echo $i >> foo | |
13 | hg ci -m $i |
|
13 | hg ci -m $i | |
14 | done |
|
14 | done | |
15 | cd .. |
|
15 | cd .. | |
16 |
|
16 | |||
17 | # create a third repo to pull both other repos into it |
|
17 | # create a third repo to pull both other repos into it | |
18 | hg init version2 |
|
18 | hg init version2 | |
19 | hg -R version2 pull source1 & |
|
19 | hg -R version2 pull source1 & | |
20 | sleep 1 |
|
20 | sleep 1 | |
21 |
|
21 | |||
22 | hg clone --pull -U version2 corrupted |
|
22 | hg clone --pull -U version2 corrupted | |
|
23 | wait | |||
23 | hg -R corrupted verify |
|
24 | hg -R corrupted verify | |
24 | hg -R version2 verify |
|
25 | hg -R version2 verify |
General Comments 0
You need to be logged in to leave comments.
Login now