Show More
@@ -21,7 +21,7 b' propertycache = util.propertycache' | |||
|
21 | 21 | class localrepository(repo.repository): |
|
22 | 22 | capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey', |
|
23 | 23 | 'known', 'getbundle')) |
|
24 |
supportedformats = set(('revlogv1', |
|
|
24 | supportedformats = set(('revlogv1',)) | |
|
25 | 25 | supported = supportedformats | set(('store', 'fncache', 'shared', |
|
26 | 26 | 'dotencode')) |
|
27 | 27 | |
@@ -61,8 +61,6 b' class localrepository(repo.repository):' | |||
|
61 | 61 | '\0\0\0\2' # represents revlogv2 |
|
62 | 62 | ' dummy changelog to prevent using the old repo layout' |
|
63 | 63 | ) |
|
64 | if self.ui.configbool('format', 'parentdelta', False): | |
|
65 | requirements.append("parentdelta") | |
|
66 | 64 | else: |
|
67 | 65 | raise error.RepoError(_("repository %s not found") % path) |
|
68 | 66 | elif create: |
@@ -117,8 +115,6 b' class localrepository(repo.repository):' | |||
|
117 | 115 | def _applyrequirements(self, requirements): |
|
118 | 116 | self.requirements = requirements |
|
119 | 117 | self.sopener.options = {} |
|
120 | if 'parentdelta' in requirements: | |
|
121 | self.sopener.options['parentdelta'] = 1 | |
|
122 | 118 | |
|
123 | 119 | def _writerequirements(self): |
|
124 | 120 | reqfile = self.opener("requires", "w") |
@@ -34,9 +34,8 b' REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_' | |||
|
34 | 34 | REVLOGNG_FLAGS = REVLOGNGINLINEDATA | REVLOGSHALLOW |
|
35 | 35 | |
|
36 | 36 | # revlog index flags |
|
37 | REVIDX_PARENTDELTA = 1 | |
|
38 | 37 | REVIDX_PUNCHED_FLAG = 2 |
|
39 |
REVIDX_KNOWN_FLAGS = REVIDX_PUNCHED_FLAG |
|
|
38 | REVIDX_KNOWN_FLAGS = REVIDX_PUNCHED_FLAG | |
|
40 | 39 | |
|
41 | 40 | # max size of revlog with inline data |
|
42 | 41 | _maxinline = 131072 |
@@ -223,7 +222,6 b' class revlog(object):' | |||
|
223 | 222 | self._chunkcache = (0, '') |
|
224 | 223 | self.index = [] |
|
225 | 224 | self._shallowroot = shallowroot |
|
226 | self._parentdelta = 0 | |
|
227 | 225 | self._pcache = {} |
|
228 | 226 | self._nodecache = {nullid: nullrev} |
|
229 | 227 | self._nodepos = None |
@@ -233,8 +231,6 b' class revlog(object):' | |||
|
233 | 231 | v = opener.options['defversion'] |
|
234 | 232 | if v & REVLOGNG: |
|
235 | 233 | v |= REVLOGNGINLINEDATA |
|
236 | if v & REVLOGNG and 'parentdelta' in opener.options: | |
|
237 | self._parentdelta = 1 | |
|
238 | 234 | |
|
239 | 235 | if shallowroot: |
|
240 | 236 | v |= REVLOGSHALLOW |
@@ -834,11 +830,8 b' class revlog(object):' | |||
|
834 | 830 | self._chunkcache = (0, '') |
|
835 | 831 | |
|
836 | 832 | def deltaparent(self, rev): |
|
837 | """return previous revision or parentrev according to flags""" | |
|
838 | if self.flags(rev) & REVIDX_PARENTDELTA: | |
|
839 | return self.parentrevs(rev)[0] | |
|
840 | else: | |
|
841 | return rev - 1 | |
|
833 | """return deltaparent of the given revision""" | |
|
834 | return rev - 1 | |
|
842 | 835 | |
|
843 | 836 | def revdiff(self, rev1, rev2): |
|
844 | 837 | """return or calculate a delta between two revisions""" |
@@ -870,16 +863,10 b' class revlog(object):' | |||
|
870 | 863 | |
|
871 | 864 | # build delta chain |
|
872 | 865 | chain = [] |
|
873 | index = self.index # for performance | |
|
874 | 866 | iterrev = rev |
|
875 | e = index[iterrev] | |
|
876 | 867 | while iterrev != base and iterrev != cachedrev: |
|
877 | 868 | chain.append(iterrev) |
|
878 | if e[0] & REVIDX_PARENTDELTA: | |
|
879 | iterrev = e[5] | |
|
880 | else: | |
|
881 | iterrev -= 1 | |
|
882 | e = index[iterrev] | |
|
869 | iterrev -= 1 | |
|
883 | 870 | chain.reverse() |
|
884 | 871 | base = iterrev |
|
885 | 872 | |
@@ -1018,11 +1005,6 b' class revlog(object):' | |||
|
1018 | 1005 | # should we try to build a delta? |
|
1019 | 1006 | if prev != nullrev: |
|
1020 | 1007 | d = builddelta(prev) |
|
1021 | if self._parentdelta and prev != p1r: | |
|
1022 | d2 = builddelta(p1r) | |
|
1023 | if d2 < d: | |
|
1024 | d = d2 | |
|
1025 | flags = REVIDX_PARENTDELTA | |
|
1026 | 1008 | dist, l, data, base = d |
|
1027 | 1009 | |
|
1028 | 1010 | # full versions are inserted when the needed deltas |
General Comments 0
You need to be logged in to leave comments.
Login now