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