[darcs-users] compress patch bundles for more reliable transport ?

Dan Pascu dan at ag-projects.com
Mon Feb 9 01:07:35 UTC 2009


On Sunday 08 February 2009, Simon Michael wrote:
> There are many non-obvious ways for a patch received by email to get
> corrupted as you extract it. Whitespace and encoding are important,
> and darcs apply's error messages are unhelpful (separate issue). In
> fact applying patches from contributors is the bane of my life, and
> this should not be, we want this to just work without requiring
> expertise. Gwern suggested gzipping patch bundles, and I suggested
> including the plain text as well  (because being able to see the patch
> immediately is very useful for patch review.)
>
> So, it seems right now a sent patch mail has a text/plain part
> containing just the comment, and a text/x-darcs-patch part containing
> the patch with context (I may oversimplify.)
>
> What if we: gzip the x-darcs-patch part, and also include just the
> patch but not the context in the text/plain part, for human readers.
> Also, darcs apply would accept gzipped patch bundles. I think this
> could make patch-accepting more robust and no harder. It would also do
> away with the visual noise cause by having the context always
> included, and would reduce the size of darcs patch emails quite a bit.
>
> Sent to the list as well as the bugtracker to get wider feedback.

+1. I think this is a very good idea.

I agree that the visual noise from the context can be distracting. I also 
think that for reviewing purposes, a unified diff is easier to read by a 
person, than the darcs native diff format (it offers more context around 
the change and thus it helps one to understand the change better and spot 
problems easier). So maybe darcs send could include the gziped darcs 
patch in its native format (this will be used to be applied) and a 
unified diff for reviewwing purposes (the presence of this could be 
controlled by a command line option).

-- 
Dan


More information about the darcs-users mailing list