D6848: narrow: add option for automatically removing unused includes

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Sep 13 20:54:30 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> rdamazio wrote in test-narrow.t:457
> > That's just about the working directory, right? This file is unchanged in the working directory at the time of hg tracked --auto-remove-includes...
> 
> No, I meant what if you don't get rid of the .i files.
> But you raise a good point - shouldn't you also clean up the working directory?
> 
> Alternatively, or in addition, maybe a confirmation prompt pointing out which commits and narrowspec entries will be dropped may be useful.

> No, I meant what if you don't get rid of the .i files.

This is not changing which .i files we get rid of; the behavior should be the same as if you had typed `hg tracked --removeinclude path:d0 --removeinclude path:d2`.

> But you raise a good point - shouldn't you also clean up the working directory?

Yes, it should be, but it doesn't print those files if they were clean. I've added a call to `hg files` to the test so you can see that they are cleaned up.

> Alternatively, or in addition, maybe a confirmation prompt pointing out which commits and
> narrowspec entries will be dropped may be useful.

I considered that but I wasn't sure if it would be more annoying than helpful. Want me to add that?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6848/new/

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

To: martinvonz, durin42, #hg-reviewers
Cc: rdamazio, mercurial-devel


More information about the Mercurial-devel mailing list