comparison mercurial/manifest.py @ 2072:74d3f5336b66

Implement revlogng. revlogng results in smaller indexes, can address larger data files, and supports flags and version numbers. By default the original revlog format is used. To use the new format, use the following .hgrc field: [revlog] # format choices are 0 (classic revlog format) and 1 revlogng format=1
author mason@suse.com
date Tue, 04 Apr 2006 16:38:43 -0400
parents cf40d2a30fef
children 8a1e2a9c7013
comparison
equal deleted inserted replaced
2042:a514c7509fa9 2072:74d3f5336b66
10 from i18n import gettext as _ 10 from i18n import gettext as _
11 from demandload import * 11 from demandload import *
12 demandload(globals(), "bisect array") 12 demandload(globals(), "bisect array")
13 13
14 class manifest(revlog): 14 class manifest(revlog):
15 def __init__(self, opener): 15 def __init__(self, opener, defversion=0):
16 self.mapcache = None 16 self.mapcache = None
17 self.listcache = None 17 self.listcache = None
18 revlog.__init__(self, opener, "00manifest.i", "00manifest.d") 18 revlog.__init__(self, opener, "00manifest.i", "00manifest.d",
19 defversion)
19 20
20 def read(self, node): 21 def read(self, node):
21 if node == nullid: return {} # don't upset local cache 22 if node == nullid: return {} # don't upset local cache
22 if self.mapcache and self.mapcache[0] == node: 23 if self.mapcache and self.mapcache[0] == node:
23 return self.mapcache[1] 24 return self.mapcache[1]