Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 41639:ed046348675c
subrepo: adjust subrepo prefix before calling subrepo.add() (API)
Differential Revision: https://phab.mercurial-scm.org/D5884
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 09:59:27 -0800 |
parents | f92844cb942c |
children | 799e156785f7 |
comparison
equal
deleted
inserted
replaced
41638:f92844cb942c | 41639:ed046348675c |
---|---|
2057 | 2057 |
2058 for subpath in sorted(wctx.substate): | 2058 for subpath in sorted(wctx.substate): |
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)) |
2069 | 2070 |
2070 if not opts.get(r'dry_run'): | 2071 if not opts.get(r'dry_run'): |