有什么合理的方法可以从 subversion 迁移到 cvs 吗?

发布于 2024-07-06 08:27:03 字数 125 浏览 9 评论 0原文

我的公司不知不觉地从 cvs 转向了 subversion,现在我们都希望能恢复 cvs。 我知道有一些工具可以将历史记录和更改从 cvs 迁移到 svn,但没有等效的工具可以执行相反的操作。 关于如何做到这一点有什么建议或想法吗?

My company unwittingly switched from cvs to subversion and now we're all wishing we had cvs back.
I know there's tools to migrate history and changes from cvs to svn and there's no equivalent to do the reverse.
Any suggestions or ideas on how to do this?

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

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

发布评论

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

评论(13

浮世清欢 2024-07-13 08:27:03

我最初将此作为对其他人的答案的评论添加,但后来意识到这是一个答案。 我以前曾做过此类转换,当时没有现有的方法可以从一种 SCM 系统转换到另一种 SCM 系统。

编写一个脚本,从 SVN 存储库中获取提交列表,并一次迭代一个,将它们合并到新创建的 CVS 存储库中,这并不是什么复杂的事情。 让所有分支和标签完全正确可能需要更多工作,但如果您只想保存几个分支的修订历史记录,那应该很容易。

我还认为,切换回 CVS 不会真正获得任何好处,但如果您想这样做,那么您可能会编写自己的脚本。 “svn export”命令无疑在这方面很有用。

I originally added this as a comment to someone else's answer, but then realized that it was an answer, of sorts. I have done these sorts of transitions before, where there was no existing way to convert from one SCM system to another.

It's not rocket science to write a script that takes the list of commits from your SVN repository, and iterates through them one at a time, merging them into a newly-created CVS repository. Getting all the branches and tags exactly correct might be a bit more work, but if you want to just save revision history for a few branches, it should be pretty easy.

I'm also of the opinion that you won't really gain anything by switching back to CVS, but if you want to do so, then you'll likely be writing your own script. The "svn export" command will undoubtedly be useful in this endeavor.

墨落成白 2024-07-13 08:27:03

那么你们的公司如此不喜欢 SVN 而 CVS 做得更好呢? SVN 的设计者竭尽全力使 SVN 体验与 CVS 非常相似。 如果您使用 Tortoise 客户端作为前端,体验非常相似。 SVN 为您提供原子提交,虽然没有完全达到 Perforce 的标准,但比 CVS 领先很多。

我不得不同情你的困境。 我升级了我们的开发团队& IT 团队从 CVS 到 SVN。 我获得了所有正确的 python 脚本来升级所有版本历史记录,并且我们已经愉快地使用 SVN 近 4 年了。 大约三个月前,IT 团队领导决定将他的所有项目从 SVN“升级”,你猜怎么着? 没错,版本控制系统的重担:SourceSafe!

我肯定会坚持使用 SVN,甚至会考虑一些较新的分布式系统,例如 Mercurial。 这些系统没有中央服务器。 他们依赖于能够分支和扩展。 合并数十或数百个同行。 您可以定义自己的拓扑,例如,您可以指定一个特定的对等点作为执行日常构建的对等点。

So what is with SVN that your company dislikes so much and CVS does better? The designers of SVN went out of their way to make the SVN experience fairly similar to CVS. If you use the Tortoise client as a front end the experience is very similar. SVN gives you atomic commits, which while not quite up to the standard of Perforce is miles in front of CVS.

I do have to sympathise with your plight. I upgraded our development team & IT Team from CVS to SVN. I got all the right python scripts to upgrade all the version history and we have been using SVN happily for nearly 4 years. About three months ago the IT Team leader decided to "upgrade" all his projects from SVN to guess what? That's right, the heavy lifter of the version control systems: SourceSafe!

I would definately stick with SVN or even look at some of the newer distributed systems such as Mercurial. With these systems there is no central server. They rely on being able to branch & merge across dozens or hundreds of peers. You define your own topology, so for example, you would specify a particular peer as being the one that performs daily builds.

还给你自由 2024-07-13 08:27:03

我认为不存在可以朝另一个方向发展的工具,因为对它的需求并不多。

如果您确实必须这样做,那么编写一个脚本来遍历 SVN 存储库的历史、获取每个修订并将其提交到 CVS 应该不会很困难。

顺便说一句,我真的很想知道您在使用 SVN 时遇到了什么问题。

I don't think the tools exist to go in the other direction, because there's not much demand for it.

If you really must do it, it shouldn't be very hard to write a script that walks through the history of the SVN repo, getting each revision and committing it to CVS.

BTW, I'm genuinely interested to know what problems you have with SVN.

花心好男孩 2024-07-13 08:27:03

SVN 不太好。
SVN 比 CVS 更好。
如果您想更改,请查看 Mercurial、GIT、Bazaar。

SVN is not great.
SVN is better than CVS.
If you want to change checkout Mercurial, GIT, Bazaar.

想念有你 2024-07-13 08:27:03

当 git 的一个方面在所有这些其他答案中引起您的注意时尚未讨论:git 提供了一个 cvs 服务器模拟,以便您可以迁移到 git(svn 到 git 很容易并且得到很好的支持),然后使用用于以集中方式访问存储库的 cvs 服务器接口。 没有人必须知道您在后台使用 git,并且您不必处理分布式备份问题。

One aspect of git has not been discussed when it has been brought to your attention in all these other answers: git provides a cvs server emulation, so that you might migrate to git (svn to git is easy and well supported) and later use a cvs server interface for accessing the repository in a centralized manner. Nobody has to know you use git in the background and you don't have to deal with distributed backup issues.

梦里的微风 2024-07-13 08:27:03

不是升级。 不要这样做。

说真的,为什么你更喜欢 CVS 而不是 SVN? CVS 实际上是一个假装允许团队在没有明确沟通的情况下工作的玩具。 实在是太可怕了。

如果出于某种原因您需要 SVN 以外的系统,请考虑其他版本控制系统。 有很多,而且几乎都比 CVS 好(事实上,只有 Visual Source Safe 一样差)。

Not an upgrade. Do not do this.

Seriously, why would you prefer CVS to SVN? CVS is literally a toy that pretends to allow teams to work without explicit communication. It really is terrible.

If you need something other than SVN for whatever reason, look at other version control systems. There are many, and they are almost all better than CVS (in fact, only Visual Source Safe is as poor).

猫性小仙女 2024-07-13 08:27:03

你的选择可能非常有限。 请记住,CVS 的积极开发不久前就停止了,因此 CVS 开发人员可能没有为您提供任何工具。 由于 svn 的主要目标之一是成为一个更好的 CVS,这些开发人员可能也不会期望有人会倒退。

但如果你不喜欢颠覆,为什么不看看更现代的分布式系统(git、mercurial 等)呢?

Your options are probably realtively limited. Remember that active development of CVS stopped a while ago, so there are probably no tools for you from the CVS developers. And since one of the main goals of svn was to be a better CVS, those developers will probably not have expected anyone to move backwards either.

But if you don't like subversion, why not have a look at the more modern distributed systems (git, mercurial etc)?

李白 2024-07-13 08:27:03

当你只有锤子时,一切看起来都像钉子。

最好的办法就是学习svn,它会使人变得更见多识广。

when all you have is hammer, everything looks like a nail.

best bet is to learn svn it will make more knowledgeable.

一向肩并 2024-07-13 08:27:03

同意塔奇下士的观点。

SVN 比 CVS 更好,因为它的设计初衷是——大致相同,但有一些简化和新功能。

使用Svn,您可以移动/重命名文件而不会丢失其历史记录; 您可以获得更安全的提交(提交是原子操作)和全局修订。

不管怎样,在切换回 CVS 之前尝试更好地了解它,甚至更好的是,尝试真正理解您作为一个存储库团队的需求。

PS:我认为下士正在谈论 Mercurial

Agree with Corporal Touchy.

SVN is better than CVS, because it was designed to be - it's roughly the same thing, with some simplications and new features.

With Svn, you can move/rename a file without losing its history; you get safer commits (commits are atomic operations) and global revisions.

Anyway, try to get to know it better before swithing back to CVS and even better, try to really understand your needs as a team for a repository.

PS: I think Corporal was talking about Mercurial

咆哮 2024-07-13 08:27:03

svn 应该比 cvs 更好,但在某些方面效果不佳。 其他分布式工具要快得多(svn 慢得要命,甚至 cvs 有时可能更快),比 svn 有更多有用的功能,并且正在快速发展(而在 svn 中看到任何新功能需要数年时间)。 另一方面,svn 非常容易学习并且集中(这对某些人来说很重要)。

svn 团队专注于自己的议程,很难获得开发人员的支持(与其他开源项目相比),一些错误报告长期存在而开发人员没有任何兴趣。

我对 svn 项目的外观和开发方式感到失望,但好吧,也许将来会改变。

svn was supposed to be better than cvs but in some areas that didn't work well. The other distributed tools are a lot faster (svn is slow as hell, even cvs can be faster sometimes), have much more useful features than svn, are developing rapidly (while seeing any new feature in svn takes YEARS). On the other hand svn is quite easy to learn and centralized (this is important for some people).

svn team is focused on own agenda, it's very hard to get support from developers (comparing to other open source projects), some bug reports exists for long time without any interest from developers.

I'm disapointed by how svn project looks and how it's developed but well, maybe that will change in future.

给妤﹃绝世温柔 2024-07-13 08:27:03

我能想到的来自 CVS 的用户的 subversion 的唯一两个缺点是

  • 通过 http(s) 结帐的速度,
  • 缺乏 modulaliases

第一个可以通过使用 svn(+ssh) 来解决,这是与 CVS 使用的更具可比性的格式还有它自己的协议。
第二个有点棘手,但可以通过 svn:externals 来模拟(它有自己讨厌的副作用)
如果您遇到任何其他额外的缺点,我洗耳恭听。

the only 2 drawbacks of subversion I can think of users coming from CVS are

  • the speed of checkouts over http(s)
  • the lack of modulaliases

the first one can be solved by using svn(+ssh) which is the more comparable format as CVS uses its own protocol as well.
the second one is a little trickier, but can be emulated by svn:externals (which have their own nasty sideeffects)
If you encountered any other additional drawbacks, I am all ear..

新一帅帅 2024-07-13 08:27:03

只要注意一点:Bazzar、Mercurial 等(这里有人建议的)都是分布式版本控制系统。 我发现使用这些工具来管理一大群处理相同源代码的程序员几乎是不可能的。 在我的公司,我们使用 SVN,它做得非常好。

Just pay attention to one point: Bazzar, Mercurial etc. (who were advised by some people here) are all distributed version control systems. I found it almost impossible to manage big groups of programmers working on the same source code using these kind of tools. In my company we use SVN and it's doing a wonderful job.

绳情 2024-07-13 08:27:03

不知道你为什么要这样做,但是从 SVN -> 吉特-> CVS 可能会工作

你会运行..

git svn clone http://thesvnserver ourrepo

然后使用以下指南导出回 CVS(不完全确定这会起作用):

http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html

git cvsexportcommit 4a20cbafdf25a141b31a8333284a332d1a4d6072

还有 git cvsserver

No idea why you'd want to do this, but going from SVN -> GIT -> CVS might work

You'd run..

git svn clone http://thesvnserver ourrepo

Then using the following guide to export back to CVS (not entirely sure this will work):

http://issaris.blogspot.com/2005/11/cvs-to-git-and-back.html

git cvsexportcommit 4a20cbafdf25a141b31a8333284a332d1a4d6072

There's also git cvsserver

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