CVS 只读签出
我必须在项目中使用CVS。 到目前为止,在我的整个工作生涯中,我只使用过perforce,而且我对CVS一无所知,我阅读了整个CVS手册,但找不到如何做到这一点:
在perforce中,当你签出一个文件时,你首先有执行 p4 edit filename.C (告诉 perforce 系统您有意编辑此文件,并最终提交它)
在 CVS 中,当我通过执行 cvs co fileName.C 签出文件时,该文件是已经处于准备编辑状态。
CVS 中与 perforce 中的通常做法等效的是什么?
[我喜欢在开始编辑文件之前必须首先明确指示源代码管理系统您编辑文件的意图的额外安全性。 这使您可以轻松查看已编辑的文件、恢复更改等。此外,您还可以通过显式编辑文件来进行临时更改,而无需先执行 p4 edit fileName.C,稍后您就知道这些只是临时的更改]
非常感谢!
I have to use CVS in a project. So far in my whole working life, I have used only perforce and I do not know anything about CVS, I read the whole CVS manual but could not find how to do this :
In perforce, when you check out a file, you first have to do a p4 edit filename.C (telling the perforce system that you are intentionally about to edit this file with the intention of eventually submitting it)
In CVS, when I checked out a file by doing cvs co fileName.C, the file is already in ready-to-edit state.
What is the equivalent in CVS of what is the usual practice in perforce?
[I like the additional safety of having to first explicitly instructing the source control system of your intention of editing the file before you start doing so. This allows you to easily look at the files that you have edited, revert changes etc. In addition, you can also make temporary changes by explicitly editing files without first doing p4 edit fileName.C and later you know that you meant these only as temporary changes]
Many Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以执行以下操作:
然后,当您想要编辑文件时,您必须
此外,如果您希望提交将文件返回为只读,您必须
或者忘记 -r 并仅设置 CVSREAD 环境变量。 容易多了!
从 CVS 手册页的全局选项部分:
例子:
You can do something like this:
then when you want to edit a file, you must
Also, if you want commit to return the files to read-only, you must
Or, forget about the -r and just set the CVSREAD environment variable. Much easier!
From the CVS man page, in the global options section:
Example:
CVS 有一个“编辑”命令,它通知服务器您正在编辑文件。 老实说,这个很少被使用。 编辑文件时无需通知系统,通过检查内容是否不同即可轻松确定。
Subversion 具有锁定文件的能力,这可能是您想要做的更多事情。
分布式系统没有这样的概念,因为它们不需要实现它(也没有任何可能的方式)。
顺便说一句,CVS 的选择令人费解。 现在有更好的源代码控制技术。
CVS has an "edit" command, which informs the server that you are editing the file. This is honestly rarely used. There is no need to inform the system when you are editing a file, this can be easily determined by checking if the contents differ.
Subversion has the ability to lock a file, which may be more of what you're trying to do.
Distributed systems have no such notion, as there is no need for them to implement it (nor any possible way).
On a side note, the choice of CVS is puzzling. There are far better technologies for source control available now.