--- a/mercurial/subrepo.py Wed Nov 17 21:30:13 2010 +0100
+++ b/mercurial/subrepo.py Thu Nov 18 23:15:13 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)