[Differential] [Commented On] D59: sparse: override dirstate.walk() instead of dirstate._ignore
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Jul 12 11:52:02 EDT 2017
martinvonz added a comment.
In https://phab.mercurial-scm.org/D59#733, @dsp wrote:
> -1 on this.
>
> I feel this can lead to confusing behavior for users and require too much understanding of the underlying behaviors. See the following example
>
> 1. create a sparse profile ``` [include] foo/ [exclude] ```
> 2. create directory bar/ and file bar/test
> 3. `hg status` returns an empty set.
That's true before and after this patch.
> My understanding from basic testing is that in the old behavior, bar/test would be returned as 'Ignored'.
Ignored files are not included in the output of "hg status" by default. You need to pass -i or -A to see them. I think it's very rare to use those (I'm not sure I ever have outside of testing).
> I think the overall idea is good, but we might want to sort out a better user behavior (maybe introducing a new state?) before we are changing behavior.
As I said in the commit message, I think presenting these files as ignored is wrong. It seems better to treat them as untracked, so they always show up. I agree that treating them as neither (not listing them at all) seems even worse, but it's a pretty small regression IMO. Adding support for another type of status (the one for files outside the sparse checkout) is a much bigger task that I don't feel like I have time for right now.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D59
EMAIL PREFERENCES
https://phab.mercurial-scm.org/settings/panel/emailpreferences/
To: martinvonz
Cc: dsp, mercurial-devel
More information about the Mercurial-devel
mailing list