Make bundlerepo use proper index format for revlogng
authorChris Mason <mason@suse.com>
Thu, 20 Apr 2006 13:08:16 -0400
changeset 2101 c6c019fd5db1
parent 2098 190c6a81e6ad
child 2105 21cf3fe64e27
Make bundlerepo use proper index format for revlogng bundlerepo just appends index entries from the bundle onto the index for the current repo. This patch makes sure it appends the correct format.
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Wed Apr 19 15:35:10 2006 -0400
+++ b/mercurial/bundlerepo.py	Thu Apr 20 13:08:16 2006 -0400
@@ -59,7 +59,11 @@
             if not prev:
                 prev = p1
             # start, size, base is not used, link, p1, p2, delta ref
-            e = (start, size, None, link, p1, p2, node)
+            if self.version == 0:
+                e = (start, size, None, link, p1, p2, node)
+            else:
+                e = (self.offset_type(start, 0), size, -1, None, link,
+                     self.rev(p1), self.rev(p2), node)
             self.basemap[n] = prev
             self.index.append(e)
             self.nodemap[node] = n