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

Re: svn commit: r1033709 - /subversion/tests/cmdline/patch_tests.py

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 17 Feb 2011 22:45:30 +0100

On Thu, Feb 17, 2011 at 04:37:11PM -0500, Paul Burba wrote:
> On Tue, Feb 15, 2011 at 12:04 AM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> > Paul Burba wrote on Mon, Feb 14, 2011 at 17:36:43 -0500:
> >> 2011/2/10 Branko Čibej <brane_at_e-reka.si>:
> >> > On 10.02.2011 20:25, Paul Burba wrote:
> >> >>> Author: danielsh
> >> >>> Date: Wed Nov 10 21:02:46 2010
> >> >>> New Revision: 1033709
> >> >>>
> >> >>> URL: http://svn.apache.org/viewvc?rev=1033709&view=rev
> >> >>> Log:
> >> >>> Add a regression test for 'svn patch' setting properties without
> >> >>> trailing newlines.  This could be useful, for example, to transmit
> >> >>> 'svn:eol-style' properties via 'svn patch' without appending a newline
> >> >>> to the property value en route.
> >> >> Hi Daniel,
> >> >>
> >> >> This test seems to be checking if 'svn patch' can apply a property
> >> >> value with no trailing newline, but is there even a way to represent
> >> >> such a property in the unidiff format?
> >> >>
> >> >> Your test creates this patch:
> >> >>
> >> >> [[[
> >> >> Index: .
> >> >> ===================================================================
> >> >> diff --git a/subversion/branches/1.6.x b/subversion/branches/1.6.x
> >> >> --- a/subversion/branches/1.6.x       (revision 1033278)
> >> >> +++ b/subversion/branches/1.6.x       (working copy)
> >> >>
> >> >> Property changes on: subversion/branches/1.6.x
> >> >> ___________________________________________________________________
> >> >> Modified: svn:mergeinfo
> >> >>    Merged /subversion/trunk:r964349
> >> >> Added: k
> >> >> ## -0,0 +1 ##
> >> >> +v
> >> >> \ No newline at end of property
> >> >> ]]]
> >> >>
> >> >> But what is '\ No newline at end of property'?  Is that standard?  I'm
> >> >> only familiar with the special line '\ No newline at end of file'.
> >> >
> >> > The magical token is the \ at the beginning of the line. The rest of the
> >> > line can be random text as far as patch is concerned, and indeed,
> >> > translations will localize that text.
> >>
> >> Hi Brane,
> >>
> >> Thanks for the info.  I was under the impression that '\ No newline at
> >> end of file' was special:
> >> http://en.wikipedia.org/wiki/Diff#Unified_format ... but I hear you
> >> can't believe everything you read on the Internet ;-)
> >>
> >> Regardless, my original question for Daniel still holds:
> >>
> >>   This test seems to be checking if 'svn patch' can apply a property
> >>   value with no trailing newline, but is there even a way to represent
> >>   such a property in the unidiff format?
> >>
> >
> > 'patch' can create a file with one line and no trailing newline by using
> > the \ syntax; I assume the same syntax (save for s/@@/##/g) would work
> > for properties.
>
> Is this something that should be addressed before 1.7?

I don't think so.
We can address it in a patch release if necessary.
Received on 2011-02-17 22:46:14 CET

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.