mercurial/ui.py
changeset 35197 aef2b98d9352
parent 35148 fa2395db68c6
parent 34996 c9740b69b9b7
child 35315 03a83ace9816
--- a/mercurial/ui.py	Thu Nov 16 03:52:42 2017 +0100
+++ b/mercurial/ui.py	Fri Dec 01 15:21:05 2017 -0600
@@ -766,6 +766,7 @@
 
         The return value can either be
         - False if HGPLAIN is not set, or feature is in HGPLAINEXCEPT
+        - False if feature is disabled by default and not included in HGPLAIN
         - True otherwise
         '''
         if ('HGPLAIN' not in encoding.environ and
@@ -773,6 +774,9 @@
             return False
         exceptions = encoding.environ.get('HGPLAINEXCEPT',
                 '').strip().split(',')
+        # TODO: add support for HGPLAIN=+feature,-feature syntax
+        if '+strictflags' not in encoding.environ.get('HGPLAIN', '').split(','):
+            exceptions.append('strictflags')
         if feature and exceptions:
             return feature not in exceptions
         return True