auto-detect line endings for merge

Aaron Bentley aaron.bentley at utoronto.ca
Mon Mar 12 20:03:15 GMT 2007


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

Hi all,

When Merge3 is writing out conflict markers, it always uses UNIX (LF)
newlines.  This isn't really appropriate in text files that use CRLF or
CR newlines.  Vim, for example, opens mixed files in UNIX mode, so every
 source line ends with ^M.

This patch just uses whatever newlines were used on the first line of
the THIS text, if any.  Simple, hacky, but pretty effective.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF9bID0F+nu1YWqI0RAnCYAJ0f3q4oU/c9YX9+18+YlDk/0lVsdwCfSdHG
cbMNwRzoaJynAcbzR7b/iis=
=8ob/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dos-conflicts.patch
Type: text/x-patch
Size: 3502 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070312/bce2864a/attachment.bin 


More information about the bazaar mailing list