localrepo: enable ellipsis flag on revlogs when repo is narrow
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 13 Sep 2018 15:57:18 -0700
changeset 39770 7aa440222323
parent 39769 ba0e0c6b7b61
child 39771 a063786c89fb
localrepo: enable ellipsis flag on revlogs when repo is narrow If the narrow requirement is present, revlogs created for that repository will have the ellipsis flag enabled. This is the same behavior that the narrow extension exhibits. Except the ellipsis flag won't be enabled on repos/revlogs that don't have the narrow requirement. Differential Revision: https://phab.mercurial-scm.org/D4648
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Sep 13 15:52:42 2018 -0700
+++ b/mercurial/localrepo.py	Thu Sep 13 15:57:18 2018 -0700
@@ -727,6 +727,9 @@
         if r.startswith(b'exp-compression-'):
             options[b'compengine'] = r[len(b'exp-compression-'):]
 
+    if repository.NARROW_REQUIREMENT in requirements:
+        options[b'enableellipsis'] = True
+
     return options
 
 def makemain(**kwargs):