views:

366

answers:

2

I am in the distinctly unfortunate circumstance of working in an environment which worries little of the deep evil known as "trailing whitespace"... But, alas, the enlightened Mercurial persists in warning me, by means of red highlights in diffs, that code I will be checking in contains this unholy thing.

So, is there any way to tell Mercurial to ignore trailing whitespace in diffs?

I've tried all the obvious --ignore-* commands, and they seem to do nothing.

Thanks!

+6  A: 

Put in your hgrc file:

[color]
diff.trailingwhitespace = none

Read more about customizing color schemes on the ColorExtension wiki page

NicDumZ
awesome, thanks a lot!
David Wolever
+1  A: 

http://mercurial.selenic.com/bts/issue127 tracks the fact that the -w option does not work as you might expect.

Jesse Glick