Tue, 19 May 2015 07:17:57 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 19 May 2015 07:17:57 -0500] rev 25195
merge with stable
Sun, 17 May 2015 22:09:37 -0400 match: explicitly naming a subrepo implies always() for the submatcher stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 May 2015 22:09:37 -0400] rev 25194
match: explicitly naming a subrepo implies always() for the submatcher The files command supports naming directories to limit the output to children of that directory, and it also supports -S to force recursion into a subrepo. But previously, using -S and naming a subrepo caused nothing to be output. The reason was narrowmatcher() strips the current subrepo path off of each file, which would leave an empty list if only the subrepo was named. When matching on workingctx, dirstate.matches() would see the submatcher is not always(), so it returned the list of files in dmap for each file in the matcher- namely, an empty list. If a directory in a subrepo was named, the output was as expected, so this was inconsistent. The 'not anypats()' check is enforced by an existing test around line 140: $ hg remove -I 're:.*.txt' sub1 Without the check, this removed all of the files in the subrepo.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip