D422: mdiff: add a --ignore-space-at-eol option

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sun Aug 27 07:01:57 EDT 2017


yuja requested changes to this revision.
yuja added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> mdiff.py:102
> +    if opts.ignorewseol:
> +        text = re.sub(r'\s+\n', r'\n', text)
>      return text

This matches empty lines because `\s` includes `\n`.
Perhaps it should be `r'[ \t\r]+\n'`.

Can you add a test for this bug?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D422

To: dsp, #hg-reviewers, quark, yuja
Cc: yuja, morisgi, akushner, martinvonz, quark, mercurial-devel


More information about the Mercurial-devel mailing list