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 4306 d4f0405fadac
child 4309 09c5f734ff6a
Fixups for recent changes in revlog version handling
mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -26,11 +26,6 @@ REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDAT
 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 @@ class revlog(object):
         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):