如何将代码库从一个svn存储库迁移到另一个保存历史记录? [英] How to migrate a codebase from one svn repo to another preserving history?

查看:547
本文介绍了如何将代码库从一个svn存储库迁移到另一个保存历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在结构错误的svn存储库中有一个分支,需要将其删除,然后移至另一个svn存储库. (我正在尝试清理一些).

I have a branch in a badly structured svn repo that needs to be stripped out and moved to another svn repository. (I'm trying to clean it up some).

如果我执行svn log而不是停止复制/重命名,则可以看到我关心的所有3427次提交.除了编写一些主要脚本之外,是否有其他方法可以退出修订版?

If I do an svn log and not stop on copy/rename I can see all 3427 commits that I care about. Is there some way to dump the revisions out, short of writing some major scripts?

我会遵循

I would follow the advice in this question but this branch has been moved all over the place and I would like to preserve the moves as well.

推荐答案

我想这可能类似于@ZacThompson(和@Pekka)的意思:我认为svndumpfilter是您的朋友.

I guess this might be similar to what @ZacThompson (and @Pekka) mean: I think svndumpfilter is your friend.

从您的问题中我想您知道应该做什么,但是在各处复制/移动分支感到困难吗?可以在前面提到的

From your question I think you have the idea what it is meant to do but struggle with the copying/moving of the branch all over the place? An answer to that can be found in the before mentioned SVN Documentation, I believe:

此外,复制的路径可以给您一些帮助 麻烦. Subversion支持复制 存储库中的操作,其中 通过复制一些路径来创建新路径 已经存在的路径.有可能的 在生命的某个时刻 您的存储库,您可能已经复制了 来自某个位置的文件或目录 svndumpfilter排除在外 包括的位置.使 转储数据自给自足, svndumpfilter需要仍然显示 新路径的添加-包括 由...创建的任何文件的内容 复制-不代表该添加 作为来自不会 存在于您过滤的转储数据中 溪流.但是因为颠覆 存储库转储格式仅显示什么 在每个修订版中都进行了更改, 复制源的内容可能不 随时可用.如果你怀疑 你有这种副本 在您的存储库中,您可能想要 重新考虑您的已包含/已排除的集合 路径,也许包括路径 作为您的来源 麻烦的复制操作.

Also, copied paths can give you some trouble. Subversion supports copy operations in the repository, where a new path is created by copying some already existing path. It is possible that at some point in the lifetime of your repository, you might have copied a file or directory from some location that svndumpfilter is excluding, to a location that it is including. To make the dump data self-sufficient, svndumpfilter needs to still show the addition of the new path—including the contents of any files created by the copy—and not represent that addition as a copy from a source that won't exist in your filtered dump data stream. But because the Subversion repository dump format shows only what was changed in each revision, the contents of the copy source might not be readily available. If you suspect that you have any copies of this sort in your repository, you might want to rethink your set of included/excluded paths, perhaps including the paths that served as sources of your troublesome copy operations, too.

含义:使svndumpfilter包含分支曾经居住过的 all 路径.还是我错过了什么?

Meaning: make svndumpfilter include all paths the branch ever lived at. Or am I missing something?

另一种可能是您链接的线程中@compie提到的svndumpfilter2,尽管我认为甚至没有必要(而且我也不知道@compie或svndumpfilter2).

Another possibility might be the svndumpfilter2 mentioned by @compie in the thread you linked although I believe it is not even necessary (and I don't know either of @compie or svndumpfilter2).

这篇关于如何将代码库从一个svn存储库迁移到另一个保存历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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