changeset 24913:e3a928bd1cd4

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.
author Drew Gottlieb <drgott@google.com>
date Tue, 21 Apr 2015 16:55:30 -0700
parents e285b98c65cc
children cb144bfc61ea
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)