Comment 3 for bug 433779

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 433779] Re: 2.0.0rc2: error: Invalid value for commit message

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

Oscar Fuentes wrote:
> I'm using VC on emacs 23.1.50.1. The \r\n line endings on the traceback
> persist even when I set the buffer encoding to utf-8-unix or
> windos1252-unix.
>
> \r\n is the line ending native to Windows. Usually, text editors and
> IDEs use it. It would be a good thing for bzr to accept log messages
> with embedded \r\n on Windows.
>

My question is in how it gets introduced into the system.

If you are doing "bzr commit -F filename.log" we open that file in text
mode, so it will automatically translate \r\n => \n.

If you are doing a bare "bzr commit" and we are launching emacs as the
editor, then we use:
        f = file(msgfilename, 'rU')

Which *also* translates the line endings.

Now potentially if you were using:

 "bzr commit -m "argument\r\nwith\r\nnewlines"
we may not be translating them from the command line.

Alternatively, if the emacs interface is manually calling
"tree.commit()" it might be passing things in differently.

I'm trying to track down what path these text is being inserted, so that
we can sort out why they aren't getting translated like they do with all
the other paths.

John
=:->

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

iEYEARECAAYFAkq3lDAACgkQJdeBCYSNAAOMhgCfS1iEOApwunaQ69D54NTjyRJr
XpsAn24Wt/Q2iZE8mLFGzr9D9wDV1USt
=O3r5
-----END PGP SIGNATURE-----