store: rename the 'opener' argument to 'openertype'
The 'opener' argument wasn't, in fact, an actual opener instance, but
rather something expected to return an opener. The normal argument,
from localrepository, is the scmutil.opener type; hence 'openertype'.
--- a/mercurial/store.py Sat Apr 30 19:41:25 2011 +0200
+++ b/mercurial/store.py Sat Apr 30 19:36:48 2011 +0200
@@ -236,10 +236,10 @@
class basicstore(object):
'''base class for local repository stores'''
- def __init__(self, path, opener):
+ def __init__(self, path, openertype):
self.path = path
self.createmode = _calcmode(path)
- op = opener(self.path)
+ op = openertype(self.path)
op.createmode = self.createmode
self.opener = scmutil.filteropener(op, encodedir)
@@ -285,10 +285,10 @@
pass
class encodedstore(basicstore):
- def __init__(self, path, opener):
+ def __init__(self, path, openertype):
self.path = path + '/store'
self.createmode = _calcmode(self.path)
- op = opener(self.path)
+ op = openertype(self.path)
op.createmode = self.createmode
self.opener = scmutil.filteropener(op, encodefilename)
@@ -366,11 +366,11 @@
return iter(self.entries)
class fncachestore(basicstore):
- def __init__(self, path, opener, encode):
+ def __init__(self, path, openertype, encode):
self.encode = encode
self.path = path + '/store'
self.createmode = _calcmode(self.path)
- op = opener(self.path)
+ op = openertype(self.path)
op.createmode = self.createmode
fnc = fncache(op)
self.fncache = fnc
@@ -411,11 +411,11 @@
def write(self):
self.fncache.write()
-def store(requirements, path, opener):
+def store(requirements, path, openertype):
if 'store' in requirements:
if 'fncache' in requirements:
auxencode = lambda f: _auxencode(f, 'dotencode' in requirements)
encode = lambda f: _hybridencode(f, auxencode)
- return fncachestore(path, opener, encode)
- return encodedstore(path, opener)
- return basicstore(path, opener)
+ return fncachestore(path, openertype, encode)
+ return encodedstore(path, openertype)
+ return basicstore(path, openertype)