changeset 17138:528cb91a90ee

Merge
author Bryan O'Sullivan <bryano@fb.com>
date Wed, 11 Jul 2012 15:39:00 -0700
parents 06733dfe1a43 (current diff) b090601a80d1 (diff)
children ad1b5e070f16
files
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jul 11 15:34:32 2012 -0700
+++ b/mercurial/localrepo.py	Wed Jul 11 15:39:00 2012 -0700
@@ -29,6 +29,11 @@
     supportedformats = set(('revlogv1', 'generaldelta'))
     supported = supportedformats | set(('store', 'fncache', 'shared',
                                         'dotencode'))
+    openerreqs = set(('revlogv1', 'generaldelta'))
+    requirements = ['revlogv1']
+
+    def _baserequirements(self, create):
+        return self.requirements[:]
 
     def __init__(self, baseui, path=None, create=False):
         repo.repository.__init__(self)
@@ -56,7 +61,7 @@
                 if not os.path.exists(path):
                     util.makedirs(path)
                 util.makedir(self.path, notindexed=True)
-                requirements = ["revlogv1"]
+                requirements = self._baserequirements(create)
                 if self.ui.configbool('format', 'usestore', True):
                     os.mkdir(os.path.join(self.path, "store"))
                     requirements.append("store")
@@ -120,9 +125,8 @@
 
     def _applyrequirements(self, requirements):
         self.requirements = requirements
-        openerreqs = set(('revlogv1', 'generaldelta'))
         self.sopener.options = dict((r, 1) for r in requirements
-                                           if r in openerreqs)
+                                           if r in self.openerreqs)
 
     def _writerequirements(self):
         reqfile = self.opener("requires", "w")