mercurial/util.py
changeset 3425 ec6f400cff4d
parent 3257 c9cd63a6fce9
child 3466 8b55c0ba8048
--- a/mercurial/util.py	Mon Oct 16 11:36:57 2006 -0700
+++ b/mercurial/util.py	Mon Oct 16 15:38:53 2006 -0300
@@ -15,7 +15,7 @@
 from i18n import gettext as _
 from demandload import *
 demandload(globals(), "cStringIO errno getpass popen2 re shutil sys tempfile")
-demandload(globals(), "os threading time calendar")
+demandload(globals(), "os threading time calendar ConfigParser")
 
 # used by parsedate
 defaultdateformats = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M',
@@ -24,6 +24,11 @@
 class SignalInterrupt(Exception):
     """Exception raised on SIGTERM and SIGHUP."""
 
+# like SafeConfigParser but with case-sensitive keys
+class configparser(ConfigParser.SafeConfigParser):
+    def optionxform(self, optionstr):
+        return optionstr
+
 def cachefunc(func):
     '''cache the result of function calls'''
     # XXX doesn't handle keywords args