Mercurial > hg
changeset 14486:4e3eda05189b
config: ignore include errors for nonexistent files
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 31 May 2011 16:00:39 -0500 |
parents | 610873cf064a |
children | 37901cf0680b |
files | mercurial/config.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/config.py Tue May 31 11:52:22 2011 -0700 +++ b/mercurial/config.py Tue May 31 16:00:39 2011 -0500 @@ -7,7 +7,7 @@ from i18n import _ import error, util -import re, os +import re, os, errno class sortdict(dict): 'a simple sorted dictionary' @@ -103,9 +103,10 @@ try: include(inc, remap=remap, sections=sections) except IOError, inst: - raise error.ParseError(_("cannot include %s (%s)") - % (inc, inst.strerror), - "%s:%s" % (src, line)) + if inst.errno != errno.ENOENT: + raise error.ParseError(_("cannot include %s (%s)") + % (inc, inst.strerror), + "%s:%s" % (src, line)) continue if emptyre.match(l): continue