[PATCH 1 of 2] tests: unify test-patchbomb

Matt Mackall mpm at selenic.com
Tue Aug 17 14:10:59 UTC 2010


On Tue, 2010-08-17 at 13:40 +0100, Christian Ebert wrote:
> * Martin Geisler on Tuesday, August 17, 2010 at 14:05:46 +0200
> > Christian Ebert <blacktrash at gmx.net> writes:
> >> Well, the test in question is about non-utf-8:
> >> 
> >> iso-8859-1 patch:
> >>  $ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
> >>  $ hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
> >>  adding isolatin
> > 
> > Yes, I know that. I know it's very practical and useful that we just
> > pour the bytes into a mail and ship it off, even when the encoding is
> > inconsistent in those bytes.
> 
> Well, the charset declaration of all patchbombs that contain
> stuff that does not fit into ascii or utf-8 is just wrong.
> 
> That's why I was looking (in vain at the time) to implment
> something like application/binary.

That'd completely negate the value of inlining the patch in the first
place.

> > I'm just saying that I'm not sure it's correct to do so. We had a recent
> > bug report from Dan about not being able to send a patch that changed
> > line-endings. I think this is the same kind of problem.

Again, that's the fault of some particular dumb MUA (Gmail in that case,
which is already notoriously bad for handling patches). This works just
fine on mailers that have the courtesy to give you your mail as it is,
not as they think it should be.

If people want to sacrifice the utility of inlining patches for flawless
transmission, we have several options for that already.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list