每种编程语言都有单独的 Subversion 分支吗?

发布于 2024-08-16 16:04:01 字数 295 浏览 2 评论 0原文

在某些项目中,我必须处理不止一种编程语言(例如与 C# 或 Java 应用程序通信的 Delphi GUI 应用程序)。 Subversion 存储库当前包含三个顶级分支,每种语言一个。

我是否应该更改此设置并将项目的所有部分分组到主干中,如下例所示,以使项目级别的分支和标记更容易?

project1
  branches
  ...
  tags
  ... 
  trunk
    csharp_app
    delphi_app
    java_app
    ...
project2
...

In some projects, I have to deal with more than one programming language (for example a Delphi GUI application which communicates with an C# or Java app). The Subversion repository currently contains three top branches, one per language.

Should I change this and group all parts of the project in the trunk like in the following example to make branching and tagging on project level easier?

project1
  branches
  ...
  tags
  ... 
  trunk
    csharp_app
    delphi_app
    java_app
    ...
project2
...

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

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

发布评论

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

评论(4

意犹 2024-08-23 16:04:01

当这些单独的子项目交互时,它们需要同步移动,并且您需要一起标记/分支/发布C#/Java/任何组件。如果它们不相关,那么我会提倡(也许)单独的存储库,或同一存储库中的单独目录。但不是分支或标签。

分支用于管理同一代码库上的不同开发流。标签用于指示项目发展中的特定点。

我认为编程语言无关紧要。问问自己您的可发布内容是什么,以及您需要如何管理它。我过去曾在包含 Java 和 C++ 的项目中成功地做到了这一点,并且语言不是问题 - 它使您需要管理的组件保持同步。

我不一定会为每种语言创建一个新的顶级目录。如果您的 Java 组件突然需要 JNI 层,会发生什么情况?让我印象深刻的是,实现反映在顶级目录结构中,这实际上不应该是一个问题。

As these separate sub projects interact, then they need to move in lockstep, and you need to tag/branch/release the C#/Java/whatever components together. If they're unrelated then I would advocate (perhaps) separate repositories, or separate directories within the same repository. But not branches or tags.

Branches are used to manage different development streams on the same codebase. Tags are used to indicate a particular point in the project's evolution.

I think the programming language is irrelevant. Ask yourself what your releasable is, and how you need to manage this. I've done this successfully in the past with projects incorporating Java and C++, and the language is not the issue - it's keeping the components in sync that you need to manage.

I wouldn't necessarily create a new top-level directory per language. What happens if your Java component suddenly requires a JNI layer ? It strikes me that the implementation is reflected in the top-level directory structure, and that shouldn't really be a concern.

我不会写诗 2024-08-23 16:04:01

当您管理单个项目时,编程语言是无关紧要的。单个模块可以用多种编程语言编写,但仍然耦合得太紧密,不值得分离。如果应用程序的每个模块(无论是否用相同语言编写)足够独立,可以被视为一个单独的项目(因此,成为独立的版本),您可能需要将其分开。否则,不要这样做。

Programming language is irrelevant when you're managing a single project. A single module may be written in a variety of programming languages but still be too tightly coupled to worth separating. If each module of the application (whether or not it's written in the same language) is independent enough to be considered a separate project (and consequently, become independently versioned), you may want to separate it. Otherwise, don't do that.

原来是傀儡 2024-08-23 16:04:01

我认为这不是一个好主意,因为从理论上讲,不同的组件可能会破坏兼容性,并且如果它们不保持同步,则很难返回到上次工作良好的配置。

I don't think it's a good idea, because theoretically the different components could break compatibility, and if they don't stay synced up it would be hard to go back to the last working good config.

巴黎盛开的樱花 2024-08-23 16:04:01

是的。标准是应用程序之间是否需要某种形式的功能同步,以及通信协议(API、共享代码、共享库)可能会随着时间的推移而改变。如果应用程序彼此无关,则分开存储库。在存储库中使用多种语言编写的应用程序是无关紧要的。

Yes. The criterion is whether the apps require some form of synchronization of their features between each other, and that communication protocol (API, shared code, shared libs) may change over time. If the apps have nothing to do with each other, then separate repositories. Having apps written in multiple languages in the repository is irrelevant.

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