如何让 CVS 删除我刚刚签入的文件夹?

发布于 2024-08-08 03:30:38 字数 438 浏览 1 评论 0原文

我在 Mac OS X 机器上运行 CVS 并从 Windows VM 访问它。它工作得很好(尽管 Mac OS X 附带的 CVS 版本确实很旧)。

但我觉得很烦人的是,我无法通过查看项目文件夹来判断我是否已签出该项目。有没有办法告诉 CVS 命令删除它签入的文件夹,以便我只能编辑已签出的项目?由于我是唯一的用户,我也可以遵循严格的入住/退房制度。

另外,CVS有没有办法自动添加新文件?我不确定如何才能最好地记住我创建的新类,以便将它们添加到 CVS 中的项目中。我知道我应该在创建新文件时cvs add新文件,但随后我经常创建一个新类,然后当我决定根本不需要它时再次删除它。从 CVS 添加和删除此类文件最好是自动的。

或者也许我应该切换到不同的源代码控制系统(易于安装,在 Mac OS X 上运行,并且有 Windows 客户端)?

欢迎任何答案/评论/想法!

I run CVS on my Mac OS X box and access it from a Windows VM. It works great (although the version of CVS that comes with Mac OS X is really old).

But I find it annoying that I cannot tell by looking at the project folders if I have checked out the project or not. Is there a way to tell the CVS command to delete a folder it checks in so that I can only edit a project that I have checked out? Since I am the only user I can just as well follow a strict check-in/check-out regime.

Also, is there a way for CVS to add new files automatically? I am not sure how I can best remember which new classes I create so I can add them to the project in CVS. I know I should probably cvs add new files when I create them, but then I often create a new class and then delete it again when I decide that I don't need it after all. Adding and removing such files from CVS should best be automatic.

Or perhaps I should switch to a different source control system (that is easily installed, runs on Mac OS X, and has a Windows client)?

Any answers/comments/ideas welcome!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

冷了相思 2024-08-15 03:30:38

如果您想删除文件夹,SVN 可能会更好。

SVN could be better in case you want to delete folders.

妄想挽回 2024-08-15 03:30:38

您可以使用“cvs status”查看工作文件夹的状态,并使用“cvs release -d”让 CVS 在删除工作文件夹之前检查工作文件夹中是否有任何未完成的更改。

You can use "cvs status" to see the status of your working folders, and "cvs release -d" to get CVS to check to see if you've any outstanding changes in your working folders before removing them.

神妖 2024-08-15 03:30:38

但我觉得很烦人的是,我无法通过查看项目文件夹来判断我是否已签出该项目。

使用 cvs status 命令。

有没有办法告诉 CVS 命令删除它签入的文件夹,以便我只能编辑已签出的项目?

不,CVS 存储库中的目录始终存在。如果您使用带有 -P 选项的更新 (修剪空),您可以在本地删除它们目录)

另外,CVS 有没有办法自动添加新文件?我不确定如何才能最好地记住我创建的新类,以便将它们添加到 CVS 中的项目中。我知道我可能应该在创建新文件时添加新文件,但随后我经常创建一个新类,然后当我决定根本不需要它时再次删除它。从 CVS 添加和删除此类文件最好是自动的。

不在 CVS 下的文件处于未版本化状态。我建议在提交之前添加文件(而不是在创建新文件时)。也许您应该考虑使用 CVS 的 GUI 工具来促进开发,例如 WinCVS TortoiseCVS

或者也许我应该切换到不同的源代码控制系统(易于安装,在 Mac OS X 上运行,并且有 Windows 客户端)?

是的。确实。 SVN 比 CVS 好得多,并且针对每个平台都有很多成熟的工具。

But I find it annoying that I cannot tell by looking at the project folders if I have checked out the project or not.

Use cvs status command.

Is there a way to tell the CVS command to delete a folder it checks in so that I can only edit a project that I have checked out?

No, directories in CVS repository always exists. You can get rid off them locally if you use update with -P option (prune empty directories)

Also, is there a way for CVS to add new files automatically? I am not sure how I can best remember which new classes I create so I can add them to the project in CVS. I know I should probably cvs add new files when I create them, but then I often create a new class and then delete it again when I decide that I don't need it after all. Adding and removing such files from CVS should best be automatic.

Files that aren't under CVS are in status unversioned. I suggest adding file before commit (not when you create a new file). Maybe you should consider using GUI tools for CVS that facilitate development like WinCVS or TortoiseCVS.

Or perhaps I should switch to a different source control system (that is easily installed, runs on Mac OS X, and has a Windows client)?

Yes. Definitely. SVN in much better than CVS and have lot of mature tools for every platform.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文