Show More
@@ -11,7 +11,7 b' from demandload import *' | |||
|
11 | 11 | demandload(globals(), "bdiff") |
|
12 | 12 | |
|
13 | 13 | class filelog(revlog): |
|
14 |
def __init__(self, opener, path, defversion= |
|
|
14 | def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION): | |
|
15 | 15 | revlog.__init__(self, opener, |
|
16 | 16 | os.path.join("data", self.encodedir(path + ".i")), |
|
17 | 17 | os.path.join("data", self.encodedir(path + ".d")), |
@@ -43,11 +43,15 b' class localrepository(object):' | |||
|
43 | 43 | pass |
|
44 | 44 | |
|
45 | 45 | v = self.ui.revlogopts |
|
46 |
self.revlogversion = int(v.get('format', revlog.REVLOG |
|
|
46 | self.revlogversion = int(v.get('format', revlog.REVLOG_DEFAULT_FORMAT)) | |
|
47 | 47 | self.revlogv1 = self.revlogversion != revlog.REVLOGV0 |
|
48 | fl = v.get('flags', None) | |
|
48 | 49 | flags = 0 |
|
49 | for x in v.get('flags', "").split(): | |
|
50 | if fl != None: | |
|
51 | for x in fl.split(): | |
|
50 | 52 | flags |= revlog.flagstr(x) |
|
53 | elif self.revlogv1: | |
|
54 | flags = revlog.REVLOG_DEFAULT_FLAGS | |
|
51 | 55 | |
|
52 | 56 | v = self.revlogversion | flags |
|
53 | 57 | self.manifest = manifest.manifest(self.opener, v) |
@@ -22,6 +22,10 b' REVLOGNG = 1' | |||
|
22 | 22 | |
|
23 | 23 | # revlog flags |
|
24 | 24 | REVLOGNGINLINEDATA = (1 << 16) |
|
25 | REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA | |
|
26 | ||
|
27 | REVLOG_DEFAULT_FORMAT = REVLOGNG | |
|
28 | REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS | |
|
25 | 29 | |
|
26 | 30 | def flagstr(flag): |
|
27 | 31 | if flag == "inline": |
@@ -293,7 +297,8 b' class revlog(object):' | |||
|
293 | 297 | remove data, and can use some simple techniques to avoid the need |
|
294 | 298 | for locking while reading. |
|
295 | 299 | """ |
|
296 |
def __init__(self, opener, indexfile, datafile, |
|
|
300 | def __init__(self, opener, indexfile, datafile, | |
|
301 | defversion=REVLOG_DEFAULT_VERSION): | |
|
297 | 302 | """ |
|
298 | 303 | create a revlog object |
|
299 | 304 |
General Comments 0
You need to be logged in to leave comments.
Login now