Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 35197:aef2b98d9352
merge with stable
author | Kevin Bullock <kbullock+mercurial@ringworld.org> |
---|---|
date | Fri, 01 Dec 2017 15:21:05 -0600 |
parents | fa2395db68c6 c9740b69b9b7 |
children | 03a83ace9816 |
comparison
equal
deleted
inserted
replaced
35196:66ecde8a704d | 35197:aef2b98d9352 |
---|---|
764 The only way to trigger plain mode is by setting either the | 764 The only way to trigger plain mode is by setting either the |
765 `HGPLAIN' or `HGPLAINEXCEPT' environment variables. | 765 `HGPLAIN' or `HGPLAINEXCEPT' environment variables. |
766 | 766 |
767 The return value can either be | 767 The return value can either be |
768 - False if HGPLAIN is not set, or feature is in HGPLAINEXCEPT | 768 - False if HGPLAIN is not set, or feature is in HGPLAINEXCEPT |
769 - False if feature is disabled by default and not included in HGPLAIN | |
769 - True otherwise | 770 - True otherwise |
770 ''' | 771 ''' |
771 if ('HGPLAIN' not in encoding.environ and | 772 if ('HGPLAIN' not in encoding.environ and |
772 'HGPLAINEXCEPT' not in encoding.environ): | 773 'HGPLAINEXCEPT' not in encoding.environ): |
773 return False | 774 return False |
774 exceptions = encoding.environ.get('HGPLAINEXCEPT', | 775 exceptions = encoding.environ.get('HGPLAINEXCEPT', |
775 '').strip().split(',') | 776 '').strip().split(',') |
777 # TODO: add support for HGPLAIN=+feature,-feature syntax | |
778 if '+strictflags' not in encoding.environ.get('HGPLAIN', '').split(','): | |
779 exceptions.append('strictflags') | |
776 if feature and exceptions: | 780 if feature and exceptions: |
777 return feature not in exceptions | 781 return feature not in exceptions |
778 return True | 782 return True |
779 | 783 |
780 def username(self, acceptempty=False): | 784 def username(self, acceptempty=False): |