Bug ID: 5652
           Summary: hg commit -i with empty file fails
           Product: Mercurial
           Version: 4.2.2
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial

I had a file with contents. I removed all of the contents but kept the file.

When I try to commit with `hg commit -i` it fails with 

abort: bad hunk #1

`hg commit -m` worked fine.

I'm using evolve and in order to reproduce this I had to ammend a changeset.


echo a > a
hg init
hg add a
hg commit -m "Add a"
hg commit --amend -m "Better message"
vi a
# Press dd to delete the line then 
# Press :x to save and exit
hg commit -i
# Leave the file checked and press c
# abort: bad hunk #1

It didn't happen if I replace `vi a` with `echo "" > a` or `echo "\n" > a`. The
file can't even have a newline in it.

You are receiving this mail because:
You are on the CC list for the bug.
Mercurial-devel mailing list

Reply via email to