##// END OF EJS Templates
localrepo: make requirements and openerreqs mutable by subclasses...
Bryan O'Sullivan -
r17137:b090601a default
parent child Browse files
Show More
@@ -29,6 +29,11 b' class localrepository(repo.repository):'
29 29 supportedformats = set(('revlogv1', 'generaldelta'))
30 30 supported = supportedformats | set(('store', 'fncache', 'shared',
31 31 'dotencode'))
32 openerreqs = set(('revlogv1', 'generaldelta'))
33 requirements = ['revlogv1']
34
35 def _baserequirements(self, create):
36 return self.requirements[:]
32 37
33 38 def __init__(self, baseui, path=None, create=False):
34 39 repo.repository.__init__(self)
@@ -56,7 +61,7 b' class localrepository(repo.repository):'
56 61 if not os.path.exists(path):
57 62 util.makedirs(path)
58 63 util.makedir(self.path, notindexed=True)
59 requirements = ["revlogv1"]
64 requirements = self._baserequirements(create)
60 65 if self.ui.configbool('format', 'usestore', True):
61 66 os.mkdir(os.path.join(self.path, "store"))
62 67 requirements.append("store")
@@ -120,9 +125,8 b' class localrepository(repo.repository):'
120 125
121 126 def _applyrequirements(self, requirements):
122 127 self.requirements = requirements
123 openerreqs = set(('revlogv1', 'generaldelta'))
124 128 self.sopener.options = dict((r, 1) for r in requirements
125 if r in openerreqs)
129 if r in self.openerreqs)
126 130
127 131 def _writerequirements(self):
128 132 reqfile = self.opener("requires", "w")
General Comments 0
You need to be logged in to leave comments. Login now