revlog: add opener option to enable ellipsis flag processor
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 13 Sep 2018 15:52:42 -0700
changeset 39785 ba0e0c6b7b61
parent 39784 7b2b42fc377a
child 39786 7aa440222323
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
mercurial/revlog.py
--- 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 '