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