# HG changeset patch # User FUJIWARA Katsunori # Date 1349714515 -32400 # Node ID 3b976051034d06fac82c9f2f62187c694394e3c0 # Parent cf236e3501c335b7cd9a3cae8f7f1167738d2ee4 store: rename field name from "opener" to "vfs" in internal classes for fncache These fields are used only in store module, so keeping "self.opener" for backward compatibility like as "localrepository" class is not needed. diff -r cf236e3501c3 -r 3b976051034d mercurial/store.py --- a/mercurial/store.py Tue Oct 09 01:41:55 2012 +0900 +++ b/mercurial/store.py Tue Oct 09 01:41:55 2012 +0900 @@ -367,8 +367,8 @@ class fncache(object): # the filename used to be partially encoded # hence the encodedir/decodedir dance - def __init__(self, opener): - self.opener = opener + def __init__(self, vfs): + self.vfs = vfs self.entries = None self._dirty = False @@ -376,7 +376,7 @@ '''fill the entries from the fncache file''' self._dirty = False try: - fp = self.opener('fncache', mode='rb') + fp = self.vfs('fncache', mode='rb') except IOError: # skip nonexistent file self.entries = set() @@ -391,7 +391,7 @@ fp.close() def _write(self, files, atomictemp): - fp = self.opener('fncache', mode='wb', atomictemp=atomictemp) + fp = self.vfs('fncache', mode='wb', atomictemp=atomictemp) if files: fp.write(encodedir('\n'.join(files) + '\n')) fp.close() @@ -424,22 +424,22 @@ class _fncachevfs(scmutil.abstractvfs): def __init__(self, vfs, fnc, encode): - self.opener = vfs + self.vfs = vfs self.fncache = fnc self.encode = encode def _getmustaudit(self): - return self.opener.mustaudit + return self.vfs.mustaudit def _setmustaudit(self, onoff): - self.opener.mustaudit = onoff + self.vfs.mustaudit = onoff mustaudit = property(_getmustaudit, _setmustaudit) def __call__(self, path, mode='r', *args, **kw): if mode not in ('r', 'rb') and path.startswith('data/'): self.fncache.add(path) - return self.opener(self.encode(path), mode, *args, **kw) + return self.vfs(self.encode(path), mode, *args, **kw) class fncachestore(basicstore): def __init__(self, path, vfstype, dotencode):