darcs

Patch 515 resolve issue1350: reliable patch transport

Title resolve issue1350: reliable patch transport
Superseder Nosy List kerneis
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-12-19.22:18:56 by kerneis, last changed 2011-01-27.00:45:24 by gh.

Files
File name Status Uploaded Type Edit Remove
resolve-issue1350_-reliable-patch-transport.dpatch kerneis, 2010-12-19.22:29:29 application/x-darcs-patch
resolve-issue1350_-reliable-patch-transport.dpatch.gz kerneis, 2010-12-19.22:18:55 application/x-darcs-patch
unnamed kerneis, 2010-12-19.22:18:55 text/x-darcs-patch
unnamed kerneis, 2010-12-19.22:18:55
unnamed kerneis, 2010-12-19.22:29:29 text/x-darcs-patch
unnamed kerneis, 2010-12-19.22:29:29
See mailing list archives for discussion on individual patches.
Messages
msg13391 (view) Author: kerneis Date: 2010-12-19.22:18:55
[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
msg13392 (view) Author: kerneis Date: 2010-12-19.22:29:29
I forgot to revert a dummy .gz suffix used in previous attempts.

Sorry,
Gabriel

2 patches 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.

Sun Dec 19 23:14:40 CET 2010  Gabriel Kerneis <kerneis@pps.jussieu.fr>
  * Remove dummy .gz suffix in patch name
Attachments
History
Date User Action Args
2010-12-19 22:18:56kerneiscreate
2010-12-19 22:29:29kerneissetfiles: + unnamed, resolve-issue1350_-reliable-patch-transport.dpatch, unnamed
messages: + msg13392
2011-01-27 00:45:24ghsetstatus: needs-review -> accepted