# HG changeset patch # User Matt Mackall # Date 2011-05-31 21:00:39 # Node ID 4e3eda05189b178eb17a3fdc43571204b0ddeca2 # Parent 610873cf064a7022c99d4ff5f5fe986465cf3b33 config: ignore include errors for nonexistent files diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -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 @@ class config(object): 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