问题
I received an SVN dump file with a lot of pages (all HTML pages, and all server-side code as well) in the file. I'd to separate them out, but have no clue how to do this.
I'm on windows and I don't get SVN at all.
回答1:
The answer by Adam Butler is nearly perfect, but I got a few problems with it, so here is my working solution :
In a DOS windows (Use ConEmu for a better one)
First cd to your svn folder tools
mkdir d:\dumpRepo
svnadmin create d:\dumpRepo
type [PATH TO DUMP].dump | svnadmin load d:\dumpRepo
svn export file:///d:/dumpRepo d:\Exportedfiles
It's really important that the file URI for svn export contains only regular /
回答2:
There is a simple guide here - it is for linux/unix but works from a dos prompt: http://www.mhermans.net/get-files-from-svn-dump.html
First - download the command line svn http://subversion.apache.org/packages.html#windows This can be a challenge but eventually you will have svn.exe and svnadmin.exe in a bin folder somewhere. Once you have that it is smooth sailing:
From a dos box:
mkdir c:\backup_repo
[PATH TO SVN]\svnadmin.exe init c:\backup_repo
type [PATH TO DUMP].dump | [PATH TO SVN]\svnadmin.exe load
[PATH TO SVN]\svn.exe export "file:///C:\repo" c:\exportdest
HTH
回答3:
Assuming you have a full dump and not an incremental one you can extract the files easily. They are stored with a small piece of header information (including the size of the file) followed by the file itself.
If you've got an incremental dump (where you have the intial version of the file and then only the deltas)(ie the changes to each file when they were committed) you have a more difficult problem. However, there's an easy solution:
Install VisualSVN Server or http://www.ubersvn.com/ and use it to import the dump. Then use a tool like TortoiseSVN to see the history and export each file individually (ie, you just created a copy of the dumped svn repository and are now accessing it like any subversion user).
来源:https://stackoverflow.com/questions/6642917/how-to-extract-an-svn-dump