diff -r dcfdf4d09663 -r da07367d683b mercurial/patch.py --- a/mercurial/patch.py Fri Aug 25 11:20:34 2017 -0700 +++ b/mercurial/patch.py Tue Aug 29 18:20:50 2017 -0700 @@ -2282,6 +2282,7 @@ 'ignorewsamount') buildopts['ignoreblanklines'] = get('ignore_blank_lines', 'ignoreblanklines') + buildopts['ignorewseol'] = get('ignore_space_at_eol', 'ignorewseol') if formatchanging: buildopts['text'] = opts and opts.get('text') binary = None if opts is None else opts.get('binary')