equal
deleted
inserted
replaced
349 self._compengine = b'zlib' |
349 self._compengine = b'zlib' |
350 self._compengineopts = {} |
350 self._compengineopts = {} |
351 self._maxdeltachainspan = -1 |
351 self._maxdeltachainspan = -1 |
352 self._withsparseread = False |
352 self._withsparseread = False |
353 self._sparserevlog = False |
353 self._sparserevlog = False |
|
354 self.hassidedata = False |
354 self._srdensitythreshold = 0.50 |
355 self._srdensitythreshold = 0.50 |
355 self._srmingapsize = 262144 |
356 self._srmingapsize = 262144 |
356 |
357 |
357 # Make copy of flag processors so each revlog instance can support |
358 # Make copy of flag processors so each revlog instance can support |
358 # custom flags. |
359 # custom flags. |
415 self._compengineopts[b'zstd.level'] = opts[b'zstd.level'] |
416 self._compengineopts[b'zstd.level'] = opts[b'zstd.level'] |
416 if b'maxdeltachainspan' in opts: |
417 if b'maxdeltachainspan' in opts: |
417 self._maxdeltachainspan = opts[b'maxdeltachainspan'] |
418 self._maxdeltachainspan = opts[b'maxdeltachainspan'] |
418 if self._mmaplargeindex and b'mmapindexthreshold' in opts: |
419 if self._mmaplargeindex and b'mmapindexthreshold' in opts: |
419 mmapindexthreshold = opts[b'mmapindexthreshold'] |
420 mmapindexthreshold = opts[b'mmapindexthreshold'] |
420 self.hassidedata = bool(opts.get(b'side-data', False)) |
|
421 self._sparserevlog = bool(opts.get(b'sparse-revlog', False)) |
421 self._sparserevlog = bool(opts.get(b'sparse-revlog', False)) |
422 withsparseread = bool(opts.get(b'with-sparse-read', False)) |
422 withsparseread = bool(opts.get(b'with-sparse-read', False)) |
423 # sparse-revlog forces sparse-read |
423 # sparse-revlog forces sparse-read |
424 self._withsparseread = self._sparserevlog or withsparseread |
424 self._withsparseread = self._sparserevlog or withsparseread |
425 if b'sparse-read-density-threshold' in opts: |
425 if b'sparse-read-density-threshold' in opts: |
519 # it's fixed, since v2 revlogs sometimes get rewritten on exchange. |
519 # it's fixed, since v2 revlogs sometimes get rewritten on exchange. |
520 # See issue6485 |
520 # See issue6485 |
521 self._inline = False |
521 self._inline = False |
522 # generaldelta implied by version 2 revlogs. |
522 # generaldelta implied by version 2 revlogs. |
523 self._generaldelta = True |
523 self._generaldelta = True |
|
524 # revlog-v2 has built in sidedata support |
|
525 self.hassidedata = True |
524 |
526 |
525 else: |
527 else: |
526 msg = _(b'unknown version (%d) in revlog %s') |
528 msg = _(b'unknown version (%d) in revlog %s') |
527 msg %= (self._format_version, self.display_id) |
529 msg %= (self._format_version, self.display_id) |
528 raise error.RevlogError(msg) |
530 raise error.RevlogError(msg) |