[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: A patch that erroneus causes a text conflict

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Fri, 23 Jul 2010 16:33:59 +0200

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
> > > matkin_at_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/mu_at_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
> matkin_at_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 new_at_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
> matkin_at_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
> matkin_at_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
Received on 2010-07-23 16:35:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.