( )⚙ D60 match: remove unused negatematcher

This is an archive of the discontinued Mercurial Phabricator instance.

match: remove unused negatematcher
ClosedPublic

Authored by martinvonz on Jul 11 2017, 8:01 PM.

Details

Summary

This was only used by the sparse extension's dirstate._ignore
override, which no longer exists.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Jul 11 2017, 8:01 PM
martinvonz updated this revision to Diff 130.Jul 14 2017, 2:47 AM
durham accepted this revision.Jul 14 2017, 2:09 PM

As I mentioned in IRC, this is actually important for scalability, since I think 'visitdir' has to return True for any negatematcher, since it can't know what is or isn't relevant to the underlying matcher.

In D60#1166, @durham wrote:

As I mentioned in IRC, this is actually important for scalability, since I think 'visitdir' has to return True for any negatematcher, since it can't know what is or isn't relevant to the underlying matcher.

It could actually return False if the underlying matcher returns 'all'.

I now realize that that value is poorly documented. What 'all' actually means is not just that all subdirectories should be visited, but also that all files in them match. See use in treemanifest._match(). I should fix the docstring...

durin42 accepted this revision.Jul 14 2017, 3:18 PM
This revision is now accepted and ready to land.Jul 14 2017, 3:18 PM
This revision was automatically updated to reflect the committed changes.