mercurial/subrepoutil.py
changeset 45208 f7f142d74df3
parent 43106 d783f945a701
child 45255 0323972f78f3
equal deleted inserted replaced
45207:4489e9a22763 45208:f7f142d74df3
    34     (key in types dict))
    34     (key in types dict))
    35     """
    35     """
    36     p = config.config()
    36     p = config.config()
    37     repo = ctx.repo()
    37     repo = ctx.repo()
    38 
    38 
    39     def read(f, sections=None, remap=None):
    39     def read(rel, f, sections=None, remap=None):
    40         if f in ctx:
    40         if f in ctx:
    41             try:
    41             try:
    42                 data = ctx[f].data()
    42                 data = ctx[f].data()
    43             except IOError as err:
    43             except IOError as err:
    44                 if err.errno != errno.ENOENT:
    44                 if err.errno != errno.ENOENT:
    54             raise error.Abort(
    54             raise error.Abort(
    55                 _(b"subrepo spec file \'%s\' not found") % repo.pathto(f)
    55                 _(b"subrepo spec file \'%s\' not found") % repo.pathto(f)
    56             )
    56             )
    57 
    57 
    58     if b'.hgsub' in ctx:
    58     if b'.hgsub' in ctx:
    59         read(b'.hgsub')
    59         read(b'.hgsub', b'.hgsub')
    60 
    60 
    61     for path, src in ui.configitems(b'subpaths'):
    61     for path, src in ui.configitems(b'subpaths'):
    62         p.set(b'subpaths', path, src, ui.configsource(b'subpaths', path))
    62         p.set(b'subpaths', path, src, ui.configsource(b'subpaths', path))
    63 
    63 
    64     rev = {}
    64     rev = {}