SVNDumpFilter在添加路径之前更改了路径? [英] SVNDumpFilter changing paths before adding them?

查看:129
本文介绍了SVNDumpFilter在添加路径之前更改了路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用svndumpfilter从较大的存储库中提取单个项目,并将其导入到自己的存储库中.像这样:

I'm using svndumpfilter to extract single projects from a larger repo and import them into their own repo. Something like this:

svndumpfilter include --drop-empty-revs --renumber-revs Trunk/Source/Project1 < full.dump > Project1.dump

它可以在一个项目上正常工作,但是在第二个项目上,我注意到生成的过滤转储不是从添加路径开始的.请参阅前两个修订版(重新编号):

It worked okay with one project, but on the second one, I notice that the resulting filtered dump does not start by adding a path. See the first two revisions (renumbered):

SVN-fs-dump-format-version: 2

UUID: c6612063-4e6b-459c-a579-78605fb1e4b5

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2010-05-11T20:45:07.903005Z
PROPS-END

Revision-number: 1
Prop-content-length: 128
Content-length: 128

K 7
svn:log
V 27
Fixed code after branching.
K 10
svn:author
V 6
somedude
K 8
svn:date
V 27
2010-09-21T23:07:51.719341Z
PROPS-END

Node-path: Trunk/Source/Project1/Project1.csproj
Text-content-md5: 9d127596909e2a9921f1ec1c0223e1ed
Node-action: change
Text-content-sha1: 22eb675e0a5bfb41092de6ed39dc7c4d2a15dbd5
Node-kind: file
Text-content-length: 5178
Content-length: 5178

在开始添加Trunk/Source/Project1/Project1.csproj之前,请注意它是如何尝试更改"的?毫不奇怪,在经过筛选的转储上运行svnadmin load时,我得到找不到文件".有什么想法吗?

Notice how it is trying to "change" Trunk/Source/Project1/Project1.csproj before it ever added it in the first place? Not surprisingly, I get "file not found" when running svnadmin load on the filtered dump. Any ideas?

推荐答案

有三种方法:

  1. 在加载转储文件之前通过提交添加丢失的文件夹:svn mkdir http://server/svn/project/Trunk -m "Created Trunk"
  2. 手动将创建Trunk文件夹的节点记录添加到转储:

  1. Add missing folder via commit before loading dump file: svn mkdir http://server/svn/project/Trunk -m "Created Trunk"
  2. Manually add a node record that creates Trunk folder to the dump:

Revision-number: 1
Prop-content-length: 128
Content-length: 128

K 7
svn:log
V 27
Fixed code after branching.
K 10
svn:author
V 6
somedude
K 8
svn:date
V 27
2010-09-21T23:07:51.719341Z
PROPS-END

Node-path: Trunk/
Node-kind: dir
Node-action: add
Prop-content-length: 48
Content-length: 48

PROPS-END


Node-path: Trunk/Source/Project1/Project1.csproj
Text-content-md5: 9d127596909e2a9921f1ec1c0223e1ed
Node-action: change
Text-content-sha1: 22eb675e0a5bfb41092de6ed39dc7c4d2a15dbd5
Node-kind: file
Text-content-length: 5178
Content-length: 5178

  • 根本不使用svndumpfilter,因为它被设计破坏了( svndumpsanitizer 主页很好地解释了原因).很可能,您在转储中还会遇到其他错误.

  • Don't use svndumpfilter at all, because it's broken by design (svndumpsanitizer's home page has a good explanation why). There is a good chance, that you will encounter other errors further in your dump.

    我目前正在通过大量合并,移动和其他类似操作拆分一个异常复杂的仓库,我可以说周围没有东西可以正确地100%拆分svn dumps.

    I'm currently in a process of splitting a devilishly complex repo with a lot of merges, moves and other such things and I can say that there is nothing around that handles splitting svn dumps 100% properly.

    例如著名的 svndumpfilterIN 至少包含三个主要错误(我只设法报告其中一个,另外两个更邪恶),在我的仓库中惨败.稍后,我将尝试在GitHub上共享它的固定版本,但是在当前状态下,我不推荐使用它.

    For example well-known svndumpfilterIN contains at least three major bugs (I've only managed to report one of them and other two are much more evil) and failed miserably on my repo. I'll try to share a fixed version of it on GitHub some time later, but in it's current state I can't recommend it.

    因此,我认为,您最好的机会是尝试不带--redefine-root选项的上述 svndumpsanitizer ,因为它也被bug了(bugreport即将到来).如果您使用的是Windows,则可以使用最新的 Visual进行编译. Studio社区2013 (免费).

    So in my opinion, your best chance is to try abovementioned svndumpsanitizer without --redefine-root option, because it's bugged too (bugreport coming). If you're on Windows, it compiles fine with the latest Visual Studio Community 2013 (free).

    由于我已经解决了 svndumpfilterIN ,这阻止了我转换我的仓库. 我的PR 已合并到基本仓库中,请尝试一下.我仍然不能保证100%成功,但是现在您的机会更高.

    The last two paragraphs above are no longer relevant, since I've fixed all the issues in the svndumpfilterIN, that were stopping me from converting my repo. My PR has been merged to the base repo, so give it a try. I still can't guarantee 100% success, but your chances are much higher now.

    这篇关于SVNDumpFilter在添加路径之前更改了路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆