Discussions  >  CollabNet Subversion Admins  >  Re: svndumpfilter: E200003: Invalid copy source path

Hide all messages in topic

All messages in topic

Re: svndumpfilter: E200003: Invalid copy source path Re: svndumpfilter: E200003: Invalid copy source path

Author cmpilato (OCN Member)
Full name C. Michael Pilato
Date 2014-04-18 11:14:47 PDT
Message On 04/18/2014 12:48 PM, A H wrote:
> Thank you very much for the prompt response Michael.
>
> The reason I'm looking into this is because we are going to be
> bringing some development in house that we previously contracted out
> and we would like to bring all of the history over with it. But we
> can't take their trunk too because it contains other clients.
>
> Option 3 seems to be the most promising for this. We don't really
> care much about the revision history before we were a client so if we
> could take everything from when our branch was created and beyond I
> believe that would be fine. Can you tell me how to do a dump starting
> at a certain revision?
>
> My guess would be run "svnadmin dump --incremental 60 E:\svnhome\Repo
> > Dump.dmp" and then do my filtering based on that. Will that give me
> what I need?
>
> Also, how does it work if I have spaces in the branch name? Another
> project had spaced and using quotes for the filtering didn't seem to
> work.

Assuming your branch was created in revision 60, there are a few
different routes you could take here. The simplest is to do this:

   svnadmin dump -r60:HEAD E:\svnhome\Repo > Dump.dump

You don't use the --incremental flag, because that tells svnadmin to
generate the first revision of the dump as a delta against the previous
revision in the repository. When you later try to apply that dump to a
new repository, Subversion will error out because you're trying to give
it only a delta against (what it sees as) nonexistent history.

But without the --incremental flag, understand that the first revision
of the dumpfile is going to be ginormous -- every single file and
directory in all branches present in revision 60. Revisions 61 and
beyond will be just the changes made in those revisions, then.

There's another approach that works well so long as the revision in
which your branch was created (r60 here) contained no changes except the
branch creation as a copy. If that's the case, you can use the
--incremental form but start with the revision in which you started
making changes to your branch:

   svnadmin dump -r61:HEAD --incremental E:\svnhome\Repo > Dump.dump

The catch here is that you'll have to initialize your final target
repository with a copy of your branch as it appeared when it was created
before loading the deltas from the filtered dumpfile atop it.

Either way, spaces in branch names shouldn't be an issue for the filter.
 You need only quote the paths that you pass to svndumpfilter:

   cat Dump.dump | svnadmin include "/branches/My Branch"

Another approach I forgot to recommend before is to setup a user in the
original repository that has read permission only to your branch, and
then use that user to create a mirror of the repository using svnsync.
svnsync will honor the permissions in your access file, and will simply
omit the stuff that user can't read, leaving you with a repository that
has a bunch of empty revisions but contains all the changes made to your
branch only.

--
C. Michael Pilato <cmpilato at collab dot net>
CollabNet <> www.collab.net <> Enterprise Cloud Development

RE: Re: svndumpfilter: E200003: Invalid copy source path RE: Re: svndumpfilter: E200003: Invalid copy source path

Author devilsbane (OCN Member)
Full name A H
Date 2014-04-18 09:48:45 PDT
Message Thank you very much for the prompt response Michael.

The reason I'm looking into this is because we are going to be bringing some development in house that we previously contracted out and we would like to bring all of the history over with it. But we can't take their trunk too because it contains other clients.

Option 3 seems to be the most promising for this. We don't really care much about the revision history before we were a client so if we could take everything from when our branch was created and beyond I believe that would be fine. Can you tell me how to do a dump starting at a certain revision?

My guess would be run "svnadmin dump --incremental 60 E:\svnhome\Repo > Dump.dmp" and then do my filtering based on that. Will that give me what I need?

Also, how does it work if I have spaces in the branch name? Another project had spaced and using quotes for the filtering didn't seem to work.

Thank you so much again!
-Devilsbane

Re: svndumpfilter: E200003: Invalid copy source path Re: svndumpfilter: E200003: Invalid copy source path

Author cmpilato (OCN Member)
Full name C. Michael Pilato
Date 2014-04-18 06:35:08 PDT
Message On 04/18/2014 09:29 AM, A H wrote:
> I'm attempting to do a filter on a repository that I dumped but I'm
> running into issues because the branch I'm wanting to filter was
> copied from the trunk, and I'm not including the trunk because it
> contains additional code that I don't need or want.
>
> My command: svndumpfilter include /branches/mybranch < FullDump.dmp >
> test.dmp
>
> Error Message: svndumpfilter: E200003: Invalid copy source path
> '/trunk/TestApp1'
>
> I've also tried using the --skip-missing-merge-sources subcommand,
> but that doesn't change anything. Is there any way to continue
> without taking the whole trunk too?
>
> Thank you, Devilsbane

This is not easy to do with standard tooling. You might try Googling
around for 'svndumpfilter2' and 'svndumpfilter3', third-party scripts
that could offer better support of what you want. Other options include:

1. Take the trunk, too.

2. Take only the part of the the trunk you need (by stringing together
some svndumpfilter invocations to include the trunk but then exclude the
stuff in it you don't want).

3. Truncate the history of your branch -- essentially, do a
non-incremental dump starting from the revision in which the branch was
created.


--
C. Michael Pilato <cmpilato at collab dot net>
CollabNet <> www.collab.net <> Enterprise Cloud Development

svndumpfilter: E200003: Invalid copy source path svndumpfilter: E200003: Invalid copy source path

Author devilsbane (OCN Member)
Full name A H
Date 2014-04-18 06:29:50 PDT
Message I'm attempting to do a filter on a repository that I dumped but I'm running into issues because the branch I'm wanting to filter was copied from the trunk, and I'm not including the trunk because it contains additional code that I don't need or want.

My command: svndumpfilter include /branches/mybranch < FullDump.dmp > test.dmp

Error Message: svndumpfilter: E200003: Invalid copy source path '/trunk/TestApp1'

I've also tried using the --skip-missing-merge-sources subcommand, but that doesn't change anything. Is there any way to continue without taking the whole trunk too?

Thank you,
Devilsbane
Messages per page: