config: allow spaces in key portion of items
authorMatt Mackall <mpm@selenic.com>
Wed, 29 Apr 2009 20:47:30 -0500
changeset 8263 41031699550a
parent 8262 3d7b1d97230d
child 8264 63ea850b3312
config: allow spaces in key portion of items
mercurial/config.py
--- a/mercurial/config.py	Wed Apr 29 20:47:28 2009 -0500
+++ b/mercurial/config.py	Wed Apr 29 20:47:30 2009 -0500
@@ -71,7 +71,7 @@
 
     def read(self, path, fp=None, sections=None):
         sectionre = re.compile(r'\[([^\[]+)\]')
-        itemre = re.compile(r'([^=\s]+)\s*=\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+)')