是否有允许跟踪文件名更改的源代码控制系统?

发布于 2024-07-05 20:55:18 字数 193 浏览 4 评论 0原文

所以,我已经使用我的 cvs 存储库有一段时间了。 虽然我错过了一件事 - 如果我重命名存储库中已有的文件,我需要从那里删除旧名称的文件并添加新文件。 因此,我失去了所有的变更历史。 有时需要重命名现有项目中的文件。

据我所知,cvs/svn 无法处理这样的事情,还是我错了? 如果没有,您会推荐什么其他允许重命名文件的源代码控制系统?

So, I've been living with my cvs repositories for some time. Though there is a thing I miss - if i rename a file that is already in repository, I need to delete the one with old name from there and add the new one. Hence, I loose all my change-history. And sometimes there's a need to rename a file in alredy existing project.

From what I saw, cvs/svn can't handle something like this, or am I wrong? If not, what other source control system would you recommend, that allows the renaming of files?

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

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

发布评论

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

评论(5

画骨成沙 2024-07-12 20:55:18

Subversion 可以做到这一点,但你必须使用

svn move <oldfile> <newfile>

Edit 来做到这一点:在这十年里,我们做 git mv;,或者只使用 mv,git 通常会自行解决。

Subversion can do this, but you have to do it with

svn move <oldfile> <newfile>

Edit: And in this decade, we do git mv <oldfile> <newfile>, or just use mv and git usually figures it out on its own.

葮薆情 2024-07-12 20:55:18

在线 CVS 手册 有关如何执行此操作的一些详细信息:

移动文件的正常方法是发出 cvs rename 命令。

$ cvs 重命名旧的新的 
  $ cvs commit -m“将旧名称重命名为新名称” 
  

这是移动文件的最简单方法。 它不容易出错,并且保留了所做操作的历史记录。 CVSNT 客户端可以通过检出旧版本的存储库来检索原始名称。

仅 CVSNT 服务器 2.0.55 及更高版本支持此功能。

The online CVS manual has some detail on how to do this:

The normal way to move a file is to issue a cvs rename command.

$ cvs rename old new
$ cvs commit -m "Renamed old to new"

This is the simplest way to move a file. It is not error prone, and it preserves the history of what was done. CVSNT clients can retrieve the original name by checking out an older version of the repository.

This feature is only supported on CVSNT servers 2.0.55 and later.

我做我的改变 2024-07-12 20:55:18

几乎任何现代版本控制系统都允许这样做(Subversion、Perforce、Vault、git、Mercurial、TFS 等)。

我能想到的唯一不会(或有重大警告)的是 CVS 和 VSS。

Pretty much any modern version control system will allow this (Subversion, Perforce, Vault, git, Mercurial, TFS, etc.).

The only ones I can think of that won't (or that have major caveats) are CVS and VSS.

稍尽春風 2024-07-12 20:55:18

Subversion 具有重命名功能。

Subversion has rename capability.

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