comparison mercurial/cmdutil.py @ 41663:28ce9184d495

cat: respect ui.relative-paths for "skipping missing subrepository" Differential Revision: https://phab.mercurial-scm.org/D5914
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 13:54:20 -0800
parents 05433ad59c52
children 0cbf491db7ee
comparison
equal deleted inserted replaced
41662:0a5a6675c86c 41663:28ce9184d495
2365 2365
2366 for abs in ctx.walk(matcher): 2366 for abs in ctx.walk(matcher):
2367 write(abs) 2367 write(abs)
2368 err = 0 2368 err = 0
2369 2369
2370 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
2370 for subpath in sorted(ctx.substate): 2371 for subpath in sorted(ctx.substate):
2371 sub = ctx.sub(subpath) 2372 sub = ctx.sub(subpath)
2372 try: 2373 try:
2373 submatch = matchmod.subdirmatcher(subpath, matcher) 2374 submatch = matchmod.subdirmatcher(subpath, matcher)
2374 subprefix = os.path.join(prefix, subpath) 2375 subprefix = os.path.join(prefix, subpath)
2375 if not sub.cat(submatch, basefm, fntemplate, subprefix, 2376 if not sub.cat(submatch, basefm, fntemplate, subprefix,
2376 **pycompat.strkwargs(opts)): 2377 **pycompat.strkwargs(opts)):
2377 err = 0 2378 err = 0
2378 except error.RepoLookupError: 2379 except error.RepoLookupError:
2379 ui.status(_("skipping missing subrepository: %s\n") % 2380 ui.status(_("skipping missing subrepository: %s\n") %
2380 matcher.rel(subpath)) 2381 uipathfn(subpath))
2381 2382
2382 return err 2383 return err
2383 2384
2384 def commit(ui, repo, commitfunc, pats, opts): 2385 def commit(ui, repo, commitfunc, pats, opts):
2385 '''commit the specified files or all outstanding changes''' 2386 '''commit the specified files or all outstanding changes'''