diff mercurial/revlog.py @ 5910:b9a830fa10f6

simplify revlog.strip interface and callers; add docstring Also, strip files only after the changelog and the manifest.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 19 Jan 2008 18:01:16 -0200
parents f45f7390c1c5
children 08e0825b8106
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat Jan 19 18:01:16 2008 -0200
+++ b/mercurial/revlog.py	Sat Jan 19 18:01:16 2008 -0200
@@ -1237,7 +1237,20 @@
 
         return node
 
-    def strip(self, rev, minlink):
+    def strip(self, minlink):
+        """truncate the revlog on the first revision with a linkrev >= minlink
+
+        This function is called when we're stripping revision minlink and
+        its descendants from the repository.
+
+        We have to remove all revisions with linkrev >= minlink, because
+        the equivalent changelog revisions will be renumbered after the
+        strip.
+
+        So we truncate the revlog on the first of these revisions, and
+        trust that the caller has saved the revisions that shouldn't be
+        removed and that it'll readd them after this truncation.
+        """
         if self.count() == 0:
             return