用于 Visual Studio 开发的无服务器 SVN
对于我们的小团队来说,安全不是问题。 是否有任何令人信服的理由说明我们可能需要使用某种 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
是的,您可以在某个文件夹上创建一个存储库并将您的客户端指向那里,实际上不需要 svnserve 进程或 apache2 + mod_svn 。
然而,您应该考虑服务器有几个原因:
我不知道这些理由对你来说是否足够令人信服,但你确实可以推迟使用服务器的决定,直到它开始变得不可避免 - 即使你的团队永远不会成长,也可以无限期地这样做。
Yes, you can create a repository on some folder and point your clients there, no
svnserve
process orapache2
+mod_svn
is really needed.There are a however a couple of reasons why you should consider a server:
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.
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.
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
Subversion 使用三个主要协议:
svn:
http:
file:
还有一些其他协议(svn+ssh 和 https),但它们是与上述相关。
如果您使用
file:
协议,则不需要 Subversion 服务器。您所要做的就是将文件协议指向 Subversion 存储库所在的目录:在上面,我在
C:\svnrepos\myrepos
中创建了一个 Subversion 存储库,然后转到另一个目录(非常重要!)并结账。没有服务器正在运行。这有几个问题:
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: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:
file://
protocol doesn't track that. All you see is that changes were made, but not by whom.And, finally:
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 thefile://
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.
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.
想象一下与多人一起从事同一个项目。并且两者同时修改同一个文件。如果你们都在同一个文件共享上工作,那就会很糟糕。
使用某种源代码控制的另一个原因是能够跟踪更改。
这样你就可以通知你的同事他哪里搞砸了。 :-)
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. :-)
嗯,如果你需要安全性,那么 Subversion 不是正确的工具,它是正确的工具:
hmmm, subversion is not the right tool if you need security, it is the right tool :
设置服务器几乎是微不足道的,所以我想问为什么你不需要服务器。但还有其他一些原因:
可靠,尤其是当多个用户写入时
同时相同的文件。 SVN 并未明确声明
支持这一点。
服务器将比通过网络更快
分享。
下载并安装 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:
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.
server will be significantly faster than doing it over network
share.
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.
在只有两个人的团队中,某种版本控制比没有版本控制具有巨大的优势。能够回溯更改、分支代码(如果您需要多个版本用于演示目的)以及使用锁定/解锁 + 合并来防止开发人员破坏彼此的代码,这就是您使用 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.
您需要在某处运行一个 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.