Show More
@@ -21,7 +21,7 b' propertycache = util.propertycache' | |||||
21 |
|
21 | |||
22 | class localrepository(repo.repository): |
|
22 | class localrepository(repo.repository): | |
23 | capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey')) |
|
23 | capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey')) | |
24 | supported = set('revlogv1 store fncache shared'.split()) |
|
24 | supported = set('revlogv1 store fncache shared parentdelta'.split()) | |
25 |
|
25 | |||
26 | def __init__(self, baseui, path=None, create=0): |
|
26 | def __init__(self, baseui, path=None, create=0): | |
27 | repo.repository.__init__(self) |
|
27 | repo.repository.__init__(self) | |
@@ -55,6 +55,8 b' class localrepository(repo.repository):' | |||||
55 | '\0\0\0\2' # represents revlogv2 |
|
55 | '\0\0\0\2' # represents revlogv2 | |
56 | ' dummy changelog to prevent using the old repo layout' |
|
56 | ' dummy changelog to prevent using the old repo layout' | |
57 | ) |
|
57 | ) | |
|
58 | if self.ui.configbool('format', 'parentdelta', False): | |||
|
59 | requirements.append("parentdelta") | |||
58 | reqfile = self.opener("requires", "w") |
|
60 | reqfile = self.opener("requires", "w") | |
59 | for r in requirements: |
|
61 | for r in requirements: | |
60 | reqfile.write("%s\n" % r) |
|
62 | reqfile.write("%s\n" % r) | |
@@ -91,6 +93,8 b' class localrepository(repo.repository):' | |||||
91 | self.sjoin = self.store.join |
|
93 | self.sjoin = self.store.join | |
92 | self.opener.createmode = self.store.createmode |
|
94 | self.opener.createmode = self.store.createmode | |
93 | self.sopener.options = {} |
|
95 | self.sopener.options = {} | |
|
96 | if 'parentdelta' in requirements: | |||
|
97 | self.sopener.options['parentdelta'] = 1 | |||
94 |
|
98 | |||
95 | # These two define the set of tags for this repository. _tags |
|
99 | # These two define the set of tags for this repository. _tags | |
96 | # maps tag name to node; _tagtypes maps tag name to 'global' or |
|
100 | # maps tag name to node; _tagtypes maps tag name to 'global' or |
General Comments 0
You need to be logged in to leave comments.
Login now