[PATCH 03 of 12] Pass revlog parent along in changelog, filelog and manifest constructors

Brendan Cully brendan at kublai.com
Tue Jan 2 15:42:15 CST 2007


# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1167777082 18000
# Node ID a14b0ecaf1c2ba105cdc96511e66de66fc9852fa
# Parent  b0145149b0692405f9aff4181c33ae9dc56188a1
Pass revlog parent along in changelog, filelog and manifest constructors

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -27,9 +27,9 @@ def _string_unescape(text):
     return text.decode('string_escape')
 
 class changelog(revlog):
-    def __init__(self, opener, defversion=REVLOGV0):
+    def __init__(self, opener, defversion=REVLOGV0, parent=None):
         revlog.__init__(self, opener, "00changelog.i", "00changelog.d",
-                        defversion)
+                        defversion, parent)
 
     def decode_extra(self, text):
         extra = {}
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -9,11 +9,12 @@ import os
 import os
 
 class filelog(revlog):
-    def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
+    def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION,
+                 parent = None):
         revlog.__init__(self, opener,
                         "/".join(("data", self.encodedir(path + ".i"))),
                         "/".join(("data", self.encodedir(path + ".d"))),
-                        defversion)
+                        defversion, parent=parent)
 
     # This avoids a collision between a file named foo and a dir named
     # foo.i or foo.d
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -35,11 +35,11 @@ class manifestdict(dict):
         return manifestdict(dict.copy(self), dict.copy(self._flags))
 
 class manifest(revlog):
-    def __init__(self, opener, defversion=REVLOGV0):
+    def __init__(self, opener, defversion=REVLOGV0, parent=None):
         self.mapcache = None
         self.listcache = None
         revlog.__init__(self, opener, "00manifest.i", "00manifest.d",
-                        defversion)
+                        defversion, parent=parent)
 
     def parselines(self, lines):
         for l in lines.splitlines(1):


More information about the Mercurial-devel mailing list