##// END OF EJS Templates
manifestv2: set requires at repo creation time...
Martin von Zweigbergk -
r24571:919f8ce0 default
parent child Browse files
Show More
@@ -0,0 +1,31 b''
1 Check that entry is added to .hg/requires
2
3 $ hg --config experimental.manifestv2=True init repo
4 $ cd repo
5 $ grep manifestv2 .hg/requires
6 manifestv2
7
8 Set up simple repo
9
10 $ echo a > file1
11 $ echo b > file2
12 $ echo c > file3
13 $ hg ci -Aqm 'initial'
14 $ echo d > file2
15 $ hg ci -m 'modify file2'
16
17 Check that 'hg verify', which uses manifest.readdelta(), works
18
19 $ hg verify
20 checking changesets
21 checking manifests
22 crosschecking files in changesets and manifests
23 checking files
24 3 files, 2 changesets, 4 total revisions
25
26 TODO: Check that manifest revlog is smaller than for v1
27
28 $ hg debugindex -m
29 rev offset length base linkrev nodeid p1 p2
30 0 0 106 0 0 f6279f9f8b31 000000000000 000000000000
31 1 106 59 0 1 cd20459b75e6 f6279f9f8b31 000000000000
@@ -174,10 +174,10 b' class locallegacypeer(localpeer):'
174 174
175 175 class localrepository(object):
176 176
177 supportedformats = set(('revlogv1', 'generaldelta'))
177 supportedformats = set(('revlogv1', 'generaldelta', 'manifestv2'))
178 178 _basesupported = supportedformats | set(('store', 'fncache', 'shared',
179 179 'dotencode'))
180 openerreqs = set(('revlogv1', 'generaldelta'))
180 openerreqs = set(('revlogv1', 'generaldelta', 'manifestv2'))
181 181 requirements = ['revlogv1']
182 182 filtername = None
183 183
@@ -241,6 +241,8 b' class localrepository(object):'
241 241 )
242 242 if self.ui.configbool('format', 'generaldelta', False):
243 243 requirements.append("generaldelta")
244 if self.ui.configbool('experimental', 'manifestv2', False):
245 requirements.append("manifestv2")
244 246 requirements = set(requirements)
245 247 else:
246 248 raise error.RepoError(_("repository %s not found") % path)
@@ -334,9 +336,6 b' class localrepository(object):'
334 336 usetreemanifest = self.ui.configbool('experimental', 'treemanifest')
335 337 if usetreemanifest is not None:
336 338 self.svfs.options['usetreemanifest'] = usetreemanifest
337 usemanifestv2 = self.ui.configbool('experimental', 'manifestv2')
338 if usemanifestv2 is not None:
339 self.svfs.options['usemanifestv2'] = usemanifestv2
340 339
341 340 def _writerequirements(self):
342 341 reqfile = self.vfs("requires", "w")
@@ -605,7 +605,7 b' class manifest(revlog.revlog):'
605 605 if opts is not None:
606 606 cachesize = opts.get('manifestcachesize', cachesize)
607 607 usetreemanifest = opts.get('usetreemanifest', usetreemanifest)
608 usemanifestv2 = opts.get('usemanifestv2', usemanifestv2)
608 usemanifestv2 = opts.get('manifestv2', usemanifestv2)
609 609 self._mancache = util.lrucachedict(cachesize)
610 610 revlog.revlog.__init__(self, opener, "00manifest.i")
611 611 self._usetreemanifest = usetreemanifest
General Comments 0
You need to be logged in to leave comments. Login now