diff -r 82ca0c43bc44 -r d0e21c5fde41 mercurial/subrepo.py --- a/mercurial/subrepo.py Wed Nov 17 21:25:23 2010 +0100 +++ b/mercurial/subrepo.py Thu Nov 18 23:05:10 2010 +0100 @@ -21,7 +21,15 @@ p = config.config() def read(f, sections=None, remap=None): if f in ctx: - p.parse(f, ctx[f].data(), sections, remap, read) + try: + data = ctx[f].data() + except IOError, err: + if err.errno != errno.ENOENT: + raise + # handle missing subrepo spec files as removed + ui.warn(_("warning: subrepo spec file %s not found\n") % f) + return + p.parse(f, data, sections, remap, read) else: raise util.Abort(_("subrepo spec file %s not found") % f)