[MERGE REVIEW] Tweaks to bundle merging
Alexander Belchenko
bialix at ukr.net
Wed Jun 7 05:35:41 BST 2006
Aaron Bentley пишет:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexander Belchenko wrote:
>> Aaron Bentley пишет:
>>> Alexander Belchenko has recently experienced problems because bzr merge
>>> conflates malformed bundles and not-a-bundle situations.
>
>> Actually my problem arise because of line-endings problem:
>
> There were multiple problems. You didn't get good diagnostics because
> of the conflation of BadBundle and NotABundle
Yes it is.
> BundleReadder
>> expect to see LF-only line-endings but instead got CRLF. During merge
>> there is MailformedBundle error raised and after then merge switch to
>> interpret bundle filepath as merge-branch location.
>
> We've been talking about this. The solution we're leading toward is
> forcing the output to contain LF only.
Probably I miss this discussion. But in fact bundle command never
generate valid bundle on windows if you emit them to stdout. Because
sys.stdout is file-like stream opened in text-mode, so it make automatic
conversion LF -> CRLF during execution of write('\n'). I send patch
yesterday to allow write bundle directly to file.
But probably it is not 100% guaranteed of solving problem with
line-endings because when I send bundle file as attachment and receiver
save attachment to the disk, then actual line-endings may be again
switched to CRLF because of mailer program implementation. At least my
Mozilla Thunderbird do this, probably because it interpret attachment as
text file, not binary file.
I start to think that optionally generating fully binary bundle file
(e.g. compressed as gzip or zip) is more robust solution.
--
Alexander
More information about the bazaar
mailing list