从 Surround SCM 导入 Git?

发布于 2024-08-01 23:05:43 字数 392 浏览 4 评论 0原文

我的公司在 Surround SCM 中有一个大型代码库,它是几年前从 SourceSafe 迁移的。 我们正在寻求转向更适合我们需求的东西,但事实证明,让我们的历史摆脱环绕声是一个挑战。

谷歌搜索 git importers,我发现 关于自定义导入器的一个很好的教程。 似乎还支持 svn、perforce 和许多其他软件,但不支持 Surround。

只拍摄快照并启动一个新的 git 存储库会更好吗? 或者是否值得编写一个脚本来获取 15 年以上的代码历史?

My company has a large codebase in Surround SCM, which was migrated from SourceSafe a few years ago. We're looking to move to something more suited to our needs, but getting our history out of Surround is proving to be a challenge.

Googling for git importers, I found a good tutorial on custom importers. There also appears to be support for svn, perforce, and many others, but no Surround.

Would it be better to just take a snapshot and start a new git repo? Or is it worth writing a script to get 15+ years of code history?

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

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

发布评论

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

评论(3

小兔几 2024-08-08 23:05:43

发现自己处于这种确切的情况下,我自己编写了这样一个自定义导入器: export-surround-to -git

该方法能够保留完整的历史记录、时间戳、作者、评论、分支、快照等。

该脚本已在有限数量的场景中进行了测试,到目前为止已被证明是成功的。 虽然仍在进行中,但这可能就是您正在寻找的。 它是开源的——所以您可以随意自行改进脚本!

Finding myself in this exact scenario, I've take it upon myself to write such a custom importer: export-surround-to-git

This method is capable of preserving complete history, timestamps, authors, comments, branches, snapshots, etc.

This script has been tested in a limited number of scenarios, and has proven successful so far. While still a work-in-progress, this may be what you're looking for. It's open-source--so feel free to make improvements to the script on your own!

哽咽笑 2024-08-08 23:05:43

在这种情况下,可以编写脚本,但不能获取所有历史记录。

我建议只导入:

  • 主要标签(对于任何超过一年的标签,或者您觉得舒服的任何时期,您不需要完整检查,因为它太旧了)
  • 过去几年的所有标签(主要和次要) 。

然而,迁移到 Git 还需要一项工作,以便识别集中式 Surround 存储库中的模块或应用程序。
尝试将所有这些数据导入一个 Git 存储库将是一个错误,除非它是一个巨大的系统,无法独立开发各个部分(如 Linux 内核)。

请参阅:

In this kind of scenario, a script can be written, but not for getting all the history.

I would recommend only importing:

  • the major labels (for anything older than a year, or whatever period you feel comfortable you won't need the examine in full because it is so old)
  • all the labels (major and minors) for the last years.

However, migrating to Git requires also a work in order to identify modules or applications within your centralized Surround repository.
Trying to import all those data into one Git repository would be a mistake, unless it is one giant system which can not be developed in parts independently one from another (like the Linux kernel).

See:

好菇凉咱不稀罕他 2024-08-08 23:05:43

Surround SCM 有一个 SDK。 我用它来将存储库从 CVS 转移到 Surround。 几年后,一个团队正在考虑迁移到 SVN,并询问我是否可以迁移存储库。 我想出了一个解决方案,其中包括遍历 Surround 存储库并创建一个中间内存数据库,然后对其进行处理。 为了确保日期正确,我会重置计算机上的时钟。 在我完全实施该解决方案之前,我们决定为该团队保留浮动许可证,以便他们需要查看历史并计划重新思考其项目的整个组织时。 (仅供参考,两年过去了,该团队仍在使用 Surround。)

Surround SCM has an SDK. I used this to bring a repository from CVS to Surround. Years later, one team was looking at moving to SVN and asked if I could migrate the repository. I came up with a solution, which consisted of walking the Surround repository and creating an intermediate in-memory database, and then processing it. To ensure dates were right, I would reset the clock on the computer. Before I could fully implment the solution, we decided to keep a floating license for that team for when they needed to look at history and planned on them rethinking the entire organization of their projects. (As an FYI, two years on and that team is still using Surround.)

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