使用 svn:externals 更新多个项目

发布于 2024-09-26 12:10:37 字数 977 浏览 5 评论 0原文

概述

我在 Visual Studio 中使用 VisualSVN,在 Windows 上使用 VisualSVN Server,当然还有 TortoiseSVN。我想知道通过多个解决方案共享多个项目的最佳方法是什么,以及是否有更好的方法。

布局

我的存储库看起来像这样(不是他们的真实姓名):

Library.Common
Library.Web
Library.DB
Library.CMS
Customer1.Site
Customer2.Site

流程

要创建包含常见项目的新站点:

  1. 在 SVN-Server 中创建存储库,例如“Customer3.Site”

  2. 使用 Visual Studio 2008 创建网站,命名为“Customer3.Site”,VisualSVN 用于提交到在步骤(1)。

  3. 编辑 Customer3.Site 的属性并将必要的项目指定为 svn:externals,例如“Library.Common”、“Library.DB”等。

  4. 执行更新,获取这些外部项目,并将它们添加到我在 Visual Studio 中的解决方案中,添加对 Customer3 的必要引用。站点 Web 项目并点击构建。

到目前为止,一切都很好。

问题

所有这些都工作得很好,我很高兴如果我必须修改任何核心库项目,我可以在相同的环境中这样做并将它们提交到存储库。随着越来越多的客户站点建立起来,我将不得不跟踪我所做的事情并记住 SVN 更新并重建这些站点,这似乎是一项相当冗长的任务。

有没有更好的方法,更最佳实践的解决方案?我这样做是否违反了任何基本的 SVN 法律?我想找到一个好的解决方案,既不需要花费太多时间,也不太复杂。

Overview

I am using VisualSVN in Visual Studio, VisualSVN Server on Windows, and of course, TortoiseSVN. I wanted to know what the best method of sharing multiple projects over multiple solutions was, and if there was a better method.

Layout

My Repository kind of looks like this (not their real names):

Library.Common
Library.Web
Library.DB
Library.CMS
Customer1.Site
Customer2.Site

Process

To create a new site that contains common projects:

  1. Create Repository in SVN-Server, e.g. "Customer3.Site"

  2. Create Web site using Visual Studio 2008, named "Customer3.Site", VisualSVN used to commit to the repository created in step (1).

  3. Edit properties of Customer3.Site and specify the necessary projects as svn:externals, e.g. "Library.Common", "Library.DB", etc.

  4. Perform an update, to get these external projects, and add them to my solution in Visual Studio, add the necessary references to the Customer3.Site web project and hit build.

So far so good.

The Problem

All this works fine, I am happy that if I have to modify any of the core Library projects I can do so right in the same environment and commit them to the repository. As more and more customer sites are built, I will then have to keep track of what I've done and remember to SVN Update and rebuild those sites which seems quite a long-winded task.

Is there a better way of doing this, a more best-practice solution? Am I breaking any fundamental SVN laws by doing it this way? I want to find a good solution that doesn't cost too much time and isn't overly complex either.

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

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

发布评论

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

评论(1

帅气尐潴 2024-10-03 12:10:37

我一直面临着类似的问题...我正在为 WordPress 设置一个基本安装包,我们将使用它来快速设置站点,它包含 WordPress 的核心 + 一组基准插件,包括第三方和我们创建的自定义的。一切几乎都来自 SVN。

不同的插件有不同的版本/标签,并且设置一个 svn 外部指向每个项目的特定标记版本将是一场噩梦......然后必须进入每个项目并进行属性调整,然后更新。

将要实施的是根据需要提供特定版本的供应商分支。然后我所要做的就是更新客户端站点,因为它们将始终指向最新版本(在供应商分支中我的控制下)。

至于你的问题,以及我的情况:我可能会编写一个提交脚本,以便在更新供应商分支中的某些内容时自动更新所有项目。

I've been facing a similar issue ... I am setting up a base install package for WordPress, something we would use to quickly get a site setup, it contains the core of wordpress + a set of baseline plugins, both third party and custom ones we've created. Everything pretty much comes from SVN.

Different plugins have different versions/tags and to setup an svn external pointing to a specific tagged version per project would be a nightmare ... only to then have to go into each and every project and do a property adjustment and then an update.

What going to be implementing is a vendor branch with specific versions as needed. All I should then have to do is update the client sites, since they will always be pointing to the latest versions (under my control in the vendor branches).

As to your problem, and also in my case: I would probably write a commit script to update all projects automatically when something in the vendor branch is updated.

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