任何用于分析不同代码、将其纳入源代码管理(Subversion)的工具

发布于 2024-08-11 00:08:18 字数 378 浏览 5 评论 0原文

假设您接管了不同版本中存在的一些代码,没有源代码控制(可能有一些备份)。是否有一些工具可以让您分析关系(不仅仅是差异),或者让您在源代码管理中重建历史记录?

如果将其加载到 Subversion 中,是否可以更好地将最佳版本指定为基本版本,而将其他版本指定为分支?

你必须从一开始就做对吗?喜欢在最新版本之前加载备份吗?

如果您稍后发现一个分支中的一个文件是另一分支中文件的重命名版本怎么办?

目的当然是随着时间的推移将代码合并到代码库中,或者在适当的时候使用不同分支的功能,同时在开始工作之前不必预先花费大量时间。

(11 月 13 日添加) 在这方面是否有比 Subversion 更好的版本控制系统?即寻找关系,在文件进入系统后创建它们以及一般合并支持?

Say you take over some code that exists in different versions, no sourcecontrol (possibly some backups). Are there some tools that let you analyze relationships (more than diffs), or let you reconstruct history in sourcecontrol?

If you load it into Subversion, can you do better that to designate the best version as base-version, and the others as branches?

Would you have to get it right from the beginning? Like loading backups before latest versions?

What if you discover later that one file in one branch is a renamed version of a file in another branch?

The purpose is of course to merge code the codebase over time, or use functionality from different branches when appropriate, While not having to spend a lot of time upfront before I can start working.

(Added 13NOV)
Are there any version control systems that are better than Subversion for this? I.e. finding relationships, creating them after the files are in the system and general merging support?

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

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

发布评论

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

评论(2

清风挽心 2024-08-18 00:08:18

听起来您想将材料导入到存储库中,以“模拟”如果历史记录一直处于版本控制之下(例如,提交文件的版本 1,然后提交版本 2)的情况, ETC。)。

我认为这个练习不值得你花时间;相反,由于您的首要任务应该是尽快将所有内容置于版本控制之下,因此我认为您应该将所有旧代码放入一个“存档”文件夹中,然后将其与当前代码一起导入。这样,至少您将在存储库中拥有所有内容并可以从那里开始工作。

不要浪费时间进行虚假修订——从长远来看,这不会给你带来任何好处。

It sounds like you want to import material into your repository in such a way as to “simulate” what the history would have looked like if it had been under version control the whole time (e.g., commit version 1 of a file, then version 2, etc.).

I don’t think this exercise would be worth your time; instead, since your priority should be getting everything under version control as soon as possible, I think you should just throw all the old code into one “Archive” folder and import that, along with the current code. That way, at least you’ll have it all in the repository and can start working from there.

Don’t waste your time creating fake revisions — it’s not going to gain you anything in the long run.

放我走吧 2024-08-18 00:08:18

您可以尝试使用 Bazaar、Mercurial 或 Git 等 DVCS。

在代码的每个版本中初始化一个存储库,将所有代码添加到第一次提交,然后将不同版本合并到一个分支中。在 DVCS 中,每个分支都可以与任何其他分支合并。

如果您想保留历史记录中的差异,可以将结果导入到 subversion 中,否则您可以删除 DVCS 信息并将合并结果检查到您的 SVN 中。

You could try out a DVCS like Bazaar or Mercurial or Git.

Initialize a repo in each version of your code, add all code to the first commit, then merge the different versions together into one branch. In DVCS every branch can be merged with any other branch.

The result can be importet into subversion, if you would like to keep the differences in history, otherwise you can just delete the DVCS information and check the merged result into your SVN.

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