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

Re: [PATCH] svnadmin load will not import dump with windows newline character in svn:mergeinfo

From: Paul Burba <ptburba_at_gmail.com>
Date: Tue, 12 May 2009 12:31:31 -0400

On Mon, May 11, 2009 at 6:20 PM, Mark Phippard <markphip_at_gmail.com> wrote:
> On Mon, May 11, 2009 at 5:01 PM, Paul Burba <ptburba_at_gmail.com> wrote:
>
>> Hi John - Do you know how the mergeinfo in r40998 was created? Was it
>> the result of a merge or a propset/propedit or something else
>> entirely? Also, can you hazard a guess as to what version of
>> Subversion (or some other client tool) was used to make it?
>>
>> If possible I'd like to figure out how the <CR> got in your repository
>> in the first place before making any fixes to dump/load.
>
> I am not sure why we are thinking this is anything special (related to
> mergeinfo). We have had many reports of people running into this
> problem for all sorts of properties.

Mark,

I hadn't realized that, I see the various threads and issue #3404
related to svnsync. But dump/load with 1.6.2 works fine if there are
"\r\n" in, say, an svn:log property...

> SVN 1.6 requires that all
> properties only have LF line endings. If you ever edited the
> properties on Windows and did not normalize the line endings yourself,
> it is just a given you are going to have this problem.
>
> We know that
> users are regularly editing svn:mergeinfo so why should we be any more
> surprised about this than we are with all of the reports for
> svn:ignore, svn:externals and/or log messages?
>
> Personally, I am not sure there was much value in suddenly making the
> server enforce this restriction when our client libraries have never
> done anything to help with this normalization. If anything, it seems
> like we should have put this in the client and let the server still
> accept the old property values.

...so if what you are saying here is to tolerate "" in a loaded dump
file, then the very simple attached patch does just that. Actually it
does more than tolerate it, it normalizes the line endings to '\n' in
the loaded repos.

Any reason not to do this? I hesitate to commit only because I've not
hacked on the svnadmin code in general, this seems like a no-brainer.

Paul

[[[
Make svnadmin load tolerate mergeinfo with "\r\n".

* subversion/libsvn_repos/load.c
  (svn_subst.h): New include.
  (renumber_mergeinfo_revs): Normalize mergeinfo line endings to '\n'.
]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2217077

Received on 2009-05-12 18:38:09 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.