diff -r b35cf47286a6 -r eeac5e179243 mercurial/mdiff.py --- a/mercurial/mdiff.py Fri Nov 18 14:16:47 2011 +0100 +++ b/mercurial/mdiff.py Fri Nov 18 14:23:03 2011 +0100 @@ -67,10 +67,9 @@ def wsclean(opts, text, blank=True): if opts.ignorews: - text = re.sub('[ \t\r]+', '', text) + text = bdiff.fixws(text, 1) elif opts.ignorewsamount: - text = re.sub('[ \t\r]+', ' ', text) - text = text.replace(' \n', '\n') + text = bdiff.fixws(text, 0) if blank and opts.ignoreblanklines: text = re.sub('\n+', '\n', text).strip('\n') return text