如何删除RCS中的文件?

发布于 2024-08-07 10:40:18 字数 119 浏览 3 评论 0原文

RCS 是否有类似 svn/p4 delete 的功能,它可以保留文件历史记录,但将其标记为已删除?或者我只是删除 RCS 目录中的文件和匹配的 v 文件?使用 RCS 删除和/或移动文件的推荐方法是什么?

Does RCS have something like svn/p4 delete where it keeps the file history but marks it as deleted? Or do I just remove the file and the matching v file in the RCS directory? What's the recommended way of removing and/or moving files with RCS?

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

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

发布评论

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

评论(1

原来是傀儡 2024-08-14 10:40:18

RCS 没有像“svn delete”这样的东西;它不管理目录。

您不想删除 RCS 文件 (RCS/filename,v);您需要它来访问过去的作品和历史版本。您根本无法再从 RCS 获得(co)它。

您询问了有关移动文件的问题。有(至少)两个选择。

  1. 一种是将底层文件名 v 文件从一个名称移动到另一个名称 - 可能位于不同的目录中。这会丢失以前的信息 - 由于重命名,您将无法重新生成以前的版本。
  2. 另一种是将底层文件名,v复制到newname,v;这通过保留原始文件来保留历史记录,并为文件的新名称提供历史记录。

我通常使用选项 2,但我对重新生成旧版本的软件非常敏感。

如果您想使用旧文件的名称创建新文件,则此技术会变得更加困难。然后我将使用旧文件并使用新材料启动新的主版本(例如从版本 3.15 跳转到 4.1)。如果您决定您的新材料必须具有版本 1.x 编号,那么您就已经完蛋了 - 您必须在向后兼容和向前移动之间进行选择。我并不那么执着于特定的版本号(但建议不要使用“年份”作为版本号的一部分;我有许多版本为 2003.2 等的文件,当我编辑这些文件时,我一定要记得将版本更改为2009.1等)。

RCS has nothing like 'svn delete'; it does not manage directories.

You do not want to remove the RCS file (RCS/filename,v); you need it for access to past work and historical versions. You simply no longer get (co) it from RCS.

You asked about moving files. There are (at least) two options.

  1. One is to move the underlying filename,v file from one name to the other - possibly in a different directory. That loses the previous information - you would not be able to regenerate a previous release because of the renaming.
  2. The other is to copy the underlying filename,v to newname,v; this preserves the history by leaving the original file in place, and gives the new name of the file a history too.

I generally use option 2, but I'm anal retentive about regenerating old versions of the software.

This technique becomes more difficult if you want to create a new file with the name of the old one. I'd then use the old file and start a new main version (e.g. jump from version 3.15 to 4.1) with the new material. If you decide your new material must have version 1.x numbers, you've hosed yourself - you have to choose between backwards compatibility and forward motion. I'm not so attached to specific version numbers as all that (but would recommend against using 'the year' as a part of the version number; I have a number of files with version 2003.2, etc, and when I edit those, I have to remember to change the version to 2009.1, etc.).

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