Show More
@@ -1,25 +1,44 b'' | |||||
1 | #!/bin/sh |
|
1 | Corrupt an hg repo with two pulls. | |
2 | # |
|
2 | create one repo with a long history | |
3 | # Corrupt an hg repo with two pulls. |
|
3 | ||
4 | # |
|
4 | $ hg init source1 | |
|
5 | $ cd source1 | |||
|
6 | $ touch foo | |||
|
7 | $ hg add foo | |||
|
8 | $ for i in 1 2 3 4 5 6 7 8 9 10; do | |||
|
9 | > echo $i >> foo | |||
|
10 | > hg ci -m $i | |||
|
11 | > done | |||
|
12 | $ cd .. | |||
|
13 | ||||
|
14 | create a third repo to pull both other repos into it | |||
5 |
|
15 | |||
6 | # create one repo with a long history |
|
16 | $ hg init version2 | |
7 | hg init source1 |
|
17 | $ hg -R version2 pull source1 & | |
8 | cd source1 |
|
18 | $ sleep 1 | |
9 | touch foo |
|
19 | pulling from source1 | |
10 | hg add foo |
|
20 | requesting all changes | |
11 | for i in 1 2 3 4 5 6 7 8 9 10; do |
|
21 | adding changesets | |
12 | echo $i >> foo |
|
22 | adding manifests | |
13 | hg ci -m $i |
|
23 | adding file changes | |
14 | done |
|
24 | added 10 changesets with 10 changes to 1 files | |
15 | cd .. |
|
25 | (run 'hg update' to get a working copy) | |
16 |
|
26 | $ hg clone --pull -U version2 corrupted | ||
17 | # create a third repo to pull both other repos into it |
|
27 | requesting all changes | |
18 | hg init version2 |
|
28 | adding changesets | |
19 | hg -R version2 pull source1 & |
|
29 | adding manifests | |
20 | sleep 1 |
|
30 | adding file changes | |
21 |
|
31 | added 10 changesets with 10 changes to 1 files | ||
22 | hg clone --pull -U version2 corrupted |
|
32 | $ wait | |
23 | wait |
|
33 | $ hg -R corrupted verify | |
24 | hg -R corrupted verify |
|
34 | checking changesets | |
25 | hg -R version2 verify |
|
35 | checking manifests | |
|
36 | crosschecking files in changesets and manifests | |||
|
37 | checking files | |||
|
38 | 1 files, 10 changesets, 10 total revisions | |||
|
39 | $ hg -R version2 verify | |||
|
40 | checking changesets | |||
|
41 | checking manifests | |||
|
42 | crosschecking files in changesets and manifests | |||
|
43 | checking files | |||
|
44 | 1 files, 10 changesets, 10 total revisions |
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