Here's a patch showing a test case that passes: diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t --- a/tests/test-commit-interactive-curses.t +++ b/tests/test-commit-interactive-curses.t @@ -214,6 +214,16 @@ Amend option works @@ -0,0 +1,1 @@ +hello world +Make file empty + $ echo -n > x + $ cat <<EOF >testModeCommands + > X + > EOF + $ hg ci -i -m emptify -d "0 0" + abort: bad hunk #1 + [255] + $ hg revert x + Editing a hunk puts you back on that hunk when done editing (issue5041) To do that, we change two lines in a file, pretend to edit the second line, exit, toggle the line selected at the end of the edit and commit.
Fixed by https://mercurial-scm.org/repo/hg/rev/03350f5234a4 Jun Wu <quark@fb.com> crecord: fix line number in hunk header (issue5917) `@@ -1,1 +-1,0 @@` is not a valid patch hunk header. Change it to `@@ -1,1 +0,0 @@`. Differential Revision: https://phab.mercurial-scm.org/D3737 (please test the fix)
Bug was set to TESTING for 7 days, resolving