English 中文(简体)
从CVS重新导入到Subversion
原标题:Re-importing from CVS into Subversion

我试图解决的问题与子版本与生产代码不同步,这是更新Subversion的最简单方法,但有些不同。

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

2.00版本的开发继续使用SVN中的代码。

同时,在CVS中进行了一些修复(因为开发工具的设置不同)

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

如果我有

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

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

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

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

今后我将在SVN中维护1.xx版本。

问题回答

您可以将当前的CVS回购转换为新的虚拟SVN回购。使用它,您可以精心挑选要转储的修订,并将这些转储重放回真正的SVN回购。(我不知道这将如何处理同一文件在真实SVN和CVS/dummy SVN中都被更改的情况。您可能想通过将精心挑选的转储重放到特定分支来避免发现这一点。)

不过,也许还有更好的方法,但这可能根本不起作用。我只将一个CVS回购转换为SVN回购,这是一项一次性的艰巨任务。所以,把这个和大量的盐和干运行它的副本第一。

Since I am going to maintain version 1.xx in SVN as well, and I know at what point the code diverged, I should be able to only merge the changelists created after the migration to SVN. This looks like it will keep things tidiest.

我现在正在试验这个。

从您引用的版本号来看,module1上的所有转换后提交似乎都在Subversion中,module2上的所有转化后提交都在CVS中。如果是这种情况,您可以尝试以下操作:

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

(Subversion存储库的重叠部分不一定是相同的;cvs2svn使用一些启发式方法来推导变更集,它们的推导可能会因为其他变化而有所不同。但只要每个存储库中都有可识别的“1.00”修订,内容相同,那么我认为该过程应该有效。)

在尝试此操作之前先进行备份!





相关问题
Use the commit message in a CVS pre-commit hook

Is it possible to use the commit message in a pre-commit hook in CVS? The CVS server is running remotely, and I access it using pserver. Ideally, I want to allow the commit if the files pass the ...

Using CVS to #ifdef my changes

I have a large project that has many changes not yet checked in. I want to check them in but have them only take effect when a certain symbol is #define d CVS does have the ability to format diffs ...

Netbeans CVS - existing repo - existing working copy

I m using Netbeans to develop with Drupal. I m trying to let Netbeans get drupal core and modules from the repository on drupal.org to my local working copy. Problem is: I already have a working ...

Does an Eclipse CVS merge appear in the log view of a file?

I m not new to the Branch/Merge idea, but I m new to CVS. I have a sample file that I have brached off of the main trunk, and have made non-conflicting edits to both the branch and the main. When I ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Get local cvs comment history when committing file/s in emacs

I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I ve used in a previous commit when I am in the process of writing a ...

热门标签