Show More
@@ -2028,7 +2028,6 b' def walkchangerevs(repo, match, opts, pr' | |||||
2028 | return iterate() |
|
2028 | return iterate() | |
2029 |
|
2029 | |||
2030 | def add(ui, repo, match, prefix, explicitonly, **opts): |
|
2030 | def add(ui, repo, match, prefix, explicitonly, **opts): | |
2031 | join = lambda f: os.path.join(prefix, f) |
|
|||
2032 | bad = [] |
|
2031 | bad = [] | |
2033 |
|
2032 | |||
2034 | badfn = lambda x, y: bad.append(x) or match.bad(x, y) |
|
2033 | badfn = lambda x, y: bad.append(x) or match.bad(x, y) | |
@@ -2066,7 +2065,7 b' def add(ui, repo, match, prefix, explici' | |||||
2066 | bad.extend(sub.add(ui, submatch, subprefix, True, **opts)) |
|
2065 | bad.extend(sub.add(ui, submatch, subprefix, True, **opts)) | |
2067 | except error.LookupError: |
|
2066 | except error.LookupError: | |
2068 | ui.status(_("skipping missing subrepository: %s\n") |
|
2067 | ui.status(_("skipping missing subrepository: %s\n") | |
2069 |
% |
|
2068 | % match.rel(subpath)) | |
2070 |
|
2069 | |||
2071 | if not opts.get(r'dry_run'): |
|
2070 | if not opts.get(r'dry_run'): | |
2072 | rejected = wctx.add(names, prefix) |
|
2071 | rejected = wctx.add(names, prefix) | |
@@ -2085,7 +2084,6 b' def addwebdirpath(repo, serverpath, webc' | |||||
2085 | def forget(ui, repo, match, prefix, explicitonly, dryrun, interactive): |
|
2084 | def forget(ui, repo, match, prefix, explicitonly, dryrun, interactive): | |
2086 | if dryrun and interactive: |
|
2085 | if dryrun and interactive: | |
2087 | raise error.Abort(_("cannot specify both --dry-run and --interactive")) |
|
2086 | raise error.Abort(_("cannot specify both --dry-run and --interactive")) | |
2088 | join = lambda f: os.path.join(prefix, f) |
|
|||
2089 | bad = [] |
|
2087 | bad = [] | |
2090 | badfn = lambda x, y: bad.append(x) or match.bad(x, y) |
|
2088 | badfn = lambda x, y: bad.append(x) or match.bad(x, y) | |
2091 | wctx = repo[None] |
|
2089 | wctx = repo[None] | |
@@ -2107,7 +2105,7 b' def forget(ui, repo, match, prefix, expl' | |||||
2107 | forgot.extend([subpath + '/' + f for f in subforgot]) |
|
2105 | forgot.extend([subpath + '/' + f for f in subforgot]) | |
2108 | except error.LookupError: |
|
2106 | except error.LookupError: | |
2109 | ui.status(_("skipping missing subrepository: %s\n") |
|
2107 | ui.status(_("skipping missing subrepository: %s\n") | |
2110 |
% |
|
2108 | % match.rel(subpath)) | |
2111 |
|
2109 | |||
2112 | if not explicitonly: |
|
2110 | if not explicitonly: | |
2113 | for f in match.files(): |
|
2111 | for f in match.files(): | |
@@ -2187,12 +2185,11 b' def files(ui, ctx, m, fm, fmt, subrepos)' | |||||
2187 | ret = 0 |
|
2185 | ret = 0 | |
2188 | except error.LookupError: |
|
2186 | except error.LookupError: | |
2189 | ui.status(_("skipping missing subrepository: %s\n") |
|
2187 | ui.status(_("skipping missing subrepository: %s\n") | |
2190 |
% m. |
|
2188 | % m.rel(subpath)) | |
2191 |
|
2189 | |||
2192 | return ret |
|
2190 | return ret | |
2193 |
|
2191 | |||
2194 | def remove(ui, repo, m, prefix, after, force, subrepos, dryrun, warnings=None): |
|
2192 | def remove(ui, repo, m, prefix, after, force, subrepos, dryrun, warnings=None): | |
2195 | join = lambda f: os.path.join(prefix, f) |
|
|||
2196 | ret = 0 |
|
2193 | ret = 0 | |
2197 | s = repo.status(match=m, clean=True) |
|
2194 | s = repo.status(match=m, clean=True) | |
2198 | modified, added, deleted, clean = s[0], s[1], s[3], s[6] |
|
2195 | modified, added, deleted, clean = s[0], s[1], s[3], s[6] | |
@@ -2220,7 +2217,7 b' def remove(ui, repo, m, prefix, after, f' | |||||
2220 | ret = 1 |
|
2217 | ret = 1 | |
2221 | except error.LookupError: |
|
2218 | except error.LookupError: | |
2222 | warnings.append(_("skipping missing subrepository: %s\n") |
|
2219 | warnings.append(_("skipping missing subrepository: %s\n") | |
2223 |
% |
|
2220 | % m.rel(subpath)) | |
2224 | progress.complete() |
|
2221 | progress.complete() | |
2225 |
|
2222 | |||
2226 | # warn about failure to delete explicit files/dirs |
|
2223 | # warn about failure to delete explicit files/dirs | |
@@ -2364,12 +2361,13 b' def cat(ui, repo, ctx, matcher, basefm, ' | |||||
2364 | sub = ctx.sub(subpath) |
|
2361 | sub = ctx.sub(subpath) | |
2365 | try: |
|
2362 | try: | |
2366 | submatch = matchmod.subdirmatcher(subpath, matcher) |
|
2363 | submatch = matchmod.subdirmatcher(subpath, matcher) | |
2367 |
subprefix = os.path.join(prefix, sub |
|
2364 | subprefix = os.path.join(prefix, subpath) | |
2368 | if not sub.cat(submatch, basefm, fntemplate, subprefix, |
|
2365 | if not sub.cat(submatch, basefm, fntemplate, subprefix, | |
2369 | **pycompat.strkwargs(opts)): |
|
2366 | **pycompat.strkwargs(opts)): | |
2370 | err = 0 |
|
2367 | err = 0 | |
2371 | except error.RepoLookupError: |
|
2368 | except error.RepoLookupError: | |
2372 |
ui.status(_("skipping missing subrepository: %s\n") % |
|
2369 | ui.status(_("skipping missing subrepository: %s\n") % | |
|
2370 | matcher.rel(subpath)) | |||
2373 |
|
2371 | |||
2374 | return err |
|
2372 | return err | |
2375 |
|
2373 |
@@ -1040,7 +1040,6 b' def addremove(repo, matcher, prefix, opt' | |||||
1040 | similarity /= 100.0 |
|
1040 | similarity /= 100.0 | |
1041 |
|
1041 | |||
1042 | ret = 0 |
|
1042 | ret = 0 | |
1043 | join = lambda f: os.path.join(prefix, f) |
|
|||
1044 |
|
1043 | |||
1045 | wctx = repo[None] |
|
1044 | wctx = repo[None] | |
1046 | for subpath in sorted(wctx.substate): |
|
1045 | for subpath in sorted(wctx.substate): | |
@@ -1053,7 +1052,7 b' def addremove(repo, matcher, prefix, opt' | |||||
1053 | ret = 1 |
|
1052 | ret = 1 | |
1054 | except error.LookupError: |
|
1053 | except error.LookupError: | |
1055 | repo.ui.status(_("skipping missing subrepository: %s\n") |
|
1054 | repo.ui.status(_("skipping missing subrepository: %s\n") | |
1056 |
% |
|
1055 | % m.uipath(subpath)) | |
1057 |
|
1056 | |||
1058 | rejected = [] |
|
1057 | rejected = [] | |
1059 | def badfn(f, msg): |
|
1058 | def badfn(f, msg): |
General Comments 0
You need to be logged in to leave comments.
Login now