Commit Graph

1 Commits

Author SHA1 Message Date
Muir Manders
db5d2b1b86 revert: fix interactive "no EOF newline" handling
Summary:
When using curses during interactive revert, we now properly handle the transition to or from having no newline at the end of file. We do this by peeking ahead one line and trimming the apparent newline if the next line is "No newline at end of file".

This is motivated by upstream https://phab.mercurial-scm.org/D8762, but that test didn't exercise the bug for me, and the code change didn't work properly when reverting back to the no-newline case.

Reviewed By: quark-zju

Differential Revision: D33541600

fbshipit-source-id: 6e605fe2f6017baad0aa8232313a209f68fc871c
2022-01-14 15:44:52 -08:00