mercurial/config.py
changeset 8192 5fd8e60a935d
parent 8187 d2504744e7a5
child 8193 94246e90081e
--- 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