[darcs-devel] [patch515] resolve issue1350: reliable patch transport

Gabriel Kerneis bugs at darcs.net
Sun Dec 19 22:18:56 UTC 2010


New submission from Gabriel Kerneis <kerneis at pps.jussieu.fr>:

[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 at 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.

----------
files: resolve-issue1350_-reliable-patch-transport.dpatch.gz, unnamed, unnamed
messages: 13391
nosy: kerneis
status: needs-review
title: resolve issue1350: reliable patch transport

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch515>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: text/x-darcs-patch
Size: 2296 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20101219/2e014570/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolve-issue1350_-reliable-patch-transport.dpatch.gz
Type: application/x-darcs-patch
Size: 101209 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20101219/2e014570/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20101219/2e014570/attachment-0001.obj>


More information about the darcs-devel mailing list