如何在单个 SVN 服务器中安排多个项目?

发布于 2024-07-27 15:24:34 字数 133 浏览 10 评论 0 原文

当有多个相关项目(可识别的、独立的应用程序、共享库)时,您如何准备 SVN 服务器目录结构? 按分行> 项目? 按项目> 分支? 完全不同的东西吗? 或者每个项目都拥有一台 SVN 服务器更好? (考虑到有些项目是密切相关的)

When having several related projects (identifiable, stand alone applications, that share libraries), how do you prepare your SVN server directory structure?
By branch > project? By project > branch? Something entirely different? Or is it better to have one SVN server for every project? (Take into account that some projects are intimately related)

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

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

发布评论

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

评论(9

撩心不撩汉 2024-08-03 15:24:34

标准约定是

  • project1
    • 分支机构
    • 标签
    • 树干
  • 2
    • 分支机构
    • 标签
    • 树干

单个存储库内的 。 由于这是最常见的约定,因此某些工具只是希望您的项目能够像这样布局。

哪些项目属于哪个存储库更多的是一个判断。 就我个人而言,我会从同一组(例如团队、部门或公司)管理的所有项目的一个存储库开始。

The standard convention is

  • project1
    • branches
    • tags
    • trunk
  • project2
    • branches
    • tags
    • trunk

inside a single repo. Since that's the most common convention, some tools just expect your projects to be laid out like that.

Which projects belong in which repo is more of a judgement call. Personally, I'd start with one repo for all projects managed by the same group, e.g., team, division, or company.

倒带 2024-08-03 15:24:34

查看 subversion 书籍,其中提供了关于 推荐的存储库布局

Check out the subversion book, which offers a section on Recommended Repository Layout

裸钻 2024-08-03 15:24:34

这个问题得到整个部分在 SVN 书中。 我建议从那里开始,询问任何没有明确说明或特定于您的项目的内容。

This question gets a whole section in the SVN book. I would recommend starting there, and asking about anything it doesn't make clear or is specific to your project.

笑看君怀她人 2024-08-03 15:24:34

我会考虑使用 externals 。 如果您有许多相关项目都使用相同的代码库,但您不想将该代码库复制到每个存储库中,请在每个存储库中设置一个外部链接以指向公共代码库。

I'd look into using externals . If you have many related projects that all use the same codebase, but you don't want to copy that codebase into each repository, set up an external link in each repository to point to the common codebase.

迷路的信 2024-08-03 15:24:34
  • root/trunk/projectfolders

  • root/branches/projectfolders

这样,如果需要的话,某人可以获取所有主线项目,而无需获取任何分支。

  • root / trunk / projectfolders

  • root / branches / projectfolders

That way someone can get all the mainline projects without getting any branches if so desired.

驱逐舰岛风号 2024-08-03 15:24:34

对于密切相关的项目,我建议:

root > branch > project

通过这种方式,可以检查单个分支并获取该分支中当前的所有代码。

For projects that are intimately related, I recommend:

root > branch > project

This way it's possible to check out a single branch and get all of the code that's current in that branch.

叹梦 2024-08-03 15:24:34

作为维护大型 svn 存储库的人,我告诉你,不要使用统一的主干。 这将使所有操作变得非常非常慢。 除此之外,从较大的存储库中提取单个项目不仅乏味且敏感,而且当您最终想要剥离一个项目时,还会导致空间浪费。

为每个项目使用单独的存储库,在存储库下有一个主干和标签目录,并且让需要与其他项目绑定的开发人员使用外部资源,按照它们的设计方式。

懒惰并不能充分替代有组织性。

As someone who maintains large svn repos, let me tell you, DO NOT use a unified trunk. It will make all operations much, much slower. Beyond this, extracting a single project out of a larger repo is not only tedious and touchy, but will result in a space waste when you do eventually want to peel away even one project.

Use separate repos for each project, with a trunk and tags directories under the repos, and have developers needing to tie to other projects use externals, the way they were designed.

Lazy is not an adequate substitute for organized.

痴梦一场 2024-08-03 15:24:34

我为每个项目使用一个文件夹,然后在每个文件夹内进行分支。 这样,如果不同的团队正在处理每个项目,他们不需要看到整棵树,只需要看到他们的分支。

I use a folder for each project, then branches within each folder. This way if a different team is working each project, they don't need to see the whole tree, just their branch.

鸵鸟症 2024-08-03 15:24:34

我们为每个项目设置了存储库,因此每个项目都可以有自己的分支/标签等。

此外,对于相互依赖的项目,您可以设置链接的存储库,以便可以共享文件。 到目前为止,这对我们来说效果很好,并且被证明是相当灵活的。

We've setup repositories for each project, thus each can have their own branches/tags etc.

Also, for interdependent projects, you can setup linked repositories so that the files can be shared. This has worked well for us so far and has proven to be quite flexible.

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