# HG changeset patch # User Hannes Oldenburg # Date 1469608734 0 # Node ID bc5148d0a446aa695eb0fe45e9e3345fbe21392e # Parent 53e2c979e4cd288f7129717b37966ab4b2afac11 cmdutil: warnings not issued in cat if subrepopath overlaps Previously a subrepository "sub" would cause no warnings to be issued for a file "subnot/a", if it's not present in the corresponding changeset when calling: hg cat subnot/a diff -r 53e2c979e4cd -r bc5148d0a446 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Mon Jul 25 17:00:42 2016 +0200 +++ b/mercurial/cmdutil.py Wed Jul 27 08:38:54 2016 +0000 @@ -2584,7 +2584,7 @@ # Don't warn about "missing" files that are really in subrepos def badfn(path, msg): for subpath in ctx.substate: - if path.startswith(subpath): + if path.startswith(subpath + '/'): return matcher.bad(path, msg) diff -r 53e2c979e4cd -r bc5148d0a446 tests/test-subrepo.t --- a/tests/test-subrepo.t Mon Jul 25 17:00:42 2016 +0200 +++ b/tests/test-subrepo.t Wed Jul 27 08:38:54 2016 +0000 @@ -60,6 +60,9 @@ $ hg remove -S snot/file not removing snot/file: file is untracked [1] + $ hg cat snot/filenot + snot/filenot: no such file in rev 7cf8cfea66e4 + [1] $ rm -r snot Revert subrepo and test subrepo fileset keyword: