从CVS重新导入到Subversion [英] Re-importing from CVS into Subversion

查看:92
本文介绍了从CVS重新导入到Subversion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要解决的问题与

The problem I'm trying to solve is not dissimilar to Subversion out of sync with production code, easiest way to update subversion but somewhat different.

我将一个(Java)项目从CVS转换为SVN(使用cvs2svn,保留了完整的历史记录)-在1.00版本说

I converted a (Java) project from CVS to SVN (using cvs2svn, retaining full history) - say at version 1.00

使用SVN中的代码继续进行2.00版的开发.

Development on version 2.00 continued with the code in SVN.

同时,由于CVS中的开发工具设置不同,因此在CVS中进行了一些修复.

Meanwhile, some fixes were done in CVS (as the dev tool setup was different.)

现在,我需要做的是从CVS有效地重新导入项目的一部分.

Now, what I need to do is effectively re-import part of the project from CVS.

如果我有

cvs:project/module1 (version 1.00)
           /module2 (version 1.10)

svn:project/trunk/module1 (version 2.xx)
                 /module2 (Version 1.00)

有没有一种方法可以从CVS重新导入module2并保留完整的历史记录?

Is there a way of just re-importing module2 from CVS and retain full history?

我已经在CVS存储库上再次运行cvs2svn,并且打算将其作为另一个项目加载到SVN中,然后进行无基础的合并-但我不确定这是否是个好主意.

I've run cvs2svn again on the CVS repository, and was going to load that into SVN as another project, and then do a baseless merge - but I'm not sure if that is such a great idea.

我将继续在SVN中维护1.xx版.

I will be maintaining version 1.xx in SVN going forward.

推荐答案

从您引用的版本号来看,看起来模块1上的所有转换后提交都在Subversion中,而模块2上的所有转换后提交都好像在Subversion中.在CVS中.如果是这种情况,您可以尝试以下操作:

From the version numbers that you quote, it looks like all of the post-conversion commits on module1 were in Subversion and all of the post-conversion commits on module2 were in CVS. If that is the case, you might try the following:

使用与以前相同的cvs2svn选项再次转换整个CVS项目.如果幸运的话,生成的Subversion存储库的r0:rN(其中N是某个数字)将与第一次转换产生的Subversion存储库的重叠部分一致.在这种情况下,您应该能够从新的Subversion存储库中"svnadmin dump --incremental -rN:HEAD",并将其"svnadmin load"存储在旧的Subversion存储库之上.合并后的存储库中的提交不会按时间顺序排列,但这是一个小麻烦(可以使用其他工具来解决,但要以对Subversion提交进行重新编号为代价).

Convert the entire CVS project again, using the same cvs2svn options as before. If you are lucky, r0:rN (where N is some number) of the resulting Subversion repository will agree with the overlapping part of the Subversion repository resulting from the first conversion. In this case, you should be able to "svnadmin dump --incremental -rN:HEAD" from the new Subversion repository and "svnadmin load" it on top of the old Subversion repository. The commits in the combined repository will not be in chronological order, but that is a minor annoyance (and could possibly be fixed using some other tools at the expense of renumbering the Subversion commits).

(不一定是Subversion存储库的重叠部分是相同的; cvs2svn使用一些启发式方法来推导变更集,并且由于其他变更,它们的推论可能有所不同.但是,只要有可识别的"1.00"修订版,在每个具有相同内容的存储库中,那么我认为该程序应该可以工作.)

(It is not necessarily the case that the overlapping parts of the Subversion repositories will be identical; cvs2svn uses some heuristics to deduce changesets and their deductions could differ because of other changes. But as long as there are identifiable "1.00" revisions in each repository with identical contents, then I think the procedure should work.)

尝试备份之前,请先备份!

Make backups before you try this!

这篇关于从CVS重新导入到Subversion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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