Mercurial > hg
changeset 8192:5fd8e60a935d
config: deal with spaces at end of line more carefully
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Apr 2009 16:50:43 -0500 |
parents | 35604226d712 |
children | 94246e90081e |
files | mercurial/config.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/config.py Sun Apr 26 16:50:43 2009 -0500 +++ b/mercurial/config.py Sun Apr 26 16:50:43 2009 -0500 @@ -69,11 +69,11 @@ def read(self, path, fp=None): sectionre = re.compile(r'\[([^\[]+)\]') - itemre = re.compile(r'([^=\s]+)\s*=\s*(.*)') - contre = re.compile(r'\s+(\S.*)') + itemre = re.compile(r'([^=\s]+)\s*=\s*(.*\S|)') + contre = re.compile(r'\s+(\S.*\S)') emptyre = re.compile(r'(;|#|\s*$)') - unsetre = re.compile(r'%unset\s+(\S.*)') - includere = re.compile(r'%include\s+(\S.*)') + unsetre = re.compile(r'%unset\s+(\S+)') + includere = re.compile(r'%include\s+(\S.*\S)') section = "" item = None line = 0