darcs

Issue 1335 can't apply patch bundles which lose indentation (eg, copied from Apple Mail message pane)

Title can't apply patch bundles which lose indentation (eg, copied from Apple Mail message pane)
Priority not-our-bug Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur
Assigned To
Topics

Created on 2009-01-29.03:58:22 by simon, last changed 2010-08-19.09:22:04 by kowey.

Messages
msg7243 (view) Author: simon Date: 2009-01-29.03:58:19
I received a patch, made with darcs 2.x against a darcs 2 repo, which I can't
apply. http://paste.lisp.org/display/74454/raw shows the patch. 

The error message is "darcs failed:  Malformed patch bundle:
'[rating_plone3_1_7.patch' is not 'Context:'". 

darcs was able to apply the patch when I removed the third and subsequent lines
within the brackets after New patches: (and therefore removed the patch hash at
the end). Ie the edited patch looked like::

 New patches:

 [rating_plone3_1_7.patch
 Juan M. Méndez <vejeta@gmail.com>**20090128164524
 ] hunk ./plugins/rating/rating.py 96
 etc.

I don't know if this is related to issue661, issue1255 etc.
msg7245 (view) Author: kowey Date: 2009-01-29.09:10:27
On Thu, Jan 29, 2009 at 03:58:23 -0000, Simon Michael wrote:
>  Juan M. Méndez <vejeta@gmail.com>**20090128164524

Sounds like it's encodings related, somebody somewhere thinking that a
UTF-8 encoded document is in ISO-8859-{1,15}
msg7248 (view) Author: simon Date: 2009-01-29.17:11:53
I thought the same, but converting the patch to ascii made no  
difference; removing the three lines is what made it apply.
msg7267 (view) Author: simon Date: 2009-02-03.20:17:13
Updating the subject and priority of this, I think darcs apply basically fails
to parse a patch bundle containing a patch with a long description.
msg7278 (view) Author: simon Date: 2009-02-06.23:31:57
Happily this is not (directly) a darcs issue. The patch bundle was indeed
corrupted: some indentation had been removed. 

Apple Mail displays patch bundles without the indentation (and it's only a
little indentation, so you might not notice.) So copying from the message pane
into a dpatch file doesn't work. This is a problem for Mail users, as I can't
see any other way for them to extract a darcs patch received by mail. Viewing
the message source is no good, because it's quoted-printable-encoded. But that's
a separate issue.
msg7279 (view) Author: simon Date: 2009-02-06.23:47:49
Nb, only some indentation is removed. In particular, the single space  
indent in patch headers, between [ and ].
msg7280 (view) Author: kowey Date: 2009-02-07.07:38:08
On Fri, Feb 06, 2009 at 23:32:02 -0000, Simon Michael wrote:
> Apple Mail displays patch bundles without the indentation (and it's only a
> little indentation, so you might not notice.) So copying from the message pane
> into a dpatch file doesn't work. This is a problem for Mail users, as I can't
> see any other way for them to extract a darcs patch received by mail. Viewing
> the message source is no good, because it's quoted-printable-encoded. But that's
> a separate issue.

FAQ-worthy?
msg12219 (view) Author: simon Date: 2010-08-18.13:02:16
It might be nice to be more robust about whitespace between the brackets. 
I've changed priority to wishlist.
msg12228 (view) Author: kowey Date: 2010-08-19.09:22:02
Simon, please file a new ticket for the separate wishlist feature 
request and reference this one.

BTS training: it's not always easy to tell if you should keep things on 
the same ticket (because you're fundamentally tracking the same thing), 
or because you're talking about separate issues.  Here I've basically 
made a snap decision that the failure to apply from Apple mail copy and 
paste is separate from the robust handling of whitespace (on reflection, 
I guess since the latter is a more general issue which causes the 
former).  Such snap decisions may end up being wrong, but what else are 
you going to do, oh Future Issue Manager, deliberate?  Gotta have high 
throughput.
History
Date User Action Args
2009-01-29 03:58:22simoncreate
2009-01-29 09:10:30koweysetstatus: unread -> unknown
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7245
2009-01-29 17:11:55simonsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7248
2009-02-03 20:17:16simonsetpriority: bug -> urgent
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7267
title: darcs apply giving "Malformed patch bundle" -> darcs apply gives "Malformed patch bundle" when there is a long description
2009-02-06 23:32:02simonsetstatus: unknown -> wont-fix
nosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7278
2009-02-06 23:47:52simonsetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7279
2009-02-07 07:38:12koweysetnosy: kowey, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7280
2009-08-25 17:40:10adminsetnosy: + darcs-devel, - simon
2009-08-27 14:15:33adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin
2010-08-18 13:02:18simonsetpriority: urgent -> wishlist
messages: + msg12219
title: darcs apply gives "Malformed patch bundle" when there is a long description -> can't apply patch bundles which lose indentation (eg, copied from Apple Mail message pane)
2010-08-19 09:22:04koweysetpriority: wishlist -> not-our-bug
messages: + msg12228