mercurial/subrepo.py
changeset 13018 96956105e92d
parent 13016 9efc316a6716
parent 13017 d0e21c5fde41
child 13027 7f2ecb64140d
equal deleted inserted replaced
13016:9efc316a6716 13018:96956105e92d
    19     (key in types dict))
    19     (key in types dict))
    20     """
    20     """
    21     p = config.config()
    21     p = config.config()
    22     def read(f, sections=None, remap=None):
    22     def read(f, sections=None, remap=None):
    23         if f in ctx:
    23         if f in ctx:
    24             p.parse(f, ctx[f].data(), sections, remap, read)
    24             try:
       
    25                 data = ctx[f].data()
       
    26             except IOError, err:
       
    27                 if err.errno != errno.ENOENT:
       
    28                     raise
       
    29                 # handle missing subrepo spec files as removed
       
    30                 ui.warn(_("warning: subrepo spec file %s not found\n") % f)
       
    31                 return
       
    32             p.parse(f, data, sections, remap, read)
    25         else:
    33         else:
    26             raise util.Abort(_("subrepo spec file %s not found") % f)
    34             raise util.Abort(_("subrepo spec file %s not found") % f)
    27 
    35 
    28     if '.hgsub' in ctx:
    36     if '.hgsub' in ctx:
    29         read('.hgsub')
    37         read('.hgsub')