changeset 39769:ba0e0c6b7b61

revlog: add opener option to enable ellipsis flag processor The ellipsis flag processor can now be registered by specifying an opener option when constructing a revlog instance. This allows us to enable ellipsis flags on a per-revlog basis. Differential Revision: https://phab.mercurial-scm.org/D4647
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 13 Sep 2018 15:52:42 -0700
parents 7b2b42fc377a
children 7aa440222323
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Thu Sep 13 15:48:53 2018 -0700
+++ b/mercurial/revlog.py	Thu Sep 13 15:52:42 2018 -0700
@@ -452,6 +452,8 @@
                 self._srdensitythreshold = opts['sparse-read-density-threshold']
             if 'sparse-read-min-gap-size' in opts:
                 self._srmingapsize = opts['sparse-read-min-gap-size']
+            if opts.get('enableellipsis'):
+                self._flagprocessors[REVIDX_ELLIPSIS] = ellipsisprocessor
 
         if self._chunkcachesize <= 0:
             raise RevlogError(_('revlog chunk cache size %r is not greater '