diff -r 5414b56cfad6 -r 646759147717 mercurial/mdiff.py --- a/mercurial/mdiff.py Mon Nov 14 18:16:01 2011 +0100 +++ b/mercurial/mdiff.py Thu Nov 17 16:53:17 2011 -0600 @@ -72,7 +72,7 @@ text = re.sub('[ \t\r]+', ' ', text) text = text.replace(' \n', '\n') if blank and opts.ignoreblanklines: - text = re.sub('\n+', '', text) + text = re.sub('\n+', '\n', text).strip('\n') return text def diffline(revs, a, b, opts):