[PATCH] hgrc.5.txt: Describe the encode/decode filter semantics and the command "!"
Mads Kiilerich
mads at kiilerich.com
Thu Apr 16 04:34:55 CDT 2009
On 04/16/2009 03:18 AM, Mark Hammond wrote:
> Maybe this explains my confusion in the other thread:
>
>> --- a/doc/hgrc.5.txt
>> +++ b/doc/hgrc.5.txt
>> @@ -107,11 +107,22 @@
>> localization/canonicalization of files.
>>
>> Filters consist of a filter pattern followed by a filter command.
>> + The filter commands for all matching filter patterns are applied
>> + in an undefined order.
>
> The above implies to me that if a file matches multiple patterns, all
> patterns are applied. My understanding is that only one filter is
> applied - so the sentence above should say something closer to 'if a
> file matches multiple patterns, an arbitrary one is applied'.
>
> All of my debugging shows my interpretation to be correct - am I wrong?
No, you are right. I was (am?) wrong. Apparently it should be something
like "At most one filter is applied to each file. If multiple filters
match then it is undefined which one is chosen.".
Considering that I assume it will be ok to sort l somehow before
inserting it in self.filterpats. That will just make it well-defined
which of the matching filters are chosen.
/Mads
More information about the Mercurial-devel
mailing list