[Differential] [Commented On] D59: sparse: override dirstate.walk() instead of dirstate._ignore

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Jul 12 13:24:15 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> durham wrote in sparse.py:224
> Do we know if the ignore wrapper was ever accessed outside of the walk? It might be worth hacking in a temporary message that prints if the ignorewrapper is called while walk is not in the traceback, then run the tests to see if it's ever hit.

Good idea to check that. Turns out that _ignore is accessed not only from walk(). Here's where else:

1. dirstate.status()

This is to make decide whether to report a file not in the dirstate as ignored or untracked. Since the input is the list of walked files, it won't make a difference whether files outside sparse config are in the ignore matcher or not.

2. merge._checkunknownfiles()

If I'm reading this right, the difference here is just whether merge.checkignored or merge.checkunknown config options will be used for the affected files. I'd say this is probably a (tiny) change for the better: if I have turned on merge.checkunknown but not merge.checkignored, it might be because I have tools that generate the ignored files and I can regenerate them, but unknown files can not be regenerated. I'm not sure that's why one normally would set those values differently, though.

3. hgignore() fileset

Not much to say about this. Will obviously change as expected.

4. debugignore command

Same as 3.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D59

EMAIL PREFERENCES
  https://phab.mercurial-scm.org/settings/panel/emailpreferences/

To: martinvonz, #hg
Cc: durham, dsp, mercurial-devel


More information about the Mercurial-devel mailing list