This is an archive of the discontinued Mercurial Phabricator instance.

purge: add -i flag to delete ignored files instead of untracked files
ClosedPublic

Authored by valentin.gatienbaron on Feb 8 2020, 11:00 AM.

Details

Summary

It's convenient for deleting build artifacts. Using --all instead
would delete other things too.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

marmoute accepted this revision.Feb 8 2020, 12:42 PM
marmoute added a subscriber: marmoute.

The feature is great (I actually needs it from time to time) and the code looks good.

pulkit added a subscriber: pulkit.Feb 10 2020, 11:29 AM

Nice! Looks good to me. Can you add a releasenotes entry in relnotes/next?

hgext/purge.py
51

nit: Here instead of None, False can be used to prevent passing default value later in line 110.

113

nit: it's better to have the check earlier, i.e. after line 99 on this side.

I thought it was generally preferred to have the False in the code, for extensions that want to call the function?

pulkit accepted this revision.Feb 10 2020, 12:27 PM

I thought it was generally preferred to have the False in the code, for extensions that want to call the function?

Ah, I see. Not sure we have an existing preference here.

This revision is now accepted and ready to land.Feb 10 2020, 12:27 PM