##// END OF EJS Templates
subrepo: adjust subrepo prefix before calling subrepo.add() (API)...
Martin von Zweigbergk -
r41777:ed046348 default
parent child Browse files
Show More
@@ -2059,10 +2059,11 b' def add(ui, repo, match, prefix, explici'
2059 sub = wctx.sub(subpath)
2059 sub = wctx.sub(subpath)
2060 try:
2060 try:
2061 submatch = matchmod.subdirmatcher(subpath, match)
2061 submatch = matchmod.subdirmatcher(subpath, match)
2062 subprefix = repo.wvfs.reljoin(prefix, subpath)
2062 if opts.get(r'subrepos'):
2063 if opts.get(r'subrepos'):
2063 bad.extend(sub.add(ui, submatch, prefix, False, **opts))
2064 bad.extend(sub.add(ui, submatch, subprefix, False, **opts))
2064 else:
2065 else:
2065 bad.extend(sub.add(ui, submatch, prefix, True, **opts))
2066 bad.extend(sub.add(ui, submatch, subprefix, True, **opts))
2066 except error.LookupError:
2067 except error.LookupError:
2067 ui.status(_("skipping missing subrepository: %s\n")
2068 ui.status(_("skipping missing subrepository: %s\n")
2068 % join(subpath))
2069 % join(subpath))
@@ -518,9 +518,7 b' class hgsubrepo(abstractsubrepo):'
518
518
519 @annotatesubrepoerror
519 @annotatesubrepoerror
520 def add(self, ui, match, prefix, explicitonly, **opts):
520 def add(self, ui, match, prefix, explicitonly, **opts):
521 return cmdutil.add(ui, self._repo, match,
521 return cmdutil.add(ui, self._repo, match, prefix, explicitonly, **opts)
522 self.wvfs.reljoin(prefix, self._path),
523 explicitonly, **opts)
524
522
525 @annotatesubrepoerror
523 @annotatesubrepoerror
526 def addremove(self, m, prefix, opts):
524 def addremove(self, m, prefix, opts):
General Comments 0
You need to be logged in to leave comments. Login now