本文介绍了如何使用svndumpfilter排除某个修订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个SVN信息库,其版本不正确或为两个.我需要摆脱它们!我正计划使用svndumpfilter工具,该工具具有exclude命令.但是,我不知道如何使用它来排除修订.每次使用它时,都会出现Malformed dumpfile header错误.参见下面的命令;我想排除修订版23,而代码是包含存储库的目录.

>svndumpfilter exclude 23 code
Excluding prefixes:
   '/23'
   '/code'

SVN-fs-dump-format-version: 2

<waits for me to type something and press enter>

'vndumpfilter: E140001: Malformed dumpfile header '
解决方案

svndumpfilter工具将stdin用作输入,并在某些路径上仅 进行过滤,因此您不能排除特定的修订版本.但是,您可以尝试将存储库从rev 0转储到rev. 22,然后从版本24继续到​​HEAD,但是,只有在版本23之后再次更改版本23中没有任何文件更改的情况下,此方法才起作用.

这是一个小脚本:

svnadmin dump my -r0:22 code > /path/to/dumpfile_1.dmp
svnadmin dump --incremental -r24:HEAD code > /path/to/dumpfile_2.dmp

如果要使用转储文件创建新的存储库,请执行以下操作:

svnadmin create code_correct
svnadmin load code_correct <  /path/to/dumpfile_1.dmp
svnadmin load code_correct <  /path/to/dumpfile_2.dmp

I have an SVN repository with a bad revision or two. I need to get rid of them! I was planning on using the svndumpfilter tool, which has an exclude command. However, I cannot figure out how to use it to exclude a revision. Everytime I use it, I end up with a Malformed dumpfile header error. See the command below; I want to exclude revision 23, and code is the directory containing the repository.

>svndumpfilter exclude 23 code
Excluding prefixes:
   '/23'
   '/code'

SVN-fs-dump-format-version: 2

<waits for me to type something and press enter>

'vndumpfilter: E140001: Malformed dumpfile header '
解决方案

svndumpfilter tool uses the stdin as input and filters only on certain paths, so you cannot exclude a specific revision.However you can try to dump your repository from rev 0 to rev. 22 and continue from rev 24 to HEAD, however, this will work only if no file changed in rev 23 is changed after rev 23 again.

Here a small script:

svnadmin dump my -r0:22 code > /path/to/dumpfile_1.dmp
svnadmin dump --incremental -r24:HEAD code > /path/to/dumpfile_2.dmp

If you want to create a new repository out of dumpfiles:

svnadmin create code_correct
svnadmin load code_correct <  /path/to/dumpfile_1.dmp
svnadmin load code_correct <  /path/to/dumpfile_2.dmp

这篇关于如何使用svndumpfilter排除某个修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 12:50