如何提取 SVN 转储?
我收到了一个 SVN 转储文件,其中包含很多页面(所有 HTML 页面,以及所有服务器端代码)。我想将它们分开,但不知道如何做到这一点。
我在 Windows 上,根本没有 SVN。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Adam Butler 的答案近乎完美,但我遇到了一些问题,所以这是我的工作解决方案:
在 DOS 窗口中(使用 ConEmu 以获得更好的效果)
svn 导出的文件 URI 只包含常规 / 非常重要
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)
It's really important that the file URI for svn export contains only regular /
这里有一个简单的指南 - 它适用于 linux/unix,但可以在 dos 提示符下运行:
http://www.mhermans.net/get-files-from-svn -dump.html
首先-下载命令行svn
http://subversion.apache.org/packages.html#windows
这可能是一个挑战,但最终您将在某个 bin 文件夹中找到 svn.exe 和 svnadmin.exe。一旦你有了它,一切就一帆风顺了:
从 dos 框中:
HTH
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:
HTH
假设您有完整转储而不是增量转储,您可以轻松提取文件。它们存储有一小段标头信息(包括文件的大小),后跟文件本身。
如果您有增量转储(其中您有文件的初始版本,然后只有增量)(即每个文件提交时的更改),您会遇到更困难的问题。不过,有一个简单的解决方案:
安装 VisualSVN Server 或 http://www.ubersvn.com/ 并使用它导入转储。然后使用像 TortoiseSVN 这样的工具来查看历史记录并单独导出每个文件(即,您刚刚创建了转储的副本) svn 存储库,现在可以像任何 subversion 用户一样访问它)。
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).