views:

1182

answers:

1

I need to provide our clients with a dump of a single sub directory in our SVN repository along with the revision history if possible. I know that you can do a dump but I don't believe you can tell it to isolate a single sub directory in the repo. If I export i'll only get the head or a single revision, this is not what I need. Is there anyway to achieve this, or is this just not supported?

Edit:

What I need is all the revision history and the changes to every file.

Edit:

It looks like rmeador's solution worked with one caveat. I was getting a cryptic error about a revision or file doesn't exist when executing the load command into a blank repo. svnadmin load seemed to get confused because creation of the "trunk" directory got filtered out by svndumpfilter. Therefore creating "trunk/MySubDirecory" fails. Doing a svn add/commit manually for "trunk" on the target empty repo and then doing a "svnadmin load" solved this problem.

+2  A: 

It is possible to filter a dump file to only contain one subdirectory using svndumpfilter. Such a dump file can then be loaded into a new repository and it will work perfectly fine, as if the repo had always been that directory.

rmeador
+1 let me give that shot.
James
Do you have a Windows examples where this is used?
James
Do the examples in the svnbook I linked to not work on Windows? FYI, there's a "next" button at the bottom that goes to pages describing the subcommands (with examples) that it's easy to overlook. In looking at the first example, it looks like it should work on Windows.
rmeador
Specifically, I think this example does exactly what you need, if you replace "sandwiches" with your customer's folder name: http://svnbook.red-bean.com/en/1.5/svn.ref.svndumpfilter.commands.c.include.html
rmeador
So the example worked I was able to filter it into a second dump file, but when try to load the filtered dump into a empty test repo, it errors out saying such and such revision was not found after a running for a while. Have you seen this happen?
James
I'm afraid I've never actually used the tool before, so I won't be much help. I suggest you post your problem as a new SO question, or perhaps visit the SVN IRC channel on irc.freenode.net #subversion.
rmeador
Check my last edit, I found a solution to the issue.
James