views:

248

answers:

2

hg clean does not seem to exist, which kinda bothers me. Is this a feature that Mercurial doesn't have or did they just name it differently?

+1  A: 

I don't use git for my repository management. However, if I were to guess, I think hg purge might be what you are seeking.

Shane Holloway
+8  A: 

There is no equivalent to git clean in the core Mercurial package.

However, the hg purge extension does what you are after.

There is an open issue to make this extension part of the core package.

Tim Henigan
The extension wiki page says "This extension is currently being distributed along with Mercurial.". I've had it installed since it was published .. I'm not sure _what_ version has or (will) introduce it.
Tim Post
Based on the issue tracker, it sounds like the feature was removed in v1.1.2 because "people that play with hg purge can delete files that they need". The issue was last updated in May 2009, so it has gotten stale. I would certainly vote to put it back in.
Tim Henigan
1.1.2 ships it, not sure about previous versions.
Tim Post
Why not make `-n` the default, and require `-f` to actually delete files, like `git clean` does from some time?
Jakub Narębski
And why not make it restricted to the current directory and below like `git clean`? I got a nasty surprise the first time I ran `hg purge`.
Sharpie