mercurial/config.py
branchstable
changeset 10042 7cdd2a7db2c2
parent 9471 bccf780f78ed
child 10263 25e572394f5c
equal deleted inserted replaced
10025:fb45c1e4396f 10042:7cdd2a7db2c2
    98             if m:
    98             if m:
    99                 inc = m.group(1)
    99                 inc = m.group(1)
   100                 base = os.path.dirname(src)
   100                 base = os.path.dirname(src)
   101                 inc = os.path.normpath(os.path.join(base, inc))
   101                 inc = os.path.normpath(os.path.join(base, inc))
   102                 if include:
   102                 if include:
   103                     include(inc, remap=remap, sections=sections)
   103                     try:
       
   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                 continue
   110                 continue
   105             if emptyre.match(l):
   111             if emptyre.match(l):
   106                 continue
   112                 continue
   107             m = sectionre.match(l)
   113             m = sectionre.match(l)
   108             if m:
   114             if m: