localrepo: eliminate requirements class variable (API)
Localrepo's requirements class variable was introduced in
b090601a80d1 to make
requirements modifiable by extensions. A main access point, _baserequirements,
still exists, but this change undoes making the class variable to begin with.
Without this simplification, there is a class variable with a default value
that is only copied, but never directly used. This behavior is moved directly
into the _baserequirements function.
--- a/mercurial/localrepo.py Wed Apr 29 10:30:58 2015 -0700
+++ b/mercurial/localrepo.py Tue Apr 21 16:55:30 2015 -0700
@@ -196,7 +196,6 @@
_basesupported = supportedformats | set(('store', 'fncache', 'shared',
'dotencode'))
openerreqs = set(('revlogv1', 'generaldelta', 'manifestv2'))
- requirements = ['revlogv1']
filtername = None
# a list of (ui, featureset) functions.
@@ -204,7 +203,7 @@
featuresetupfuncs = set()
def _baserequirements(self, create):
- return self.requirements[:]
+ return ['revlogv1']
def __init__(self, baseui, path=None, create=False):
self.wvfs = scmutil.vfs(path, expandpath=True, realpath=True)