# HG changeset patch # User Matt Mackall # Date 2009-12-31 23:25:46 # Node ID 65b6dc44cdbf420bd8e9436972a618bb122dd6d3 # Parent 513c89a60f203a8387d8dfa6f2dc67b21725790a subrepo: fix includes support in .hgsub diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -16,12 +16,12 @@ def state(ctx): p = config.config() def read(f, sections=None, remap=None): if f in ctx: - try: - p.parse(f, ctx[f].data(), sections, remap) - except IOError, err: - if err.errno != errno.ENOENT: - raise - read('.hgsub') + p.parse(f, ctx[f].data(), sections, remap, read) + else: + raise util.Abort(_("subrepo spec file %s not found") % f) + + if '.hgsub' in ctx: + read('.hgsub') rev = {} if '.hgsubstate' in ctx: