conflicts on the last line of a file with no newline formatted wrongly

Bug #249077 reported by Robert Collins
2
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

A conflict on the last line of a file with no newlines are formatted badly:
--
Foo\n
bar
--

conflicting with
--
Foo\n
bar\n
--
gave
--
Foo\n
<<<<<<\n
bar======\n
bar\n
>>>>>>\n
--

Not sure if we can do anything about this, but it seems desirable to have the === always against the left...

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 249077] [NEW] conflicts on the last line of a file with no newline formatted wrongly

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
| Public bug reported:
|
| A conflict on the last line of a file with no newlines are formatted
badly:
| --
| Foo\n
| bar
| --
|
| conflicting with
| --
| Foo\n
| bar\n
| --
| gave
| --
| Foo\n
| <<<<<<\n
| bar======\n
| bar\n
|>>>>>> \n
| --
|
| Not sure if we can do anything about this, but it seems desirable to
| have the === always against the left...
|
| ** Affects: bzr
| Importance: Undecided
| Status: New
|

I think we had this reported in the past.

For the moment, it is the same as other systems like CVS.
One possibility is to do:
<<<<<<< TREE
bar\n
\\No trailing newline
=======\n
bar\n
|>>>>>> MERGE_SOURCE

That is somewhat less that fully desirable, but it might be better than

bar=======\n

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh+DSAACgkQJdeBCYSNAANlAwCeNh08uOsg51gahQniFfYNGlEy
/b8AoLpS+fH4vYjIahHjW39JQm8gVsEg
=/i+S
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
| Public bug reported:
|
| A conflict on the last line of a file with no newlines are formatted
badly:
| --
| Foo\n
| bar
| --
|
| conflicting with
| --
| Foo\n
| bar\n
| --
| gave
| --
| Foo\n
| <<<<<<\n
| bar======\n
| bar\n
|>>>>>> \n
| --
|
| Not sure if we can do anything about this, but it seems desirable to
| have the === always against the left...

I should mention that we have 'bzr diff' do:
=== modified file 'foo'
- --- foo 2008-07-16 15:01:36 +0000
+++ foo 2008-07-16 15:01:48 +0000
@@ -1,2 +1,2 @@
~ foo
- -bar
\ No newline at end of file
+bar

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh+DYsACgkQJdeBCYSNAAPY3ACfRAwBBIFX9ZbBpSvS2NWy8EEo
GeIAn2DX7h/n3wHpnYtH1GTuKeuCoItm
=InuI
-----END PGP SIGNATURE-----

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.