##// END OF EJS Templates
subrepo: avoid calculating subrepo prefix twice for cat() (API)...
Martin von Zweigbergk -
r41774:93620a4b default
parent child Browse files
Show More
@@ -2361,14 +2361,12 b' def cat(ui, repo, ctx, matcher, basefm, '
2361 sub = ctx.sub(subpath)
2361 sub = ctx.sub(subpath)
2362 try:
2362 try:
2363 submatch = matchmod.subdirmatcher(subpath, matcher)
2363 submatch = matchmod.subdirmatcher(subpath, matcher)
2364
2364 subprefix = os.path.join(prefix, sub._path)
2365 if not sub.cat(submatch, basefm, fntemplate,
2365 if not sub.cat(submatch, basefm, fntemplate, subprefix,
2366 os.path.join(prefix, sub._path),
2367 **pycompat.strkwargs(opts)):
2366 **pycompat.strkwargs(opts)):
2368 err = 0
2367 err = 0
2369 except error.RepoLookupError:
2368 except error.RepoLookupError:
2370 ui.status(_("skipping missing subrepository: %s\n")
2369 ui.status(_("skipping missing subrepository: %s\n") % subprefix)
2371 % os.path.join(prefix, subpath))
2372
2370
2373 return err
2371 return err
2374
2372
General Comments 0
You need to be logged in to leave comments. Login now