MQ patch doesn't preserve CR-only newline at end-of-file
Created originally on Bitbucket by afriza (Afriza N. Arief)
In MQ, when imported changesets contain files that have CR only as newline:
- newline at the end of file is not preserved after popping and pushing
- "Merge rejected patch chunks into ..." window removes first character of second line onwards
- the mq patch generated is not optimal which easily cause rejects (still finding way to reproduce in simple way). basically, the resulting mq patch says that almost everything is removed and then added back although the change is just a few lines.
Steps: using the attached repo,
- clone attached bundle
- cd to repo
- hg qpop --all
- hg qpush # cr-newline.txt will be missing cr-newline at end of file
- edit file and add the newline back at end-of-file cr-newline.txt
- hg qrefresh
- apply patch using THG workbench
- click yes to edit patched file together with rejects
- in the "Merge rejected patch chunks into ..." window, the rejected chunk is missing first character from the second line onwards.
Attachments: hg-CR-only_0_and_descendants.hg