comparison tests/test-strip-cross.out @ 5909:f45f7390c1c5

strip: calculate list of extra nodes to save and pass it to changegroupsubset When we remove revision N from the repository, all revisions >= N are affected: either it's a descendant from N and will also be removed, or it's not a descendant of N and will be renumbered. As a consequence, we have to (at least temporarily) remove all filelog and manifest revisions that have a linkrev >= N, readding some of them later. Unfortunately, it's possible to have a revlog with two revisions r1 and r2 such that r1 < r2, but linkrev(r1) > linkrev(r2). If we try to strip revision linkrev(r1) from the repository, we'll also lose revision r2 when we truncate this revlog. We already use changegroupsubset to create a temporary changegroup containing the revisions that have to be restored, but that function is unable to detect that we also wanted to save the r2 in the case above. So we manually calculate these extra nodes and pass it to changegroupsubset. This should fix issue764.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 19 Jan 2008 18:01:16 -0200
parents
children d67cfe0d4714
comparison
equal deleted inserted replaced
5908:afa1e6122be7 5909:f45f7390c1c5
1 crossed/.hg/store/00manifest.i
2 rev offset length base linkrev nodeid p1 p2
3 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
4 1 112 123 0 1 8f3d04e263e5 000000000000 000000000000
5 2 235 122 0 2 f0ef8726ac4f 000000000000 000000000000
6
7 crossed/.hg/store/data/012.i
8 rev offset length base linkrev nodeid p1 p2
9 0 0 3 0 0 b8e02f643373 000000000000 000000000000
10 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
11 2 6 3 2 2 2661d26c6496 000000000000 000000000000
12
13 crossed/.hg/store/data/021.i
14 rev offset length base linkrev nodeid p1 p2
15 0 0 3 0 0 b8e02f643373 000000000000 000000000000
16 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
17 2 6 3 2 1 2661d26c6496 000000000000 000000000000
18
19 crossed/.hg/store/data/102.i
20 rev offset length base linkrev nodeid p1 p2
21 0 0 3 0 1 b8e02f643373 000000000000 000000000000
22 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
23 2 6 3 2 2 2661d26c6496 000000000000 000000000000
24
25 crossed/.hg/store/data/120.i
26 rev offset length base linkrev nodeid p1 p2
27 0 0 3 0 1 b8e02f643373 000000000000 000000000000
28 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
29 2 6 3 2 0 2661d26c6496 000000000000 000000000000
30
31 crossed/.hg/store/data/201.i
32 rev offset length base linkrev nodeid p1 p2
33 0 0 3 0 2 b8e02f643373 000000000000 000000000000
34 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
35 2 6 3 2 1 2661d26c6496 000000000000 000000000000
36
37 crossed/.hg/store/data/210.i
38 rev offset length base linkrev nodeid p1 p2
39 0 0 3 0 2 b8e02f643373 000000000000 000000000000
40 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
41 2 6 3 2 0 2661d26c6496 000000000000 000000000000
42
43 % Trying to strip revision 0
44 saving bundle to strip-backup/cbb8c2f0a2e3-backup
45 saving bundle to strip-backup/cbb8c2f0a2e3-temp
46 adding branch
47 adding changesets
48 adding manifests
49 adding file changes
50 added 2 changesets with 12 changes to 6 files (+1 heads)
51 % Verifying
52 checking changesets
53 checking manifests
54 crosschecking files in changesets and manifests
55 checking files
56 6 files, 2 changesets, 12 total revisions
57
58 % Trying to strip revision 1
59 saving bundle to strip-backup/124ecc0cbec9-backup
60 saving bundle to strip-backup/124ecc0cbec9-temp
61 adding branch
62 adding changesets
63 adding manifests
64 adding file changes
65 added 1 changesets with 10 changes to 6 files (+1 heads)
66 % Verifying
67 checking changesets
68 checking manifests
69 crosschecking files in changesets and manifests
70 checking files
71 6 files, 2 changesets, 12 total revisions
72
73 % Trying to strip revision 2
74 saving bundle to strip-backup/f6439b304a1a-backup
75 saving bundle to strip-backup/f6439b304a1a-temp
76 adding branch
77 adding changesets
78 adding manifests
79 adding file changes
80 added 0 changesets with 6 changes to 4 files
81 % Verifying
82 checking changesets
83 checking manifests
84 crosschecking files in changesets and manifests
85 checking files
86 6 files, 2 changesets, 12 total revisions
87