Mercurial > hg
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-strip-cross.out Sat Jan 19 18:01:16 2008 -0200 @@ -0,0 +1,87 @@ +crossed/.hg/store/00manifest.i + rev offset length base linkrev nodeid p1 p2 + 0 0 112 0 0 6f105cbb914d 000000000000 000000000000 + 1 112 123 0 1 8f3d04e263e5 000000000000 000000000000 + 2 235 122 0 2 f0ef8726ac4f 000000000000 000000000000 + +crossed/.hg/store/data/012.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 0 b8e02f643373 000000000000 000000000000 + 1 3 3 1 1 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 2 2661d26c6496 000000000000 000000000000 + +crossed/.hg/store/data/021.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 0 b8e02f643373 000000000000 000000000000 + 1 3 3 1 2 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 1 2661d26c6496 000000000000 000000000000 + +crossed/.hg/store/data/102.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 1 b8e02f643373 000000000000 000000000000 + 1 3 3 1 0 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 2 2661d26c6496 000000000000 000000000000 + +crossed/.hg/store/data/120.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 1 b8e02f643373 000000000000 000000000000 + 1 3 3 1 2 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 0 2661d26c6496 000000000000 000000000000 + +crossed/.hg/store/data/201.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 2 b8e02f643373 000000000000 000000000000 + 1 3 3 1 0 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 1 2661d26c6496 000000000000 000000000000 + +crossed/.hg/store/data/210.i + rev offset length base linkrev nodeid p1 p2 + 0 0 3 0 2 b8e02f643373 000000000000 000000000000 + 1 3 3 1 1 5d9299349fc0 000000000000 000000000000 + 2 6 3 2 0 2661d26c6496 000000000000 000000000000 + +% Trying to strip revision 0 +saving bundle to strip-backup/cbb8c2f0a2e3-backup +saving bundle to strip-backup/cbb8c2f0a2e3-temp +adding branch +adding changesets +adding manifests +adding file changes +added 2 changesets with 12 changes to 6 files (+1 heads) +% Verifying +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +6 files, 2 changesets, 12 total revisions + +% Trying to strip revision 1 +saving bundle to strip-backup/124ecc0cbec9-backup +saving bundle to strip-backup/124ecc0cbec9-temp +adding branch +adding changesets +adding manifests +adding file changes +added 1 changesets with 10 changes to 6 files (+1 heads) +% Verifying +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +6 files, 2 changesets, 12 total revisions + +% Trying to strip revision 2 +saving bundle to strip-backup/f6439b304a1a-backup +saving bundle to strip-backup/f6439b304a1a-temp +adding branch +adding changesets +adding manifests +adding file changes +added 0 changesets with 6 changes to 4 files +% Verifying +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +6 files, 2 changesets, 12 total revisions +