<div dir="ltr"><div>I was wondering too, but since literal slashes it those checks are in more places, i figured either i'm missing something,<br></div>or it's better done in other patches.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 1:38 PM, Jun Wu <span dir="ltr"><<a href="mailto:quark@fb.com" target="_blank">quark@fb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Excerpts from Hannes Oldenburg's message of 2016-07-27 08:56:42 +0000:<br>
<span class="">> # HG changeset patch<br>
> # User Hannes Oldenburg <<a href="mailto:hannes.christian.oldenburg@gmail.com">hannes.christian.oldenburg@gmail.com</a>><br>
> # Date <a href="tel:1469608734%200" value="+14696087340">1469608734 0</a><br>
> #      Wed Jul 27 08:38:54 2016 +0000<br>
> # Branch stable<br>
> # Node ID 1cb0ce20c615d848b7ca50fb23096cdc27d4b6d1<br>
> # Parent  6217180f9ab8c61320ea3826591960415779282e<br>
> cmdutil: warnings not issued in cat if subrepopath overlaps<br>
><br>
> Previously a subrepository "sub" would cause no warnings to<br>
> be issued for a file "subnot/a", if it's not present in the<br>
> corresponding changeset when calling:<br>
><br>
> hg cat subnot/a<br>
><br>
> diff -r 6217180f9ab8 -r 1cb0ce20c615 mercurial/cmdutil.py<br>
> --- a/mercurial/cmdutil.py    Mon Jul 25 12:59:52 2016 +0800<br>
> +++ b/mercurial/cmdutil.py    Wed Jul 27 08:38:54 2016 +0000<br>
> @@ -2584,7 +2584,7 @@<br>
>      # Don't warn about "missing" files that are really in subrepos<br>
>      def badfn(path, msg):<br>
>          for subpath in ctx.substate:<br>
> -            if path.startswith(subpath):<br>
> +            if path.startswith(subpath + '/'):<br>
<br>
</span>Should we use os.path.sep here?<br>
<div class="HOEnZb"><div class="h5"><br>
>                  return<br>
>          matcher.bad(path, msg)<br>
><br>
> diff -r 6217180f9ab8 -r 1cb0ce20c615 tests/test-subrepo.t<br>
> --- a/tests/test-subrepo.t    Mon Jul 25 12:59:52 2016 +0800<br>
> +++ b/tests/test-subrepo.t    Wed Jul 27 08:38:54 2016 +0000<br>
> @@ -60,6 +60,9 @@<br>
>    $ hg remove -S snot/file<br>
>    not removing snot/file: file is untracked<br>
>    [1]<br>
> +  $ hg cat snot/filenot<br>
> +  snot/filenot: no such file in rev 7cf8cfea66e4<br>
> +  [1]<br>
>    $ rm -r snot<br>
><br>
>  Revert subrepo and test subrepo fileset keyword:<br>
</div></div></blockquote></div><br></div>