Web 开发中的 SVN 作为基础代码存储库

发布于 2024-12-10 00:04:54 字数 201 浏览 0 评论 0原文

有人告诉我,SVN 是一种能够管理从同一代码库运行的多个站点的好方法。然而,我正在努力寻找有关 SVN 以及如何以这种方式使用它的足够信息。基本上,我希望将我的电子商务系统放入 SVN,然后在多个站点上运行它,每个站点都有特定的配置设置,以便指定允许的模块。

谁能告诉我如果 (a) SVN 是执行此操作的正确方法 (b) 有任何关于如何最好地做到这一点的材料/教程。

I have been told that SVN is a good method of being able to manage multiple sites running from the same code base. I am struggling however to find out enough information about SVN and how it would be used in this way. Basically, I would look to put my ecommerce system into an SVN and then run it on multiple sites, each having specific configuration settings in order to specify allowed modules.

Could anyone advise me if
(a) SVN is the correct method to do this
(b) There is any material/tutorials out there on how best to do this.

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

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

发布评论

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

评论(2

通知家属抬走 2024-12-17 00:04:54

SVN是一个版本控制工具,而不是一个多站点管理工具。尽管我知道如何以这种方式使用它,但这并不是您开箱即用的。您首先需要了解 SVN。

例如,每个网站都可以有自己的 svn 代码分支。您想要传播到其余分支的任何更新,您都可以与主干合并,然后更新其余分支。

也就是说,分支很快就会变得非常复杂,尤其是对于多个开发人员来说。 Git 处理分支的能力比 SVN 好得多(我的观点)。 Git 也是一个版本控制工具,就像 SVN 一样。但同样,它是为版本控制、多站点管理而设计的。

SVN is a versioning tool, not a multi-site management tool. Although I can see how it can be used in that way, that is not what you get out of the box. You need an understanding of SVN first.

As an example, each website could have it's own svn branch of the code. Any updates that you want to propagate to the rest of the branches, you would merge with trunk, then update the rest of the branches.

That said, branching can very quickly get very complicated, especially with multiple developers. Git handles branching much better than SVN (my opinion). Git is also a versioning tool, just like SVN. But again, it's designed for versioning, bit multi-site management.

凉城 2024-12-17 00:04:54

我想您可以将每个安装视为 SVN 存储库的工作副本,登录到每个系统,并从 SVN 服务器上的最新代码进行签出。

我不推荐这种方法。它会很慢,并且会用 Web 服务器上不需要的一堆 svn 数据污染您的应用程序文件夹。您不想冒险将其放入您的网络根目录中。

我推荐使用rsync。使用 rsync,推送更新比复制本地文件稍微复杂一些。如果您运行的是 Linux,则 rsync 很可能已经在您的系统上。在 Windows 上,您可以在 cygwin 下运行它或找到各种替代实现,例如 DeltaCopy。

如果由于某种原因你不能使用rsync,我会推荐SFTP。

I suppose that you could treat each installation as a working copy of the SVN repository, log in to each system, and do a checkout from the latest code on the SVN server.

I do not recommend this approach. It will be slow and will pollute your application folders with a bunch of svn data that you do not need on your web server. You do not want to risk by putting it insider your web root.

I recommend using rsync. With rsync, pushing out updates is slightly more complicated than copying a local file. If you are running linux, the odds are that rsync is already on your system. On windows you can run it under cygwin or find various alternative implementations, such as DeltaCopy.

If for some reason you can't use rsync won't work, I would recommend SFTP.

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