diff -r b6de372b4309 -r d3286dd2ca2f mercurial/mdiff.py --- a/mercurial/mdiff.py Thu Apr 05 17:15:52 2018 +0530 +++ b/mercurial/mdiff.py Thu Apr 05 17:29:32 2018 +0530 @@ -97,7 +97,7 @@ if blank and opts.ignoreblanklines: text = re.sub('\n+', '\n', text).strip('\n') if opts.ignorewseol: - text = re.sub(br'[ \t\r\f]+\n', r'\n', text) + text = re.sub(br'[ \t\r\f]+\n', br'\n', text) return text def splitblock(base1, lines1, base2, lines2, opts):