diff mercurial/revlog.py @ 2222:c9e264b115e6

Use revlogng and inlined data files by default This changes revlog specify revlogng by default. Inlined data files are also used unless a flags option is found in the .hgrc. Some example hgrc files: [revlog] # use the original revlog format format=0 [revlog] # use revlogng. Because no flags are included, inlined data files # also be selected format=1 [revlog] # use revlogng but do not inline the data files with the index flags= [revlog] # the new default format=1 flags=inline
author mason@suse.com
date Mon, 08 May 2006 14:26:18 -0500
parents 6886bc0b77af
children 45aef5ddcdbe
line wrap: on
line diff
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -22,6 +22,10 @@ REVLOGNG = 1
 
 # revlog flags
 REVLOGNGINLINEDATA = (1 << 16)
+REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA
+
+REVLOG_DEFAULT_FORMAT = REVLOGNG
+REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS
 
 def flagstr(flag):
     if flag == "inline":
@@ -293,7 +297,8 @@ class revlog(object):
     remove data, and can use some simple techniques to avoid the need
     for locking while reading.
     """
-    def __init__(self, opener, indexfile, datafile, defversion=REVLOGV0):
+    def __init__(self, opener, indexfile, datafile,
+                 defversion=REVLOG_DEFAULT_VERSION):
         """
         create a revlog object