70 except IOError as err: |
70 except IOError as err: |
71 if err.errno != errno.ENOENT: |
71 if err.errno != errno.ENOENT: |
72 raise |
72 raise |
73 # handle missing subrepo spec files as removed |
73 # handle missing subrepo spec files as removed |
74 ui.warn(_("warning: subrepo spec file \'%s\' not found\n") % |
74 ui.warn(_("warning: subrepo spec file \'%s\' not found\n") % |
75 util.pathto(repo.root, repo.getcwd(), f)) |
75 repo.pathto(f)) |
76 return |
76 return |
77 p.parse(f, data, sections, remap, read) |
77 p.parse(f, data, sections, remap, read) |
78 else: |
78 else: |
79 raise util.Abort(_("subrepo spec file \'%s\' not found") % |
79 raise util.Abort(_("subrepo spec file \'%s\' not found") % |
80 util.pathto(repo.root, repo.getcwd(), f)) |
80 repo.pathto(f)) |
81 |
|
82 if '.hgsub' in ctx: |
81 if '.hgsub' in ctx: |
83 read('.hgsub') |
82 read('.hgsub') |
84 |
83 |
85 for path, src in ui.configitems('subpaths'): |
84 for path, src in ui.configitems('subpaths'): |
86 p.set('subpaths', path, src, ui.configsource('subpaths', path)) |
85 p.set('subpaths', path, src, ui.configsource('subpaths', path)) |
95 try: |
94 try: |
96 revision, path = l.split(" ", 1) |
95 revision, path = l.split(" ", 1) |
97 except ValueError: |
96 except ValueError: |
98 raise util.Abort(_("invalid subrepository revision " |
97 raise util.Abort(_("invalid subrepository revision " |
99 "specifier in \'%s\' line %d") |
98 "specifier in \'%s\' line %d") |
100 % (util.pathto(repo.root, repo.getcwd(), |
99 % (repo.pathto('.hgsubstate'), (i + 1))) |
101 '.hgsubstate'), (i + 1))) |
|
102 rev[path] = revision |
100 rev[path] = revision |
103 except IOError as err: |
101 except IOError as err: |
104 if err.errno != errno.ENOENT: |
102 if err.errno != errno.ENOENT: |
105 raise |
103 raise |
106 |
104 |