Mercurial > hg
changeset 41625:93620a4ba88d
subrepo: avoid calculating subrepo prefix twice for cat() (API)
Differential Revision: https://phab.mercurial-scm.org/D5881
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 09:46:36 -0800 |
parents | 3751595ec45e |
children | 2c549abc6b85 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Feb 07 16:43:42 2019 +0300 +++ b/mercurial/cmdutil.py Thu Feb 07 09:46:36 2019 -0800 @@ -2361,14 +2361,12 @@ sub = ctx.sub(subpath) try: submatch = matchmod.subdirmatcher(subpath, matcher) - - if not sub.cat(submatch, basefm, fntemplate, - os.path.join(prefix, sub._path), + subprefix = os.path.join(prefix, sub._path) + if not sub.cat(submatch, basefm, fntemplate, subprefix, **pycompat.strkwargs(opts)): err = 0 except error.RepoLookupError: - ui.status(_("skipping missing subrepository: %s\n") - % os.path.join(prefix, subpath)) + ui.status(_("skipping missing subrepository: %s\n") % subprefix) return err