You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Scott Scriven <sv...@toykeeper.net> on 2004/02/24 16:50:04 UTC

bug? svndumpfilter / svnadmin load fail

Hi.

I'm having some trouble with svndumpfilter and svnadmin load.
The error I get is:

 * adding path : trunk/subdir ...svn: File not found: transaction '1', path 'trunk/subdir'

And here's a script which shows how to cause the error:
  http://toykeeper.net/tmp/svnfail.sh
content shown here:
----------------------------------------
#!/bin/sh

# causes svnadmin load to fail
# tested using subversion 0.37.0-3 from debian-x86 unstable

cd /tmp
rm -rf sfoo
mkdir sfoo
cd sfoo
mkdir -p in/trunk/subdir
svnadmin create old
svn import in file:///tmp/sfoo/old -m ...
svnadmin create new
svnadmin dump old | svndumpfilter include trunk/subdir | svnadmin load new
----------------------------------------

Please Cc: all replies to me, if possible.  :)


-- Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug? svndumpfilter / svnadmin load fail

Posted by Jim Correia <ji...@pobox.com>.
On Feb 24, 2004, at 12:04 PM, kfogel@collab.net wrote:

> Scott Scriven <sv...@toykeeper.net> writes:
>> I'm having some trouble with svndumpfilter and svnadmin load.
>> The error I get is:
>>
>>  * adding path : trunk/subdir ...svn: File not found: transaction 
>> '1', path 'trunk/subdir'
>
> I think this is expected behavior.
>
> You first produced a valid dumpfile that creates "/trunk" and then
> "/trunk/subdir".  You then ran it through svndumpfilter, telling
> svndumpfilter to include /trunk/subdir (and by implication, to exclude
> anything that doesn't match that string -- at least, that's how I
> presume svndumpfilter works).  Then you tried to load the new
> dumpfile.  It gets an error, because it tries to add /trunk/subdir
> before /trunk.

Thanks Karl.  This is similar to the question I posted yesterday.

Your explanation makes perfect sense, but it wasn't obvious from the 
error message what the problem was (or that you need to create the 
intermediate directorties by hand before the load.)

Thanks,
Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug? svndumpfilter / svnadmin load fail

Posted by kf...@collab.net.
Scott Scriven <sv...@toykeeper.net> writes:
> I can understand how it may be reasonable behavior, but does not
> seem like useful behavior.  It should probably create parent dirs
> as necessary, so filtered dumps can be loaded into blank
> repositories.  Perhaps it should have an option to do so?
> 
> It works if I simply "include /trunk", but that would not filter
> out all the parts I don't want.  Alternately, I could "exclude
> foo bar baz..." to get rid of everything I don't want in the new
> repository, but that would defeat the point of having an
> "include" option.

Totally agree -- svndumpfilter has bugs.  I'm not sure what kind of
commitment we have to improving it (not saying there is no
committment, just not sure how strong it is -- kind of depends on who
jumps up and says "me!").

This is a bug, anyway, and it would be great if you could file it.
However, I don't want to falsely promise that filing it will get it
fixed within N days.  We have a lot of issues to prioritize right now,
etc, etc.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug? svndumpfilter / svnadmin load fail

Posted by "C. Michael Pilato" <cm...@collab.net>.
Scott Scriven <sv...@toykeeper.net> writes:

> * kfogel@collab.net <kf...@collab.net> wrote:
> > I think this is expected behavior.
> 
> I can understand how it may be reasonable behavior, but does not
> seem like useful behavior.  It should probably create parent dirs
> as necessary, so filtered dumps can be loaded into blank
> repositories.  

If it creates parent dirs, then you can't load the dumpfile into a
repository that already has those directories.  'svnadmin repos' can't
look at the dumpfile and know the difference between a directory
that's being created just because it was a necessary intermediate path
component, or if it is a real versioned thing.  So it doesn't let you
make stuff that already exists.

> Perhaps it should have an option to do so?

Perhaps.  Or perhaps the dump format could make intermediate
directories, but add a header for those dir creations that says "Hey
Loader, if my repository already has this directory, don't sweat it."

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug? svndumpfilter / svnadmin load fail

Posted by Scott Scriven <sv...@toykeeper.net>.
* kfogel@collab.net <kf...@collab.net> wrote:
> I think this is expected behavior.

I can understand how it may be reasonable behavior, but does not
seem like useful behavior.  It should probably create parent dirs
as necessary, so filtered dumps can be loaded into blank
repositories.  Perhaps it should have an option to do so?

It works if I simply "include /trunk", but that would not filter
out all the parts I don't want.  Alternately, I could "exclude
foo bar baz..." to get rid of everything I don't want in the new
repository, but that would defeat the point of having an
"include" option.


-- Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: bug? svndumpfilter / svnadmin load fail

Posted by kf...@collab.net.
Scott Scriven <sv...@toykeeper.net> writes:
> I'm having some trouble with svndumpfilter and svnadmin load.
> The error I get is:
> 
>  * adding path : trunk/subdir ...svn: File not found: transaction '1', path 'trunk/subdir'

I think this is expected behavior.

You first produced a valid dumpfile that creates "/trunk" and then
"/trunk/subdir".  You then ran it through svndumpfilter, telling
svndumpfilter to include /trunk/subdir (and by implication, to exclude
anything that doesn't match that string -- at least, that's how I
presume svndumpfilter works).  Then you tried to load the new
dumpfile.  It gets an error, because it tries to add /trunk/subdir
before /trunk.

?

-Karl


> And here's a script which shows how to cause the error:
>   http://toykeeper.net/tmp/svnfail.sh
> content shown here:
> ----------------------------------------
> #!/bin/sh
> 
> # causes svnadmin load to fail
> # tested using subversion 0.37.0-3 from debian-x86 unstable
> 
> cd /tmp
> rm -rf sfoo
> mkdir sfoo
> cd sfoo
> mkdir -p in/trunk/subdir
> svnadmin create old
> svn import in file:///tmp/sfoo/old -m ...
> svnadmin create new
> svnadmin dump old | svndumpfilter include trunk/subdir | svnadmin load new
> ----------------------------------------
> 
> Please Cc: all replies to me, if possible.  :)
> 
> 
> -- Scott
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org