[cc: darcs-users for UI feedback]
Hi,
I spent a few hours trying to solve issue1350 (more reliable transport
for patches).
The main issue with current "darcs send" format is that patches are sent
as "text/x-darcs-patch", but MTA/MUA might have trouble decoding them
because no charset is specified (which defaults to us-ascii, RFC 2046).
Note that it is impossible to find a proper charset since different
files touched by a single bundle might use different encodings.
This patch solves the issue by attaching bundles as "application/
x-darcs-patch". To keep patches easy to review, it keeps a (stripped-
down) copy of the patch as text/x-darcs-patch. Of course, if the patch
contains non-ascii characters, they will be rendered randomly, but it is
not an issue anymore since the full patch will be preserved and used by
darcs apply.
This patch is backward-compatible with older darcs releases. For
instance, I used it to send this email: you can apply it directly
(against screened) with any darcs 2.x release (please try and let me
know if it fails).
Issue 1350 suggests that we compress the attached bundle. I did not
follow this path because it would break backward-compatibility. Ian
told me that I could use _darcs/format and add a "send-gzip-format" but
I have no idea how to do that in practice, and I think it is far more
important to ensure reliable transport, even towards older repositories.
[ Note that issue 1427 (resolved in 2.5) allows you to apply gzipped
bundles, but it does not accept gzipped inside a MIME section (only a
fully-gzipped input). ]
Please tell me if you like this new format (just look at this email!)
and how it could be improved to make it into the next darcs release.
Best regards,
Gabriel
1 patch for repository http://darcs.net/screened:
Sun Dec 19 22:42:19 CET 2010 Gabriel Kerneis <kerneis@pps.jussieu.fr>
* resolve issue1350: reliable patch transport
Note that this patch does not compress attached patches, for the sake
of backward-compatibility. But it does resolve the points of issue1350:
hide context when reviewing a patch and ensure a reliable transport with
application/x-darcs-patch instead of text/x-darcs-patch.
Attachments
|