在CVS中移动文件而不重置版本号 [英] Move a file in CVS without resetting the revision number

查看:73
本文介绍了在CVS中移动文件而不重置版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在源代码树中移动源文件。例如,将一堆文件放入一个公共程序集中。我一直在这样做,我从CVS中删除了文件,然后再次将其添加到新位置。问题是文件的修订号重置为1.1。是否有一些简单的方法可以移动东西而无需重新设置数字。

Lately I've be moving source files around in our source tree. For example placing a bunch of files into a common assembly. I've been doing this my deleting the file from CVS and then adding it again in the new spot. The problem is the revision number of the file resets back to 1.1. Is there some simple way to move things without having the number reset.

我可能应该提到我没有访问存储库的权限,因此任何需要帮助的内容都对我没有帮助,但可能对其他人有帮助。

I probably should have mentioned that I don't have access to the repository so anything that requires that doesn't help me but it might help others.

推荐答案

无法使用仅客户端命令来移动文件。您需要访问服务器文件系统,并且可以将存储库中的,v文件移动到新位置。这将保留所有历史记录,因为CVS将每个修订版本及其注释记录在该文件中。

There is no way to move files around with client-only commands. You need access to the servers file system and can move the ",v" file in the repository to a new location. This will keep all history, since CVS records every revision and their comments in that one file.

请记住,文件已移至 Attic子文件夹(可以从客户端看到)。通过这种方法,可以在删除文件后恢复文件。

Keep in mind that files are moved into an "Attic" subfolder (which cannot be seen from the client) when they are deleted. This is how files can be restored after they have been deleted.

通常,这种方法没有立即出现的问题,但是如果决定检查,则必须考虑后果。

Generally there are no immediate problems with this approach, however you have to consider the consequences should you decide to check out an earlier version of your product which might rely on the previous directory structure!

这是其他版本控制系统(如Subversion)具有明显优势的地方。

This is where other revision control systems like Subversion have a definitive advantage.

这篇关于在CVS中移动文件而不重置版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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