svndumpfilter 不排除路径的问题
我从 svndumpfilter 得到奇怪的结果 - 我需要删除我们的存储库中 2 个特定文件的 24 个实例,这些文件分散在许多分支中。我正在运行命令,如下所示:
例如
type dumpfile | svndumpfilter exclude foo1/bar.dat foo2/bar.dat > filtered_dumpfile
,但是,过滤后的转储文件似乎没有按预期删除所有节点,而只是删除了 2 个节点。我通过在两个转储文件上使用 svndumptool diff 并在重建后确认了这一点回购排除的文件仍然存在。
我确信我没有错过这些文件的任何实例,因为我已经使用 svnlook 树来查找存储库中的所有路径。我还确认命令和转储文件中的前导斜杠是一致的。
有人有什么想法吗?
I am getting strange results from svndumpfilter - I need to obliterate 24 instances of 2 specific files in our repo, scattered amongst many branches. I am running the command as documented like so:
e.g.
type dumpfile | svndumpfilter exclude foo1/bar.dat foo2/bar.dat > filtered_dumpfile
However, it seems the filtered dump file is not removing all of the nodes as expected but only removing 2. I have confirmed this by using svndumptool diff on the two dump files and after rebuilding the repo the excluded files are still present.
I'm sure I haven't missed any instances of those files as I have used svnlook tree to locate all paths in the repo. Also I have confirmed that leading slashes are consistent in the command and in the dump file.
Anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
与该问题相关的 Apache Subversion 常见问题解答条目最近已使用新方法进行了更新,允许您过滤存储库历史记录。复杂的存储库历史记录过滤可能比使用 svndumpfilter 方法更方便。
配置基于路径的授权规则,拒绝对需要从存储库历史记录中过滤掉的任何路径进行读取访问。
与 svndumpfilter 不同,svnsync 会自动将具有不可读源路径的复制操作转换为正常添加,如果需要过滤涉及复制操作的历史记录,这非常有用。
Apache Subversion FAQ entry which is related to the question has been recently updated with a new approach that allows you to filter repository history. Complex repository history filtration may be a bit more convenient with it than with the
svndumpfilter
approach.You can replicate the repository with
svnsync
tool after configuring path-based authorization rules that deny read access to any paths that need to be filtered out from repository history.Unlike
svndumpfilter
,svnsync
will automatically translate copy operations with an unreadable source path into normal additions, which is useful if history involving copy operations needs to be filtered.您可以在文件中添加所有前缀并使用
--targets FILE
选项而不是单独的排除|包含You can add all prefixes in file and use
--targets FILE
option instead of separate exclude|include您可以尝试执行以下操作,也许会有所帮助:
或者这样:
You can try to do as follows, maybe it will help:
or this way:
我需要删除的文件是历史上最后一次签入的文件。因此,我能够使用 svnadmin dump 来获取损坏转速之前的所有转速的转储。
这类似于本页中描述的内容: http://robmayhew.com/delete -parts-of-subversion-history/
我需要消除版本 8195 处的错误签入,所以我运行了这样的操作:
这有效,除了我签出的工作副本仍然有来自里面有8195。当我尝试更新时,这导致了错误,因为我的工作副本认为服务器中不存在该版本。
我必须进行一次小型签出并在某处签入一个微不足道的更改,以使存储库版本恢复到 8195,然后我可以在删除受错误签入影响的文件后进行清理并更新我的工作副本。这在 Linux 中使用 svn 是可行的。
一位同事在 Windows 中使用 svn,而 Tortoise svn 对此存储库修复确实很困难。显然,它保留了自己的最新版本的内部缓存,并且当它更新工作副本时,它会从缓存中恢复“坏”版本文件。我想我将不得不再次检查所有内容并构建一个新的工作副本以使其正确。
My files I needed to obliterate were the last checkin in the history. So I was able to use svnadmin dump to get a dump of all revs prior to the broken rev.
This is similar to what is described in this page: http://robmayhew.com/delete-parts-of-subversion-history/
I needed to get rid of a mistake checkin at rev 8195, so I ran something like this:
This worked, except my checked out working copy still had info from 8195 in it. This caused an error when I would try to update, since the version my working copy thought it had didn't exist in the server.
I had to do a mini-checkout and check in a trivial change somewhere to get the repository version back up to 8195, then I could cleanup then update my working copy after deleting the files affected by the bad checkin. This worked using svn in linux.
A co-worker uses svn in windows, and Tortoise svn has been really difficult about this repository fix. Apparently it keeps its own internal cache of the latest revision, and when it updates the working copy it restores the "bad" revision files from its cache. I think I'm going to have to check out everything again and build a fresh working copy to get it right.