[MERGE][0.16] temp file for commit message in external editor should be opened in text mode (#110901)
John Arbash Meinel
john at arbash-meinel.com
Tue May 1 03:46:46 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> John Arbash Meinel ?8H5B:
>>> John Arbash Meinel has voted -0.
>>> Status is now: Approved
>>> Comment:
>>> Please wait before merging.
>>> I don't have time to do a full review but there is some cruft in the tests.
>>>
>>> v-- This is really ugly, and we should find a better way to wrap the lines.
>>>
>>> + msgfilename, hasinfo = bzrlib.\
>>> + msgeditor.\
>>> + _create_temp_file_with_commit_template(
>>> + 'infotext', '----', 'start message')
>
> It's for keep lines shorter than 80 chars.
> If you say it's ugly...
> I could use shorter variable names, and shorter name for function
> under test.
> And importing
>
> from bzrlib import msgeditor
>
> it's also shorten a bit.
>
>
> [µ]
I would rather go over 80 characters.
PEP8 does say "pragmatism wins".
I would probably do:
from bzrlib.msgeditor import _create_temp_file_with_commit_template
msgfilename, hasinfo = _create_temp_file_with_commit_template(
....)
That is under 72 characters, since it doesn't wrap in Thunderbird.
I actually prefer
from bzrlib import msgeditor
but that still gets a little long.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGNqoWJdeBCYSNAAMRAntzAJ95/9jQePRbKzMk44T+DG0RKr0QXgCggN4r
exhOeGfRFnX4QJhqgOtVW+w=
=KMLx
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list