##// END OF EJS Templates
config: raise ConfigError on non-existing include files...
Martin Geisler -
r10042:7cdd2a7d stable
parent child Browse files
Show More
@@ -100,7 +100,13 b' class config(object):'
100 100 base = os.path.dirname(src)
101 101 inc = os.path.normpath(os.path.join(base, inc))
102 102 if include:
103 try:
103 104 include(inc, remap=remap, sections=sections)
105 except IOError, inst:
106 msg = _("config error at %s:%d: "
107 "cannot include %s (%s)") \
108 % (src, line, inc, inst.strerror)
109 raise error.ConfigError(msg)
104 110 continue
105 111 if emptyre.match(l):
106 112 continue
@@ -22,3 +22,6 b' cd ..'
22 22 echo '[foo]' >> $HGRCPATH
23 23 echo ' x = y' >> $HGRCPATH
24 24 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
25
26 echo '%include /no-such-file' > $HGRCPATH
27 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
@@ -11,3 +11,4 b' defaults.tag=-d "0 0"'
11 11 paths.default=.../foo%bar
12 12 ui.slash=True
13 13 hg: config error at $HGRCPATH:8: ' x = y'
14 hg: config error at $HGRCPATH:1: cannot include /no-such-file (No such file or directory)
General Comments 0
You need to be logged in to leave comments. Login now