如何提取 SVN 转储?

发布于 2024-11-19 03:06:25 字数 106 浏览 4 评论 0原文

我收到了一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

云淡风轻 2024-11-26 03:06:25

Adam Butler 的答案近乎完美,但我遇到了一些问题,所以这是我的工作解决方案:

在 DOS 窗口中(使用 ConEmu 以获得更好的效果)

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

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)

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 /

风筝有风,海豚有海 2024-11-26 03:06:25

这里有一个简单的指南 - 它适用于 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 框中:

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

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

雨后彩虹 2024-11-26 03:06:25

假设您有完整转储而不是增量转储,您可以轻松提取文件。它们存储有一小段标头信息(包括文件的大小),后跟文件本身。

如果您有增量转储(其中您有文件的初始版本,然后只有增量)(即每个文件提交时的更改),您会遇到更困难的问题。不过,有一个简单的解决方案:

安装 VisualSVN Serverhttp://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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文