comparison mercurial/localrepo.py @ 32730:b8ff7d0ff361

localrepo: move filtername to __init__ This is obviously an instance attribute, not a type attribute. The modern Python style is to use __init__ for defining these. This exposes statichttprepo as inheriting from localrepository without calling its __init__. As a result, its __init__ defines a lot of variables that methods on localrepository's methods need. But factoring the common bits into a separate class is for another day.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 08 Jun 2017 23:23:37 -0700
parents c8177792fef6
children 2083d1643d69
comparison
equal deleted inserted replaced
32729:c8177792fef6 32730:b8ff7d0ff361
268 'revlogv1', 268 'revlogv1',
269 'generaldelta', 269 'generaldelta',
270 'treemanifest', 270 'treemanifest',
271 'manifestv2', 271 'manifestv2',
272 } 272 }
273 filtername = None
274 273
275 # a list of (ui, featureset) functions. 274 # a list of (ui, featureset) functions.
276 # only functions defined in module of enabled extensions are invoked 275 # only functions defined in module of enabled extensions are invoked
277 featuresetupfuncs = set() 276 featuresetupfuncs = set()
278 277
279 def __init__(self, baseui, path, create=False): 278 def __init__(self, baseui, path, create=False):
280 self.requirements = set() 279 self.requirements = set()
280 self.filtername = None
281 # wvfs: rooted at the repository root, used to access the working copy 281 # wvfs: rooted at the repository root, used to access the working copy
282 self.wvfs = vfsmod.vfs(path, expandpath=True, realpath=True) 282 self.wvfs = vfsmod.vfs(path, expandpath=True, realpath=True)
283 # vfs: rooted at .hg, used to access repo files outside of .hg/store 283 # vfs: rooted at .hg, used to access repo files outside of .hg/store
284 self.vfs = None 284 self.vfs = None
285 # svfs: usually rooted at .hg/store, used to access repository history 285 # svfs: usually rooted at .hg/store, used to access repository history