I agree with Yuya (and apparently with former me; thanks for digging that up, Matt). I think it's just an unintended consequence of how the dirstate walk works, but I'm not sure. The exception for explicit files also bothered me when I was working on the matcher code a year or so ago. I actually added the exception to the matcher code because I thought it was always working like that (not just for dirstate) in a83a7d27911e (match: handle excludes using new differencematcher, 2017-05-16). It was only recently that Yuya realized that it used to be inconsistent and that I probably made it consistently bad because I didn't realize it was inconsistent to start with, see 821d8a5ab4ff (match: do not weirdly include explicit files excluded by -X option, 2018-01-16).
So I guess I just think it feels wrong to include explicit matches. I wish I could point to something that would actually crash (e.g. narrowhg), but I can't think of anything. Also, thanks for working on this, Yuya! I feel a bit guilty for never getting around to it. On Sun, Feb 11, 2018 at 12:54 PM Matt Harbison <mharbiso...@gmail.com> wrote: > On Sun, 11 Feb 2018 09:17:42 -0500, Yuya Nishihara <y...@tcha.org> wrote: > > > On Sun, 11 Feb 2018 08:58:48 -0500, Augie Fackler wrote: > >> On Sun, Feb 11, 2018 at 01:09:50PM +0900, Yuya Nishihara wrote: > >> > # HG changeset patch > >> > # User Yuya Nishihara <y...@tcha.org> > >> > # Date 1516963719 -32400 > >> > # Fri Jan 26 19:48:39 2018 +0900 > >> > # Node ID ba8846546795996af10fe93db4317b855018d749 > >> > # Parent 91aac8e6604d1aa08b2683c1d4c7d1936f226e48 > >> > dirstate: drop explicitly-specified files that shouldn't match (BC) > >> > >> Hmm. I'm not sure I like this behavior change. The current behavior is > >> consistent with how an explicitly-tracked file shows up in status even > >> if it's matched by .hgignore. > >> > >> Any particular reason to go this route? > > > > The current behavior is inconsistent with other commands, notably log and > > files. > > > > $ hg files hg -X hg > > > > Even more, it's inconsistent with status --change. > > > > $ hg status --all hg -X hg > > C hg > > $ hg status --all hg -X hg --change . > > > > So I believe it's a bug of dirsate.walk(). > > Related: https://bz.mercurial-scm.org/show_bug.cgi?id=4679 > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel >
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel