config: use util.re.compile instead of util.compilere
authorSiddharth Agarwal <sid0@fb.com>
Tue, 15 Jul 2014 14:50:58 -0700
changeset 21910 fc04fdb2b349
parent 21909 335bb8b80443
child 21911 760f4055e656
config: use util.re.compile instead of util.compilere
mercurial/config.py
--- a/mercurial/config.py	Tue Jul 15 14:49:45 2014 -0700
+++ b/mercurial/config.py	Tue Jul 15 14:50:58 2014 -0700
@@ -80,13 +80,13 @@
             self._source.pop((section, item), None)
 
     def parse(self, src, data, sections=None, remap=None, include=None):
-        sectionre = util.compilere(r'\[([^\[]+)\]')
-        itemre = util.compilere(r'([^=\s][^=]*?)\s*=\s*(.*\S|)')
-        contre = util.compilere(r'\s+(\S|\S.*\S)\s*$')
-        emptyre = util.compilere(r'(;|#|\s*$)')
-        commentre = util.compilere(r'(;|#)')
-        unsetre = util.compilere(r'%unset\s+(\S+)')
-        includere = util.compilere(r'%include\s+(\S|\S.*\S)\s*$')
+        sectionre = util.re.compile(r'\[([^\[]+)\]')
+        itemre = util.re.compile(r'([^=\s][^=]*?)\s*=\s*(.*\S|)')
+        contre = util.re.compile(r'\s+(\S|\S.*\S)\s*$')
+        emptyre = util.re.compile(r'(;|#|\s*$)')
+        commentre = util.re.compile(r'(;|#)')
+        unsetre = util.re.compile(r'%unset\s+(\S+)')
+        includere = util.re.compile(r'%include\s+(\S|\S.*\S)\s*$')
         section = ""
         item = None
         line = 0