mercurial/ui.py
branchstable
changeset 35170 c9740b69b9b7
parent 34947 ff2110eadbfa
child 35186 aef2b98d9352
--- a/mercurial/ui.py	Thu Nov 23 22:04:53 2017 +0900
+++ b/mercurial/ui.py	Thu Nov 23 22:17:03 2017 +0900
@@ -761,6 +761,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
@@ -768,6 +769,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