mercurial/store.py
changeset 17724 bf4b72d8dd4d
parent 17722 3b976051034d
child 17725 ffd589d4b785
equal deleted inserted replaced
17723:ab23768746fd 17724:bf4b72d8dd4d
   289          ' phaseroots obsstore')
   289          ' phaseroots obsstore')
   290 
   290 
   291 class basicstore(object):
   291 class basicstore(object):
   292     '''base class for local repository stores'''
   292     '''base class for local repository stores'''
   293     def __init__(self, path, vfstype):
   293     def __init__(self, path, vfstype):
   294         self.path = path
   294         vfs = vfstype(path)
       
   295         self.path = vfs.base
   295         self.createmode = _calcmode(path)
   296         self.createmode = _calcmode(path)
   296         vfs = vfstype(self.path)
       
   297         vfs.createmode = self.createmode
   297         vfs.createmode = self.createmode
   298         self.vfs = scmutil.filtervfs(vfs, encodedir)
   298         self.vfs = scmutil.filtervfs(vfs, encodedir)
   299         self.opener = self.vfs
   299         self.opener = self.vfs
   300 
   300 
   301     def join(self, f):
   301     def join(self, f):
   340     def write(self):
   340     def write(self):
   341         pass
   341         pass
   342 
   342 
   343 class encodedstore(basicstore):
   343 class encodedstore(basicstore):
   344     def __init__(self, path, vfstype):
   344     def __init__(self, path, vfstype):
   345         self.path = path + '/store'
   345         vfs = vfstype(path + '/store')
       
   346         self.path = vfs.base
   346         self.createmode = _calcmode(self.path)
   347         self.createmode = _calcmode(self.path)
   347         vfs = vfstype(self.path)
       
   348         vfs.createmode = self.createmode
   348         vfs.createmode = self.createmode
   349         self.vfs = scmutil.filtervfs(vfs, encodefilename)
   349         self.vfs = scmutil.filtervfs(vfs, encodefilename)
   350         self.opener = self.vfs
   350         self.opener = self.vfs
   351 
   351 
   352     def datafiles(self):
   352     def datafiles(self):
   446         if dotencode:
   446         if dotencode:
   447             encode = _dothybridencode
   447             encode = _dothybridencode
   448         else:
   448         else:
   449             encode = _plainhybridencode
   449             encode = _plainhybridencode
   450         self.encode = encode
   450         self.encode = encode
   451         self.path = path + '/store'
   451         vfs = vfstype(path + '/store')
       
   452         self.path = vfs.base
   452         self.pathsep = self.path + '/'
   453         self.pathsep = self.path + '/'
   453         self.createmode = _calcmode(self.path)
   454         self.createmode = _calcmode(self.path)
   454         vfs = vfstype(self.path)
       
   455         vfs.createmode = self.createmode
   455         vfs.createmode = self.createmode
   456         fnc = fncache(vfs)
   456         fnc = fncache(vfs)
   457         self.fncache = fnc
   457         self.fncache = fnc
   458         self.vfs = _fncachevfs(vfs, fnc, encode)
   458         self.vfs = _fncachevfs(vfs, fnc, encode)
   459         self.opener = self.vfs
   459         self.opener = self.vfs