Hi Mark,

On 8/22/16 2:06 PM, Mark Phippard wrote:
On Mon, Aug 22, 2016 at 2:11 PM, Eric Johnson <e...@tibco.com <mailto:e...@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.

Eric.

--
Thanks

Mark Phippard
http://markphip.blogspot.com/

Reply via email to