diff mercurial/revlog.py @ 4267:b11a2fb59cf5

revlog: simplify revlog version handling - pass the default version as an attribute on the opener - eliminate config option mess
author Matt Mackall <mpm@selenic.com>
date Thu, 22 Mar 2007 19:52:38 -0500
parents 1b5c38e9d7aa
children 0ce23256e454
line wrap: on
line diff
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -311,7 +311,7 @@ class revlog(object):
     remove data, and can use some simple techniques to avoid the need
     for locking while reading.
     """
-    def __init__(self, opener, indexfile, defversion=REVLOG_DEFAULT_VERSION):
+    def __init__(self, opener, indexfile):
         """
         create a revlog object
 
@@ -325,7 +325,9 @@ class revlog(object):
         self.indexstat = None
         self.cache = None
         self.chunkcache = None
-        self.defversion = defversion
+        self.defversion=REVLOG_DEFAULT_VERSION
+        if hasattr(opener, "defversion"):
+            self.defversion = opener.defversion
         self.load()
 
     def load(self):