190 def changegroupsubset(self, bases, heads, source): |
190 def changegroupsubset(self, bases, heads, source): |
191 return changegroup.changegroupsubset(self._repo, bases, heads, source) |
191 return changegroup.changegroupsubset(self._repo, bases, heads, source) |
192 |
192 |
193 class localrepository(object): |
193 class localrepository(object): |
194 |
194 |
195 supportedformats = set(('revlogv1', 'generaldelta', 'manifestv2')) |
195 supportedformats = set(('revlogv1', 'generaldelta', 'treemanifest', |
|
196 'manifestv2')) |
196 _basesupported = supportedformats | set(('store', 'fncache', 'shared', |
197 _basesupported = supportedformats | set(('store', 'fncache', 'shared', |
197 'dotencode')) |
198 'dotencode')) |
198 openerreqs = set(('revlogv1', 'generaldelta', 'manifestv2')) |
199 openerreqs = set(('revlogv1', 'generaldelta', 'treemanifest', 'manifestv2')) |
199 filtername = None |
200 filtername = None |
200 |
201 |
201 # a list of (ui, featureset) functions. |
202 # a list of (ui, featureset) functions. |
202 # only functions defined in module of enabled extensions are invoked |
203 # only functions defined in module of enabled extensions are invoked |
203 featuresetupfuncs = set() |
204 featuresetupfuncs = set() |
257 '\0\0\0\2' # represents revlogv2 |
258 '\0\0\0\2' # represents revlogv2 |
258 ' dummy changelog to prevent using the old repo layout' |
259 ' dummy changelog to prevent using the old repo layout' |
259 ) |
260 ) |
260 if self.ui.configbool('format', 'generaldelta', False): |
261 if self.ui.configbool('format', 'generaldelta', False): |
261 self.requirements.add("generaldelta") |
262 self.requirements.add("generaldelta") |
|
263 if self.ui.configbool('experimental', 'treemanifest', False): |
|
264 self.requirements.add("treemanifest") |
262 if self.ui.configbool('experimental', 'manifestv2', False): |
265 if self.ui.configbool('experimental', 'manifestv2', False): |
263 self.requirements.add("manifestv2") |
266 self.requirements.add("manifestv2") |
264 else: |
267 else: |
265 raise error.RepoError(_("repository %s not found") % path) |
268 raise error.RepoError(_("repository %s not found") % path) |
266 elif create: |
269 elif create: |
346 if maxchainlen is not None: |
349 if maxchainlen is not None: |
347 self.svfs.options['maxchainlen'] = maxchainlen |
350 self.svfs.options['maxchainlen'] = maxchainlen |
348 manifestcachesize = self.ui.configint('format', 'manifestcachesize') |
351 manifestcachesize = self.ui.configint('format', 'manifestcachesize') |
349 if manifestcachesize is not None: |
352 if manifestcachesize is not None: |
350 self.svfs.options['manifestcachesize'] = manifestcachesize |
353 self.svfs.options['manifestcachesize'] = manifestcachesize |
351 usetreemanifest = self.ui.configbool('experimental', 'treemanifest') |
|
352 if usetreemanifest is not None: |
|
353 self.svfs.options['usetreemanifest'] = usetreemanifest |
|
354 |
354 |
355 def _writerequirements(self): |
355 def _writerequirements(self): |
356 scmutil.writerequires(self.vfs, self.requirements) |
356 scmutil.writerequires(self.vfs, self.requirements) |
357 |
357 |
358 def _checknested(self, path): |
358 def _checknested(self, path): |