views:

37

answers:

2

I have a .hgignore file that works great for hiding all the files and directories creating when compiling my C# projects.

Now when doing a "revert" to a previous revision, I would also like to clean up my working directory, ie remove all the exes and dlls that I've previously compiled (as I may end up using the wrong version of an exe or dll without realizing it).

Is there a way to do that (kind of ignoring .hgignore somehow)? Right now I'm just removing all bin and obj directories, but maybe Hg can also do it...

+5  A: 

You are looking for the purge extension.

Rudi
+2  A: 

Rudi's answer is best, but if you don't want to install an extension you can always do:

hg status -nu0 | xargs -0 rm -v

which does the same thing. (Optionally include i in the options for status to get ignored files too.

Ry4an