On Fri, Jul 23, 2010 at 04:13:44PM +0200, Stefan Sperling wrote: > On Fri, Jul 23, 2010 at 04:06:09PM +0200, Daniel Näslund wrote: > > Hi Stefan! > > > > The patch below fails to apply. I'm investigating why. > > > > Content of the file 'new': > > ----------------------------- > > [[[ > > #!/bin/sh > > IFS=@ read name address > > echo "A mail to $name at $address" > > read subject > > echo "Subject: $subject" > > > > The script is fed its input through standard input. Calling this script in > > the > > following manner (the > and $ are prompts) > > Is the patch correct? > > The following 3 lines are not in the patch: > > > > $ email <<EOT > > > mat...@docs.uu.se > > > > > Something strange @ my place > > > EOT > >
Hm, the patch was originally a diff for a property. It didn't apply there so I changed the hunk headers and tried it against a file instead. I assumed that the problem was in the patch code. When I made a fresh diff against the file, it applied cleanly. Here's a the original content for the prop and the file [[[ $ svn pg added A/m...@base #!/bin/sh IFS=@ read name address echo "A mail to $name at $address" read subject echo "Subject: $subject" The script is fed its input through standard input. Calling this script in the following manner (the > and $ are prompts) $ email <<EOT > mat...@docs.uu.se > Something strange @ my place > EOT to a shell, will produce the output A mail to matkin at docs.uu.se Subject: Something strange @ my place $ svn cat n...@base #!/bin/sh IFS=@ read name address echo "A mail to $name at $address" read subject echo "Subject: $subject" The script is fed its input through standard input. Calling this script in the following manner (the > and $ are prompts) $ email <<EOT > mat...@docs.uu.se > Something strange @ my place > EOT to a shell, will produce the output A mail to matkin at docs.uu.se Subject: Something strange @ my place ]]] They are the same when running diff(1) on them.. I've done the same changes but in the property case, the three lines you pointed out as missing are indeed missing. Strange. [[[ Index: A/mu =================================================================== --- A/mu (revision 3) +++ A/mu (arbetskopia) Egenskapsändringar för: A/mu ___________________________________________________________________ Modified: added ## -4,12 +4,7 ## read subject echo "Subject: $subject" -The script is fed its input through standard input. Calling this script in the -following manner (the > and $ are prompts) > Something strange @ my place > EOT -to a shell, will produce the output - A mail to matkin at docs.uu.se - Subject: Something strange @ my place Index: new =================================================================== --- new (revision 3) +++ new (arbetskopia) @@ -4,16 +4,11 @@ read subject echo "Subject: $subject" -The script is fed its input through standard input. Calling this script in the -following manner (the > and $ are prompts) $ email <<EOT > mat...@docs.uu.se > Something strange @ my place > EOT -to a shell, will produce the output - A mail to matkin at docs.uu.se - Subject: Something strange @ my place ]]] Cheers, Daniel