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

Re: Migrating old format repositories (format 4), running into bad line endings

From: Eric Johnson <eric_at_tibco.com>
Date: Mon, 22 Aug 2016 14:29:47 -0700

Hi Mark,

On 8/22/16 2:06 PM, Mark Phippard wrote:
> On Mon, Aug 22, 2016 at 2:11 PM, Eric Johnson <eric_at_tibco.com
> <mailto:eric_at_tibco.com>> wrote:
> So I wrote myself a tool to go through all commit comments, and
> verify that no "CRs" appear in the svn:log entry. If I find them,
> I rewrite the log entry. That way, I can clean up existing
> repositories.
> However, I ran into a surprise. CR characters have also snuck into
> the svn:ignore property, which is /not/ a revprop, and cannot be
> fixed by any of the tools available.
> I've seen that other people recommend editing the dump file
> directly, but that makes me quite nervous, especially on an 8MB
> dump file. Hoping there's a better way.
> Have you tried creating a new repository with the format you want and
> then use svnsync to sync the data to it? I seem to recall that
> svnsync will fix the line endings as it syncs the log entries. I
> could be wrong though because I see that svnsync has
> a --source-prop-encoding option that we added for fixing non UTF8 log
> messages. So it is possible I am confusing with that option. I would
> try it though since it is a a simple method to use.

I did just try this - svnsync does fix up the line ending problem. Even
reports a nice summary at the end of what it did. So that's promising!

So it seems like a sync-based equivalent to dump / load, in order to
migrate from one repo format to another looks something like this:

  * svnadmin create ... // create target repo
  * // enable revprop changes
  * svnsync init ...
  * svnsync sync
  * svnadmin pack
  * svnadmin verify
  * // remove revprop change script
  * // remove all the props on revision 0
  * // copy over all the hooks from the original repo
  * svnadmin setuuid ... // set the uuid of the new repository to the
    same as the old.
  * // move original repo out of the way, move new copy into position.

Is there some utility somewhere that does all of the above? I can go
change my script to use the above approach instead of dump/load, but it
is annoying....

Is there any particular reason that the "dump/load" process doesn't fix
the line-endings? Shouldn't it? Why have the --bypass-prop-validation
option? Why not just fix the line endings? As it is now, the dump-load
process is effectively broken, because I have one of two seemingly poor
choices: I can either "bypass validation" (that sounds bad), or I simply
keep the old format.

> --
> Thanks
> Mark Phippard
> http://markphip.blogspot.com/
Received on 2016-08-22 23:29:55 CEST

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