Mercurial > hg
comparison mercurial/scmutil.py @ 41629:5ee3c49fc9cd
subrepo: adjust subrepo prefix before calling subrepo.addremove() (API)
Differential Revision: https://phab.mercurial-scm.org/D5885
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 10:01:55 -0800 |
parents | e944cf4ce1a8 |
children | 799e156785f7 |
comparison
equal
deleted
inserted
replaced
41628:ed046348675c | 41629:5ee3c49fc9cd |
---|---|
1045 wctx = repo[None] | 1045 wctx = repo[None] |
1046 for subpath in sorted(wctx.substate): | 1046 for subpath in sorted(wctx.substate): |
1047 submatch = matchmod.subdirmatcher(subpath, m) | 1047 submatch = matchmod.subdirmatcher(subpath, m) |
1048 if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()): | 1048 if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()): |
1049 sub = wctx.sub(subpath) | 1049 sub = wctx.sub(subpath) |
1050 subprefix = repo.wvfs.reljoin(prefix, subpath) | |
1050 try: | 1051 try: |
1051 if sub.addremove(submatch, prefix, opts): | 1052 if sub.addremove(submatch, subprefix, opts): |
1052 ret = 1 | 1053 ret = 1 |
1053 except error.LookupError: | 1054 except error.LookupError: |
1054 repo.ui.status(_("skipping missing subrepository: %s\n") | 1055 repo.ui.status(_("skipping missing subrepository: %s\n") |
1055 % join(subpath)) | 1056 % join(subpath)) |
1056 | 1057 |