mercurial/manifest.py
changeset 2072 74d3f5336b66
parent 1651 cf40d2a30fef
child 2142 8a1e2a9c7013
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]