Fix truncate logic for indices again
authormpm@selenic.com
Sat, 07 May 2005 16:33:31 -0800
changeset 41 df3f46253878
parent 40 5f87633e1ea2
child 42 91f1fa847158
Fix truncate logic for indices again
mercurial/revlog.py
--- a/mercurial/revlog.py	Sat May 07 16:33:09 2005 -0800
+++ b/mercurial/revlog.py	Sat May 07 16:33:31 2005 -0800
@@ -163,7 +163,7 @@
 
         transaction.add(self.datafile, e[0])
         self.opener(self.datafile, "a").write(data)
-        transaction.add(self.indexfile, (n + 1) * len(entry))
+        transaction.add(self.indexfile, n * len(entry))
         self.opener(self.indexfile, "a").write(entry)
 
         self.cache = (node, n, text)