trouble with apply-changeset

Robey Pointer robey at lag.net
Sat Jul 16 05:18:05 BST 2005


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


On 10 Jul 2005, at 8:02, John A Meinel wrote:

> Robey Pointer wrote:
> ...
>
>> Also, "patch" must be called with "-l" (not included in the patch
>> below) to avoid getting confused about trailing whitespace, which   
>> many
>> mail readers (including mine, apparently) will strip out.
>>
>>
>
> This may be a bigger issue, and why the Inventory sha is failing.
> Because if your mailing is stripping off whitespace in attachments,  
> then
> it is changing the text.
> For instance, it is certainly possible for me to commit a file with
> something like:
>
> \tx = y
> \t
> \tx += 1
>
> (naturally \t stands for the tab character.)
>
> If your mailer strips off that intermediate "\t" then it changes the
> file. So that when I apply the cset, it will not generate exactly the
> same text. And that is forbidden.

I was going to reply to this with a patch, but days have passed  
without me finding time, so I'm going to reply anyway. :)

You're right of course, the mailer munging makes the patch  
unacceptable no matter what.  What's worse, I looked at the raw  
source of the message that got munged, and even that was messed up,  
so it wasn't my mail reader but some transport along the way. : 
(  It's gonna be a real problem.

My idea for a patch was to add a "--armor" option to cset.  It would  
notice lines that end in whitespace, build a map of (whitespace text - 
 > list(line#)), and then base64 that into a metadata line at the  
bottom.  That might be too heavyweight though.  It might be best to  
just say "you should send changesets as attachments, not inline".

robey

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFC2IqCQQDkKvyJ6cMRAivgAKDAkzAZlwSWi01mUEy0A4zSvFBVdgCgnu/N
hy/Gp04ztDtRrWv1iDLodjg=
=JFqE
-----END PGP SIGNATURE-----




More information about the bazaar mailing list