cvs2svn 后的 Subversion 问题
我正在使用 eclipse/subclipse 进行开发。 我还有 TortoiseSVN 客户端。
我正在尝试移动 CVS 存储库。 旧的 CVS 存储库只有一个项目。 我们希望重新组织,因为几个项目有自己的开发流程,应该分开管理。
我使用 cvs2svn 运行了存储库的标准完整移动,没有出现任何问题。
我想重组 subversion 存储库中的项目,因此在 cvs2svn 之后,我尝试进行 svn 移动并进行重组。 我能够成功地进行移动,再次没有任何问题。
我在 Eclipse 中查看该项目,然后在已移动项目之一中选择一个文件。 似乎哪个项目并不重要。 如果我在 eclipse 中执行更新版本,并选择文件历史记录中的一个版本进行更新,则该文件将从我的文件系统中删除,但旧版本永远不会下降。 文件就这样消失了。
我在使用 TortoiseSVN 时遇到了同样的问题,所以我认为这不是 subclipse 问题。
有趣的是,如果我将项目svn move
返回到其最初转换到的原始位置,并遵循相同的步骤,我不会有任何问题,更新版本按预期工作。
所以,对于我的问题:
- 我在 cvs2svn 移动过程中是否做错了什么,导致我无法成功地重新组织我的 subversion 存储库?
- 有更好的方法来做我想做的事情吗?
I am using eclipse / subclipse for development. I also have the TortoiseSVN client.
I am trying to move a CVS repository. The old CVS repository had a single project. We want to reogranize as several of the projects have their own development streams, and should be managed separately.
I ran the standard full move of the repository using cvs2svn, and had no issues.
I want to restructure the projects in the subversion repository, so after the cvs2svn, I attempted to do an svn move and did the restructuring. I was able to successfully do the move, again no issues.
I check out the project in eclipse, and then choose a file in one of the moved projects. It seemingly doesn't matter which project. If I do an Update Version in eclipse, and choose a version in the file's history to update to, the file is deleted from my filesystem, but the older version never comes down. The file is simply gone.
I have the same issue using TortoiseSVN, so I assume that it is not a subclipse issue.
The interesting thing is that if I do an svn move
of a project back to its original location where it was initially converted to, and follow the same steps, I don't have any issues, the Update Version works as expected.
So, to my question(s):
- Did I do something wrong during the cvs2svn move that would preclude me from successfully reorganizing my subversion repository?
- Is there a better way to do what I am trying to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
出现此症状的原因:
您始终需要签出文件夹。 如果您更新到以前的版本,该文件夹可能不存在(该文件夹已被移动),然后 Subversion 将删除其内容。 Subversion 中的重命名始终以删除和添加的方式实现。 因此,文件之间的连接很薄弱,但这仅仅是为了该文件的历史记录。 如果您想查看新布局,您需要签出包含目标文件夹和源文件夹的文件夹。 您将能够“看到”此文件夹的移动,但是如果您签出时只有其中一个文件夹,则该文件夹将消失,您需要签出不同的 URL(目标或源)。
因此,在 CVS 中重组项目然后迁移会更容易。 缺点:您不会有任何重组历史,并且无法构建/编译以前的版本(在 CVS 中创建)。
Reason for this symptom:
You always need to check out a folder. If you update to a previous version, this folder may not exist(the folder was moved) then Subversion will delete its contents. Renaming in Subversion is always implemented as remove and add. So you have a thin connection between files, but it is merely for history of this file. If you want to see the new layout you need to checkout a folder which contains both: target and source folder. Than you will be able to "see" the move of this folder, however if you only have one of the folders in your checkout, the folder will just vanish and you need to checkout a different URL(either target or source).
So It is easier to restructure your projects in CVS and then migrate. Disadvantage: You will not have any history of your restructuring and you are not able to build/compile previous versions (which were created in CVS).
我同意 Peter Parker 的观点,即在转换为 Subversion 之前在 CVS 中重新组织项目是很容易且更可取的,如果您想要做的是重新组织各个项目中的文件夹和文件。
但是,如果您想重新组织项目本身的布局(即一个项目相对于另一个项目的位置),您可以作为 cvs2svn 转换的一部分轻松完成此操作。 当您执行多项目转换时,您可以指定cvs2svn应放置主干、分支的位置,以及每个项目的标签目录。 只需根据您想要的新项目组织放置它们,然后您就可以使用任何常用工具来使用存储库。
I agree with Peter Parker that it is easy and preferable to reorganize the projects in CVS before the converting to Subversion, if what you want to do is reorganize folders and files within individual projects.
But if you want to reorganize the layout of the projects themselves (i.e., where one project lives relative to another), you can do this easily as part of the cvs2svn conversion. When you do a multiproject conversion, you can specify where cvs2svn should place the trunk, branches, and tags directories for each of the projects. Simply place them according to your desired new project organization and then you should have no problem working with the repository using any of the usual tools.
在我工作的地方,我们决定从 CVS 导入后将文件移至 SVN 中。 CVS 的移动历史功能有限,而 SVN 存储库可以“回滚”以随时查看它的样子。 通过这样做,我们再次决定保留所有更改和移动的历史记录更为重要。
我们所做的是将模块按原样从 CVS 移至 SVN。 然后,在签出之前,使用存储库浏览器根据需要移动所有文件。
现在,当您将单个文件更新到旧版本时,这并不能解决您的问题,该文件可能会消失。 我们决定接受这一点,因为我们正在尝试从以文件为中心的存储库视图 (CVS) 转向基于快照的视图。 因此,如果我们需要返回到旧版本,我们会更新整个项目。 如果您只是查看差异历史记录,那么当我们允许移动/重命名时,TortoiseSVN 效果很好。
Where I work, we've decided to move the files in SVN after the import from CVS. CVS has limited history capabilities with moving, while the SVN repository can be "rolled back" to see what it looked like at any time. Again, by doing this, the decision was made that retaining a history of all the changes and moves was more important.
What we've done is move the module from CVS into SVN as is. Then, using the repository browser, move all the files as needed, before a check-out.
Now, this doesn't address your problem when you update an individual file to an older version that it may disappear. We've decided to live with this, because we're trying to move away from a file-centric view of the repository (CVS) to a snapshot-based one. So if we need to go back to an older version, we update the whole project. If you're just looking at the diff history, that works well from TortoiseSVN when we allow moves/renames.