You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Antonio Maquiling <er...@gmail.com> on 2016/02/03 17:49:59 UTC

svndumpfilter help

I have a new problem.  Not a problem with the software I think this is
sysadmin/user error.

I've read the docs and examples on how to use svnadmin dump and svndumpfilter.

I'm familiar with dumps and loads.  But I have a new task appointed to me.

I have a directory structure that looks like this:

svn://x.x.x.x/mainproject/branch/this_new_stuff

Developers want to take /this_new_stuff as a dump, and create a new repo so
it'll look like this:

svn://x.x.x.x/this_new_stuff

So far so good, I'll try svndumpfilter.

So I do:
svnadmin dump mainproject > mainproject.dump
svndumpfilter include this_new_stuff >  new_stuff_only.dmp
svnadmin create new_stuff
cd new_stuff
svnadmin load . < ../new_stuff_only.dmp
...
... lots of messages that it is loading
... it's going good, I'm getting stoked it is working
...
... whew, it's a lot, almost done

done.

Now I then go to my PC and do a tortoise browse svn://x.x.x.x/this_new_stuff

And it is EMPTY.

I look at the logs on tortoise and I can sell all the developer logs with the
check-ins

I've looked into new_stuff_only.dmp and see a lot of stuff

I've tried "dump-empty-revs and renumber-revs and preserve-revprops".  The
first 2 gives me that error inside the dump file that says something like
"empty this is just for padding or something like that'

Then I finally used "preserve-revprops" and I didn't get that error and the
logs show up with the developer check-ins.

Am I missing something?  Maybe another step?  All my googling just refers to
svnadmin dump and svndumpfilter.

I'm googling thins like "subversion dump folder into new repo" and I'm getting
svndumpfilter as the way to do it.

TIA!
-- 
eric

Re: svndumpfilter help

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 5, 2016, at 1:04 PM, Eric Antonio Maquiling wrote:

>> svnadmin dump mainproject > mainproject.dump
>> svndumpfilter include branch/this_new_stuff < mainproject.dump > new_stuff_only.dmp
> 
> I guess I did try it bofore and I got this error:
> 
> Revision 2003 committed as 2003.
> Revision 2004 committed as 2004.
> Revision 2005 committed as 2005.
> Revision 2006 committed as 2006.
> svndumpfilter: Invalid copy source path '/trunk'
> 
> The repo looks like this:
> 
> svn://x.x.x.x/mainproject/branches/
> svn://x.x.x.x/mainproject/truck/
>                          under branches:
>                          /branches/this_is_what_we_want
> 
> 
> You see, the developers have been using this branch for so long they don't want
> to mess up the history on the trunk.  So for historical reasons, they just want
> branches/this_is_what_we_want as a new repo
> 
> If they need to see some older stuff (probably not), they'll just go and browse
> the old trunck.

So as I said, if the thing you want to extract from the dump was originally copied from elsewhere in the repository (as, in your case, your branch was at one point copied from trunk), you have to extract that other place (i.e. trunk) as well.

Here's the same question asked before, and some more suggestions:

https://subversion.open.collab.net/ds/viewMessage.do?dsForumId=3&dsMessageId=517906


Re: svndumpfilter help

Posted by Eric Antonio Maquiling <er...@gmail.com>.
>
>svnadmin dump mainproject > mainproject.dump
>svndumpfilter include branch/this_new_stuff < mainproject.dump > new_stuff_only.dmp

I guess I did try it bofore and I got this error:

Revision 2003 committed as 2003.
Revision 2004 committed as 2004.
Revision 2005 committed as 2005.
Revision 2006 committed as 2006.
svndumpfilter: Invalid copy source path '/trunk'

The repo looks like this:

svn://x.x.x.x/mainproject/branches/
svn://x.x.x.x/mainproject/truck/
                          under branches:
                          /branches/this_is_what_we_want


You see, the developers have been using this branch for so long they don't want
to mess up the history on the trunk.  So for historical reasons, they just want
branches/this_is_what_we_want as a new repo

If they need to see some older stuff (probably not), they'll just go and browse
the old trunck.
-- 
eric

Re: svndumpfilter help

Posted by Eric Antonio Maquiling <er...@gmail.com>.
>
>If the old repository root is svn://x.x.x.x/mainproject and the stuff you want
>to include in the dump is in branch/this_new_stuff in the old repository, then
>you need to run:
>
>svnadmin dump mainproject > mainproject.dump
>svndumpfilter include branch/this_new_stuff < mainproject.dump > new_stuff_only.dmp

Correct, it was in branch/this_new_stuff

I thought I had tried that...did so many dumps to try to get it working.  Let
me look at the bash history file but I'll just go ahead and try that one again,
do another create and import.

I'll let you guys know!! :)

Thanks!
-- 
eric

Re: svndumpfilter help

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 3, 2016, at 10:49 AM, Eric Antonio Maquiling wrote:

> I have a new problem.  Not a problem with the software I think this is
> sysadmin/user error.
> 
> I've read the docs and examples on how to use svnadmin dump and svndumpfilter.
> 
> I'm familiar with dumps and loads.  But I have a new task appointed to me.
> 
> I have a directory structure that looks like this:
> 
> svn://x.x.x.x/mainproject/branch/this_new_stuff
> 
> Developers want to take /this_new_stuff as a dump, and create a new repo so
> it'll look like this:
> 
> svn://x.x.x.x/this_new_stuff
> 
> So far so good, I'll try svndumpfilter.
> 
> So I do:
> svnadmin dump mainproject > mainproject.dump
> svndumpfilter include this_new_stuff >  new_stuff_only.dmp
> svnadmin create new_stuff
> cd new_stuff
> svnadmin load . < ../new_stuff_only.dmp
> ...
> ... lots of messages that it is loading
> ... it's going good, I'm getting stoked it is working
> ...
> ... whew, it's a lot, almost done
> 
> done.
> 
> Now I then go to my PC and do a tortoise browse svn://x.x.x.x/this_new_stuff
> 
> And it is EMPTY.

If the old repository root is svn://x.x.x.x/mainproject and the stuff you want to include in the dump is in branch/this_new_stuff in the old repository, then you need to run:

svnadmin dump mainproject > mainproject.dump
svndumpfilter include branch/this_new_stuff < mainproject.dump > new_stuff_only.dmp

If branch/this_new_stuff was ever elsewhere in the repository (for example, if it was at some point in the past moved from somewhere/else/in/the/repo), then you need to include that location too.