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'): |