Show More
@@ -0,0 +1,7 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | echo '[Section]' >> $HGRCPATH | |
|
4 | echo 'KeY = Case Sensitive' >> $HGRCPATH | |
|
5 | echo 'key = lower case' >> $HGRCPATH | |
|
6 | ||
|
7 | hg showconfig |
@@ -8,7 +8,7 b'' | |||
|
8 | 8 | |
|
9 | 9 | import os |
|
10 | 10 | from mercurial.demandload import demandload |
|
11 |
demandload(globals(), " |
|
|
11 | demandload(globals(), "mimetools cStringIO") | |
|
12 | 12 | demandload(globals(), "mercurial:ui,hg,util,templater") |
|
13 | 13 | demandload(globals(), "mercurial.hgweb.hgweb_mod:hgweb") |
|
14 | 14 | demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile,style_map") |
@@ -30,7 +30,7 b' class hgwebdir(object):' | |||
|
30 | 30 | self.repos = cleannames(config.items()) |
|
31 | 31 | self.repos.sort() |
|
32 | 32 | else: |
|
33 |
cp = |
|
|
33 | cp = util.configparser() | |
|
34 | 34 | cp.read(config) |
|
35 | 35 | self.repos = [] |
|
36 | 36 | if cp.has_section('web'): |
@@ -11,7 +11,7 b' demandload(globals(), "errno getpass os ' | |||
|
11 | 11 | demandload(globals(), "ConfigParser traceback util") |
|
12 | 12 | |
|
13 | 13 | def dupconfig(orig): |
|
14 |
new = |
|
|
14 | new = util.configparser(orig.defaults()) | |
|
15 | 15 | updateconfig(orig, new) |
|
16 | 16 | return new |
|
17 | 17 | |
@@ -37,7 +37,7 b' class ui(object):' | |||
|
37 | 37 | self.debugflag = debug |
|
38 | 38 | self.interactive = interactive |
|
39 | 39 | self.traceback = traceback |
|
40 |
self.cdata = |
|
|
40 | self.cdata = util.configparser() | |
|
41 | 41 | self.readconfig(util.rcpath()) |
|
42 | 42 | self.updateopts(verbose, debug, quiet, interactive) |
|
43 | 43 | else: |
@@ -126,7 +126,7 b' class ui(object):' | |||
|
126 | 126 | |
|
127 | 127 | def setconfig(self, section, name, value): |
|
128 | 128 | if not self.overlay: |
|
129 |
self.overlay = |
|
|
129 | self.overlay = util.configparser() | |
|
130 | 130 | for cdata in (self.overlay, self.cdata): |
|
131 | 131 | if not cdata.has_section(section): |
|
132 | 132 | cdata.add_section(section) |
@@ -15,7 +15,7 b' platform-specific details from the core.' | |||
|
15 | 15 | from i18n import gettext as _ |
|
16 | 16 | from demandload import * |
|
17 | 17 | demandload(globals(), "cStringIO errno getpass popen2 re shutil sys tempfile") |
|
18 | demandload(globals(), "os threading time calendar") | |
|
18 | demandload(globals(), "os threading time calendar ConfigParser") | |
|
19 | 19 | |
|
20 | 20 | # used by parsedate |
|
21 | 21 | defaultdateformats = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', |
@@ -24,6 +24,11 b" defaultdateformats = ('%Y-%m-%d %H:%M:%S" | |||
|
24 | 24 | class SignalInterrupt(Exception): |
|
25 | 25 | """Exception raised on SIGTERM and SIGHUP.""" |
|
26 | 26 | |
|
27 | # like SafeConfigParser but with case-sensitive keys | |
|
28 | class configparser(ConfigParser.SafeConfigParser): | |
|
29 | def optionxform(self, optionstr): | |
|
30 | return optionstr | |
|
31 | ||
|
27 | 32 | def cachefunc(func): |
|
28 | 33 | '''cache the result of function calls''' |
|
29 | 34 | # XXX doesn't handle keywords args |
General Comments 0
You need to be logged in to leave comments.
Login now