svndumpfilter fails with "Invalid copy source path..." error
Asked Answered
C

3

15

I want to move part of my SVN repo offsite, onto an AWS instance & am following this page (Repository Maintenance)

I have taken a dump of the whole repo (Windows commands):

  • svnadmin dump c:\repo > all_repo

Next is to filter it, to include only the project I am interested in (which is called "M1").

  • type all_repo | svndumpfilter include M1 --drop-empty-revs > m1

I know this is correct, as I have done it on some of the other projects already.


On this project, it breaks with the error indicated in the title of this post. The exact wording is:

svndumpfilter: Invalid copy source path '/Personal/Richard/M1_Config'

The process tried to write to a nonexistent pipe.

The folder that the error refers to is a configuration utility that I wrote and submitted under my personal folder, and it is not under the root/m1... folder at all. I do not want to include it in the filtered file, but do not know how to indicate this to the svn commands.

  1. How can I correctly filter for the whole M1 folder and its children, while excluding the Personal/Richard/M1_Config folder entirely?
  2. How can I be sure whether the exported file contains the correct information to correctly recreate the M1 folder on the remote SVN?
Carlocarload answered 13/2, 2012 at 13:48 Comment(0)
O
17

At some point /Personal/Richard/M1_Config has been copied to the M1 path. The error message is say that it can't perform the copy since the source has been filtered out. Check the revision that svndumpfilter complained about.

You must include the /Personal/Richard/M1_Config path even if you don't want it in the final import. You also need to include the /Personal/Richard and /Personal paths since each resides in it's parent. Your command needs to be:

type all_repo | svndumpfilter include M1 "/Personal" --drop-empty-revs > m1 

If you have other paths, say /Personal/James that aren't needed and you wish to exclude them then you can run a second svndumpfilter to strip them:

type m1 | svndumpfilter exclude "/Personal/James" --drop-empty-revs > m1_2
Obligatory answered 22/11, 2012 at 13:6 Comment(2)
Is there a sinple way to figure out witch parts have to be includet. I am working with try and error at the moment.Pyoid
You could search through the changesets and look for 'copy-from-path' that affect the path of interest. You could do this by a text search through a dump file, or perhaps with svnlook.Obligatory
M
19

I've tried at least 4 different applications to do that, the only that really worked was using svndumpfilterIN :

svnadmin dump c:\repo > all_repo
svndumpfilter.py all_repo --repo=c:\repo --output-dump=m1 include M1

Here is my full answer on linux.

Here is what I tried and didn't worked :

Mistranslate answered 5/3, 2014 at 10:13 Comment(4)
Seriously, thanks for the post. After spending a lot of time, this was the only thing that worked flawlessly.Astred
Worked well for me too.Kelula
Hi, I'm getting the "Invalid copy source..." error when specifying a pattern - in our case it's --pattern "*.config". However svndumpfilterIN doesn't support --pattern. If anyone can suggest a fruitful approach, I'd be most appreciative.Disbar
Thanks so much for that: it works perfectly and doesn't have the flaws of svndumpfilter. The dump is really lighter since the unnecessary paths are really ignored.Crystlecs
O
17

At some point /Personal/Richard/M1_Config has been copied to the M1 path. The error message is say that it can't perform the copy since the source has been filtered out. Check the revision that svndumpfilter complained about.

You must include the /Personal/Richard/M1_Config path even if you don't want it in the final import. You also need to include the /Personal/Richard and /Personal paths since each resides in it's parent. Your command needs to be:

type all_repo | svndumpfilter include M1 "/Personal" --drop-empty-revs > m1 

If you have other paths, say /Personal/James that aren't needed and you wish to exclude them then you can run a second svndumpfilter to strip them:

type m1 | svndumpfilter exclude "/Personal/James" --drop-empty-revs > m1_2
Obligatory answered 22/11, 2012 at 13:6 Comment(2)
Is there a sinple way to figure out witch parts have to be includet. I am working with try and error at the moment.Pyoid
You could search through the changesets and look for 'copy-from-path' that affect the path of interest. You could do this by a text search through a dump file, or perhaps with svnlook.Obligatory
R
5

I run into the same problem. We have many remotely moved and copied paths in the repository and the only tool that really helped was svndumpsanitizer A single file C program that easily can be compiled on cygwin or Linux and it worked like a charm on a 170 GB incremental dump file with ~160,000 commits.

Refusal answered 30/10, 2017 at 12:39 Comment(3)
Worked for me !Romina
This is really the best solution. svndumpsanitizer is what svndumpfitler should have been.Mcandrew
svndumpsanitizer worked from the first try! If anyone lacks gcc and considers a quick compile in a C++ console app in Visual Studio, svndumpsanitizer.c is easily adaptable.Mammillary

© 2022 - 2024 — McMap. All rights reserved.