##// END OF EJS Templates
store: rename the 'opener' argument to 'openertype'...
Dan Villiom Podlaski Christiansen -
r14092:222c8ec7 default
parent child Browse files
Show More
@@ -236,10 +236,10 b' def _calcmode(path):'
236
236
237 class basicstore(object):
237 class basicstore(object):
238 '''base class for local repository stores'''
238 '''base class for local repository stores'''
239 def __init__(self, path, opener):
239 def __init__(self, path, openertype):
240 self.path = path
240 self.path = path
241 self.createmode = _calcmode(path)
241 self.createmode = _calcmode(path)
242 op = opener(self.path)
242 op = openertype(self.path)
243 op.createmode = self.createmode
243 op.createmode = self.createmode
244 self.opener = scmutil.filteropener(op, encodedir)
244 self.opener = scmutil.filteropener(op, encodedir)
245
245
@@ -285,10 +285,10 b' class basicstore(object):'
285 pass
285 pass
286
286
287 class encodedstore(basicstore):
287 class encodedstore(basicstore):
288 def __init__(self, path, opener):
288 def __init__(self, path, openertype):
289 self.path = path + '/store'
289 self.path = path + '/store'
290 self.createmode = _calcmode(self.path)
290 self.createmode = _calcmode(self.path)
291 op = opener(self.path)
291 op = openertype(self.path)
292 op.createmode = self.createmode
292 op.createmode = self.createmode
293 self.opener = scmutil.filteropener(op, encodefilename)
293 self.opener = scmutil.filteropener(op, encodefilename)
294
294
@@ -366,11 +366,11 b' class fncache(object):'
366 return iter(self.entries)
366 return iter(self.entries)
367
367
368 class fncachestore(basicstore):
368 class fncachestore(basicstore):
369 def __init__(self, path, opener, encode):
369 def __init__(self, path, openertype, encode):
370 self.encode = encode
370 self.encode = encode
371 self.path = path + '/store'
371 self.path = path + '/store'
372 self.createmode = _calcmode(self.path)
372 self.createmode = _calcmode(self.path)
373 op = opener(self.path)
373 op = openertype(self.path)
374 op.createmode = self.createmode
374 op.createmode = self.createmode
375 fnc = fncache(op)
375 fnc = fncache(op)
376 self.fncache = fnc
376 self.fncache = fnc
@@ -411,11 +411,11 b' class fncachestore(basicstore):'
411 def write(self):
411 def write(self):
412 self.fncache.write()
412 self.fncache.write()
413
413
414 def store(requirements, path, opener):
414 def store(requirements, path, openertype):
415 if 'store' in requirements:
415 if 'store' in requirements:
416 if 'fncache' in requirements:
416 if 'fncache' in requirements:
417 auxencode = lambda f: _auxencode(f, 'dotencode' in requirements)
417 auxencode = lambda f: _auxencode(f, 'dotencode' in requirements)
418 encode = lambda f: _hybridencode(f, auxencode)
418 encode = lambda f: _hybridencode(f, auxencode)
419 return fncachestore(path, opener, encode)
419 return fncachestore(path, openertype, encode)
420 return encodedstore(path, opener)
420 return encodedstore(path, openertype)
421 return basicstore(path, opener)
421 return basicstore(path, openertype)
General Comments 0
You need to be logged in to leave comments. Login now