本文介绍了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 ,这阻止了我转换我的仓库. 我的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在添加路径之前更改了路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    1403页,肝出来的..

  • 09-07 12:50