用于 Visual Studio 开发的无服务器 SVN

发布于 2024-12-07 13:31:50 字数 236 浏览 0 评论 0原文

对于我们的小团队来说,安全不是问题。 是否有任何令人信服的理由说明我们可能需要使用某种 SVN 服务器,而不仅仅是使用网络共享上的文件?

编辑

抱歉——我认为我沟通得不太好。

我想使用SVN进行版本控制。我认为我不需要“服务器”。团队成员都可以将其 SVN 客户端指向网络位置。

这样就够了吗?

或者我需要一个“服务器”吗?

Security is not an issue for our small team.
Is there any compelling reason why we might need to use an SVN server of some sort, rather than just using files on a network share somewhere?

EDIT

Sorry--I don't think I communicated very well.

I want to use SVN for version control. I think that I do not need a "server". The team members can all point their SVN clients to a network location.

Is that good enough?

Or do I need a "server"?

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

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

发布评论

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

评论(10

她说她爱他 2024-12-14 13:31:50

是的,您可以在某个文件夹上创建一个存储库并将您的客户端指向那里,实际上不需要 svnserve 进程或 apache2 + mod_svn 。

然而,您应该考虑服务器有几个原因:

  • 同步性:基于文件的存储库会被访问它的客户端更改。如果您的客户之一的时钟与团队其他成员不同步,他/她在极少数情况下可能会损坏存储库数据。然而,服务器总是有唯一的时间。
  • 可扩展性:当每天的提交量增加时,基于文件的锁定/提交/解锁序列可能会导致文件服务器上出现意外负载,并因较长的响应时间而让您的团队感到沮丧。
  • 可扩展性:您或您的团队迟早会发现对票证系统的需求(用于 QA/QC 或第三级支持,例如 Trac、Redmine、Bugzilla),然后遇到与版本控制相关的问题及其修复确实会成为一个问题。必须有。这些票证系统始终接受 svn:// URL,但很可能会拒绝基于文件的存储库。

我不知道这些理由对你来说是否足够令人信服,但你确实可以推迟使用服务器的决定,直到它开始变得不可避免 - 即使你的团队永远不会成长,也可以无限期地这样做。

Yes, you can create a repository on some folder and point your clients there, no svnserve process or apache2 + mod_svn is really needed.

There are a however a couple of reasons why you should consider a server:

  • Synchronicity: A file based repository is altered by the clients that access it. If one of your clients' clock is out of sync with the rest of the team, he/she may in rare cases corrupt the repository data. A server however will always have a unique time.
  • Scalability: When the amount of commits per day grows, the file based lock/commit/unlock sequence may cause unexpected load on the file server and frustrate your team with long response times.
  • Extensibility: Better sooner than later you or your team will discover the need for a ticket system (for QA/QC or 3rd level support, e.g. Trac, Redmine, Bugzilla) and then having issues and their fixes associated with revision control will indeed become a must have. These ticket systems always accept a svn:// URL but will most likely reject a file based repository.

I don't know if these reasons are compelling enough for you, but you can indeed postpone the decision to go server until it starts to become unavoidable - even indefinitely if your team does never grow.

谜兔 2024-12-14 13:31:50

Agent SVN 是 Visual Studio 的 Subversion 插件,可以将其配置为使用文件位置 对于存储库,因此不需要服务器。

Agent SVN is a Subversion plug-in for Visual Studio and it can be configured to use a file location for the repository and as such no server is required.

沫雨熙 2024-12-14 13:31:50

svn的主要目的是进行版本控制。
使用文件来保持版本控制并不容易。顺便说一句,你可以在你自己的电脑上本地设置“svn 服务器”

The main purpose of svn is for version control.
Using files is not easy to keep versioning. And btw, you may setup the "svn server" local in your own pc

浮云落日 2024-12-14 13:31:50

Subversion 使用三个主要协议:

  • svn:
  • http:
  • file:

还有一些其他协议(svn+ssh 和 https),但它们是与上述相关。

如果您使用 file: 协议,则不需要 Subversion 服务器。您所要做的就是将文件协议指向 Subversion 存储库所在的目录:

C> svnadmin create C:\svnrepos\myrepos

C> cd C:\workspace
C> svn co file://C:/svnrepos/myrepos repos

在上面,我在 C:\svnrepos\myrepos 中创建了一个 Subversion 存储库,然后转到另一个目录(非常重要!)并结账。没有服务器正在运行。

这有几个问题:

  • Subversion 存储库目录必须可供每个人读/写访问,这意味着任何人都可以直接修改存储库,而无需通过 Subversion。
  • 我不能 100% 确定挂钩如何工作,或者如果多个用户尝试同时提交,如何处理冲突。
  • 即使您不打算采取任何安全措施,您也可能想知道进行更改的人的姓名。 file:// 协议不会跟踪这一点。你所看到的只是改变的发生,但看不到是谁做出的改变。

最后:

  • 运行服务器并不是那么困难。

因此,尽管您可以将 Subversion 存储库放在网络共享上并且每个人都可以使用 file:// 协议,但确实没有充分的理由这样做。事实上,我使用 Subversion 作为我自己的个人存储库,我是唯一使用它的人,而且我不使用 file:// 协议。

您可以轻松地将 svnserve 作为 Windows 服务运行,因此只要您的计算机启动,它就会自动启动。而且,设置非常简单。根本没有理由不使用它。

所以,无论如何,不​​妨继续以正确的方式去做。

顺便问一下,您如何通过 Visual-Studio 使用 Subversion?我建议您查看 ankhsvn,它允许您直接在 Visual-Studio 中访问 Subversion。

Subversion uses three main protocols:

  • svn:
  • http:
  • file:

There are a few others (svn+ssh and https), but they're related to the above.

If you use the file: protocol, you don't need a Subversion server. All you have to do is point the file protocol to the directory where your Subversion repository lives:

C> svnadmin create C:\svnrepos\myrepos

C> cd C:\workspace
C> svn co file://C:/svnrepos/myrepos repos

In the above, I created a Subversion repository in C:\svnrepos\myrepos and then went to another directory (very important!) and did a checkout. No server is running.

There are several issues with this:

  • The Subversion repository directory must be read/write accessible to everyone which means that anyone can directly modify the repository without going through Subversion.
  • I'm not 100% sure how hooks work or how collisions are handled if more than one user attempts to commit at the same time.
  • Even if you don't plan to have any security, you probably want to know the name of the person who made the change. The file:// protocol doesn't track that. All you see is that changes were made, but not by whom.

And, finally:

  • Running a server isn't all that difficult.

So, although you could put the Subversion repository on a network share and everyone can use the file:// protocol, there really isn't a very good reason to do that. In fact, I use Subversion as my own personal repository where I'm the only one using it, and I don't use the file:// protocol.

You can easily run svnserve as a Windows service, so it automatically starts whenever your machine starts up. And, it's very simple to setup. There's simply no reason not to use it.

So, might as well go ahead and do it the right way anyway.

By the way, how are you using Subversion through Visual-Studio? I suggest you look at ankhsvn which allows you to access Subversion directly in Visual-Studio.

叫嚣ゝ 2024-12-14 13:31:50

SVN 与安全无关;它与安全有关。这是关于维护源代码的历史记录。

我想不出您不想设置 SVN 服务器的令人信服的理由。我在家里的个人桌面上使用一个用于我自己的开发。这与安全无关;而是与安全有关。这是为了保留我的源代码历史记录,以防万一我搞砸了并想要恢复。

这也与习惯有关:“首先我们养成习惯,然后习惯塑造我们。”即使在简单的情况下,也要学会始终正确地做事。

SVN isn't about security; it's about maintaining history of your source code.

I can't think of a compelling reason why you would not want to set up an SVN server. I use one at home on my personal desktop for my own development. It's not about security; it's about keeping my source code history in case I screw up and want to revert.

It's also about habits: "First we make our habits, then our habits make us." Learn to do it right all the time, even in simple situations.

老旧海报 2024-12-14 13:31:50

想象一下与多人一起从事同一个项目。并且两者同时修改同一个文件。如果你们都在同一个文件共享上工作,那就会很糟糕。
使用某种源代码控制的另一个原因是能够跟踪更改。
这样你就可以通知你的同事他哪里搞砸了。 :-)

Imagine working on the same project with multiple people. And both are modifying the same file at the same moment. If you both work on that same fileshare that is going to be bad.
Another reason for using some kind of source control is being able to keep track of changes.
This way you can notify your collegue where he screwed up. :-)

小梨窩很甜 2024-12-14 13:31:50

嗯,如果你需要安全性,那么 Subversion 不是正确的工具,它是正确的工具:

  • 如果你想让一个团队同时处理相同的源(并且能够恢复错误的提交),
  • 如果你想避免最后一个保存文件的人会删除另一个人所做的所有修改(如果文件位于同一网络共享上),
  • 如果您需要进行并行开发(并为此创建分支)
  • ,如果您需要能够重新开发提取标记版本(当递交申请)

hmmm, subversion is not the right tool if you need security, it is the right tool :

  • if you want to have a team working on the same sources at the same time (and be able to revert a bad commit)
  • if you want to avoid that the last one who save a file erase all the modifications made by the other (in case of files on the same network share)
  • if you need to make parallel developement (and create branches for that)
  • if you need to be able to re-extract a tagged version (usefull when delivering the application)
过度放纵 2024-12-14 13:31:50

设置服务器几乎是微不足道的,所以我想问为什么你不需要服务器。但还有其他一些原因:

  1. 可靠性。网络文件系统(例如 SMB 共享)并不像
    可靠,尤其是当多个用户写入时
    同时相同的文件。 SVN 并未明确声明
    支持这一点。
  2. 表现。通过以下方式提供对文件的访问
    服务器将比通过网络更快
    分享。
  3. 审计。即使您不关心安全性,您也希望您的更改与用户相关联。通过服务器强制登录,服务器可以使用该用户名来记录谁进行了更改。
  4. 安全。如果您使用网络共享,则所有用户都可以直接读取/写入存储库文件。我知道您不关心安全性,但是简单的错误怎么办?例如有人不小心从存储库中删除了文件。

下载并安装 Subversion Edge 等内容。这在 Windows 上安装很简单,它为您提供了一个 Web UI 来管理服务器。您还可以获得用于浏览存储库的 Web UI,这在研究错误时非常有用。

Setting up a server is almost trivial, so I would ask why would you NOT want a server. But here are some other reasons:

  1. Reliability. Network filesystems such as SMB share are not as
    reliable, especially when it comes to multiple users writing to the
    same files at the same time. SVN specifically does not claim to
    support this.
  2. Performance. Providing access to the files via a
    server will be significantly faster than doing it over network
    share.
  3. Auditing. You want your changes to be associated with a user, even if you do not care about security. Going through a server forces a login and the server can use that username to record who made the change.
  4. Safety. If you use a network share, then all users have direct read/write access to the repository files. I know you are not concerned with security, but what about simple mistakes? Such as someone accidentally deleting files from the repository.

Download and install something like Subversion Edge. This is trivial to install on Windows and it gives you a web UI to manage the server. You also get a web UI for browsing repositories which can be useful when researching a bug.

遗忘曾经 2024-12-14 13:31:50

在只有两个人的团队中,某种版本控制比没有版本控制具有巨大的优势。能够回溯更改、分支代码(如果您需要多个版本用于演示目的)以及使用锁定/解锁 + 合并来防止开发人员破坏彼此的代码,这就是您使用 SVN 的原因。单独处理一个项目时也能派上用场。

您可以在 Linux、Mac、Windows 上轻松托管 SVN - 您只需要该计算机能够与开发计算机进行网络连接即可。

On a team of as little as two people, some sort of version control is a huge advantage over no version control. Being able to back-track through changes, branch code if you need multiple versions for demoing purposes, and using lock/unlock + merge to keep developers from murdering each others code is why you use SVN. Comes in handy when working alone on a project, too.

You can host SVN easily on Linux, Mac, Windows - you just need that machine to be network-connectable from the development machines.

冰之心 2024-12-14 13:31:50

需要在某处运行一个 SVN 服务器进程。你无法避免它。它是 SVN 的基本部分,提供对存储库的访问,也是客户端必须指向的内容。

我们使用 VisualSVN。安装起来几乎不费力气。

You need an SVN server process running somewhere. You cannot avoid it. It is a fundamental part of SVN, it is what provides access to your repository, and it is what the clients must point to.

We use VisualSVN. It takes almost no effort to install.

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