[PATCH 4 of 4] ignore: use 'include:' rules instead of custom syntax

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue May 19 17:21:26 CDT 2015



On 05/19/2015 04:33 PM, Durham Goode wrote:
>
>
> On 5/19/15, 2:31 PM, "Matt Mackall" <mpm at selenic.com> wrote:
>
>> On Mon, 2015-05-18 at 17:23 -0700, Durham Goode wrote:
>>> # HG changeset patch
>>> # User Durham Goode <durham at fb.com>
>>> # Date 1431817582 25200
>>> #      Sat May 16 16:06:22 2015 -0700
>>> # Node ID dab388963ec2fbffea8cc7d929ad0a45defeafd7
>>> # Parent  b7160d16c7b38d38236bbfb2ec075909e361f515
>>> ignore: use 'include:' rules instead of custom syntax
>>>
>>> Now that the matcher supports 'include:' rules, let's change the
>>> dirstate.ignore
>>> creation to just create a matcher with a bunch of includes. This allows
>>> us to
>>> completely delete ignore.py.
>>>
>>> I moved some of the syntax documentation over to readpatternfile in
>>> match.py so
>>> we don't lose it.
>>
>> Thanks, these are queued for default. Can I get you to take a look at
>> help/patterns.txt? Also, do you still intend to add a relinclude?
>
> Yes, the relinclude series is ready (only 3 patches) and will be sent once
> I see the include stuff pushed.  I'll do a pass over patterns.txt too.

I think we are getting the name backward here.

On the command line pattern, we have glob ≠ relglob. But in the ignore 
file we have glob = relglob. On similar topic 're' ≠ 'relre' on the 
command line but 're' = 'relre:' in .hgignore

I think the default case for include is going to be 'relinclude:' and I 
do not see much usage for 'include:' on the command line.

My quickly-drafted proposal would be:

1) has a 'absglob:' and 'absre:' in .hgignore that behave as 'glob:' and 
're:' that behave as on the command line.
2) rename current 'include:' to 'absinclude:'
3) have 'include:' == 'relinclude:' in .hgignore

(1, can remains a goal with no current implementation of course)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list