Fixups for recent changes in revlog version handling
authorMatt Mackall <mpm@selenic.com>
Mon, 02 Apr 2007 14:16:44 -0500
changeset 4302 d69bdc1091b8
parent 4301 f344440fdcb0
child 4303 09c5f734ff6a
child 4309 d4f0405fadac
Fixups for recent changes in revlog version handling
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue Mar 27 01:41:25 2007 -0300
+++ b/mercurial/revlog.py	Mon Apr 02 14:16:44 2007 -0500
@@ -26,11 +26,6 @@
 REVLOG_DEFAULT_FORMAT = REVLOGNG
 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS
 
-def flagstr(flag):
-    if flag == "inline":
-        return REVLOGNGINLINEDATA
-    raise RevlogError(_("unknown revlog flag %s") % flag)
-
 def hash(text, p1, p2):
     """generate a hash from the given text and its parent hashes
 
@@ -328,6 +323,8 @@
         self.defversion = REVLOG_DEFAULT_VERSION
         if hasattr(opener, "defversion"):
             self.defversion = opener.defversion
+            if self.defversion & REVLOGNG:
+                self.defversion |= REVLOGNGINLINEDATA
         self.load()
 
     def load(self):