conflict markers at end of file without newline
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
When displaying conflicts at the end of a file, and some of the presented chunks do not have a final newline, bzr produces a surprising format. Real life example:
<<<<<<< TREE
>>> sorted([bug.id for bug in branch.
[1, 4, 5]||||||| BASE-REVISION
>>> [bug.id for bug in branch.
[1]=======
>>> [bug.id for bug in branch.
[1]
>>>>>>> MERGE-SOURCE
It would be much more readable (and would be better handled by tools like emacs smerge-mode) if the tree and base-revision hunks had a newline appended so the "|||||||" and "=======" would be at line starts.
These lines could be decorated to preserve the "no newline information". I propose:
<<<<<<< TREE
>>> sorted([bug.id for bug in branch.
[1, 4, 5]
||||||| BASE-REVISION \ No newline at end of file
>>> [bug.id for bug in branch.
[1]
======= \ No newline at end of file
>>> [bug.id for bug in branch.
[1]
>>>>>>> MERGE-SOURCE
Still a bug in bzr.dev today.
This behaviour is consistent with CVS, but adding the newline would probably be better. As a compromise we could show
<<<<<<< THIS [no eol]