刚接触SVN,如何设置?

发布于 2024-07-18 08:40:22 字数 482 浏览 12 评论 0原文

我有一个带有 IIS 的 Windows 2003 Server,我在上面安装了 VisualSVN Server。

我有两个开发人员,他们将使用 TortoiseSVN。

由于这是我第一次设置 SVN 服务器,我对这一切如何工作感到有点困惑。 在我看来,每个开发人员都会在他或她的本地 PC 上拥有存储库的副本,是否每个人都需要在其 PC 上安装 IIS 并在签出之前测试他们的副本?

我应该在服务器上创建一个测试文件夹,然后再创建一个生产文件夹吗? 似乎这会导致副本出现更多问题?

你会怎么办?

编辑

我不知道我在想什么,我忘记了当你调试时VS有一个内置的IIS,所以在客户端或服务器上设置IIS的问题现在不再是问题了。 但我很困惑,我将该网站导入到存储库中,它说它是修订版 2,但我在存储库文件夹中没有看到任何文件。 我是否在 IIS 中创建一个指向我创建的存储库的虚拟文件夹?

I have a Windows 2003 Server with IIS, I installed VisualSVN Server on it.

I have two developers, who are going to use TortoiseSVN.

Since this is my first time ever setting up a SVN server I am kind of confused on how this will all work. The way I see it, each developer would have a copy of the repository on his or her local pc, would each person be required to have IIS installed on their PC as well to test their copies before checking out?

Should I create a testing folder on the server and then a production ready? It seems as if that would cause more issues with copies?

What would you do?

EDIT

I dont know what I was thinking, I forgot that VS has a built in IIS when you debug so the issue about setting up IIS on either client or server is now a non-issue. But I am confused, I imported the site into the repo, it said it was on revision 2 but I dont see any of the files in the repo folder. Do I create a virtual folder in IIS pointing to the repo that I created?

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

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

发布评论

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

评论(9

酒绊 2024-07-25 08:40:22

不,每个开发人员都使用您的存储库,并检查自己的副本来完成他们的工作。 他们不需要在系统上安装 IIS 或 svn 等。

我建议阅读 Subversion 常见问题解答

No, each developer uses your repository, and checks out their own copies to do their work. They do not need IIS or svn, etc, installed on their systems.

I recommend reading up on the Subversion FAQ.

稳稳的幸福 2024-07-25 08:40:22

您的开发人员没有本地存储库,他们的 PC 上有一个工作副本。 通常,这是应用程序的最新版本,开发人员已做出但尚未提交的任何更改。

由于这是一个 Web 应用程序,因此您的开发人员将需要某种类型的本地 Web 服务器来测试它 - 这可能是 IIS,或 Visual Studio 的内置 Web 服务器(尽管它的行为确实与 IIS 有细微的不同)。

您在评论中说:“我的问题是,我不希望开发人员承诺上线网站,以防出现错误。”。

开发人员提交到服务器上的 SVN 存储库:在某些时候,您可能希望将存储库中最新版本的副本导出(也称为“发布”)到您的实时站点。 为了确保它有效,您可以从服务器检查特定版本,测试它,如果它通过测试,则上传它:开发人员将始终检查有错误的代码(即使它构建),因为最好检查频繁地编写代码,而不是在本地构建大量更改然后提交它们,因为这肯定会与其他开发人员所做的工作发生冲突。

分支和标记在这里是有用的概念:当您有一个几乎正确的版本时,您可以将其从源代码树的主“主干”中“分支”出来,修复分支中的任何问题(向后移植到主干)根据需要),然后当您有工作版本时,您可以对其进行“标记”(作为版本 xyz)并上传。 通过这种方式,您始终可以参考已上传代码的特定版本,这使得识别生产中出现的错误变得更加容易。 正如其他人所建议的,请阅读 SVN 文档以获取更多信息。

Your devs don't have a local repository, they have a Working Copy on their PC. Typically, this is the most recent version of the app with whatever changes have been made by the developers but not committed yet.

As this is a web app, then your developers will need some kind of web server locally to test it - this could be IIS, or Visual Studio's built in web server (although that does behave differently to IIS in subtle ways).

You said in a comment: "My problem is I dont want the devs to commit to the live site in case there was a bug.".

The devs commit to the SVN repository on the server: at some point you will want to export (aka 'publish') a copy from the latest version in your repository to your live site. In order to make sure this works, you can check out a specific version from the server, test it, and if it passes the tests upload it: devs will always check in code with bugs (even though it builds) as it's better to check code in frequently than build up lots of changes locally then commit them, as there are bound to be conflicts with work other developers have done.

Branching and Tagging are useful concepts here: when you have a version which is almost right, you 'branch' it away from the main 'trunk' of the source code tree, fix any issues in the branch (back-porting to the main trunk as required), then when you have a working version you 'tag' it (as version x.y.z) and upload it. This way you can always refer to the particular version of the code you have uploaded, which makes it a lot easier to identify bugs which turn up in production. As others have suggested, read the SVN documentation for more info.

━╋う一瞬間旳綻放 2024-07-25 08:40:22

这取决于你的工作方式。 还有关于文件夹结构等的其他讨论,这些讨论直接影响您的使用方式版本控制。

It depends on how you work. There are other discussions about folder structure and such which play directly into how you use version control.

樱娆 2024-07-25 08:40:22

呃,不,没有本地存储库。 设置 SVN 非常简单,几乎是这样。 您需要查找 svn windows 安装程序并在服务器上进行设置。 您需要安装 Apache,然后在设置 http.conf 文件以通过 http 公开 svn 时会遇到一些障碍。 设置安全性有点复杂,因此使用 Windows 身份验证,您需要 WebDav,请在 google 上搜索它。

一旦完成,任何 svn 客户端都可以点击它并签出副本并正常使用 SVN。 如果您真的遇到困难,请在这里发表评论,我会为您获取我们的安装和配置的副本。

好消息是它坚如磐石,一旦你设置好它就会永远运行。

Uh, no, no local repositories. Setting up SVN is easy, well almost. You'll want to look for the svn windows installer and set it up on the server. You'll want to install Apache and then you'll have a little hurdle setting up the http.conf file to expose svn over http. There's a little complexity with setting up security so go with Windows Authentication, you'll need WebDav, google it.

Once that's done, any svn client can hit it and checkout a copy and work with SVN normally. If you get really stuck, comment here and I'll go get a copy of our install and config for you.

The good news is that it's rock solid, once you get it setup it'll run forever.

鲜肉鲜肉永远不皱 2024-07-25 08:40:22

“使用 Subversion 进行实用版本控制”SVN red-bean 是您需要查看的两个来源。

在单个服务器上设置 SVN 并让所有开发人员都指向它。

"Pragmatic Version Control Using Subversion" and the SVN red-bean are the two sources you need to see.

Set up SVN on a single server and have all your developers point to it.

情绪 2024-07-25 08:40:22

我已经在服务器上安装了乌龟,并对发布网站进行更新/检查。 有些人不喜欢签入编译后的代码,但我喜欢在 SVN 中拥有生产编译站点。

如果您在服务器上使用 tortoise,请对 inetpub/website 目录进行初始签出,然后在推出时您只需要使用 tortoise->update 更新目录

当然,如果不首先推出和测试,签入到推出被认为是不好的做法在临时服务器上,但取决于您的团队规模。

I've installed tortoise on the server and do Updates / Checkouts of the release website. Some people don't like checking in compiled code, but I like having the production compiled site in SVN.

If you use tortoise on the server, Do the initial checkout to the inetpub/website directory and then on rollouts you just need to update the directory using tortoise->update

Of course checkin to rollout is considered bad practice without first rolling out and testing on staging servers, but depends on your team size.

情绪 2024-07-25 08:40:22

我使用了以下资源来学习 SVN:

http://www.polymorphicpodcast.com/shows/subversion /

http://www.dimecasts.net/Casts/ByTag/SVN

发现都不错,而且边看边学更容易,尤其是入门。

I have used the following resources for learning SVN:

http://www.polymorphicpodcast.com/shows/subversion/

http://www.dimecasts.net/Casts/ByTag/SVN

Found both quite good, and learning by watching can be easier especially for getting started.

梦纸 2024-07-25 08:40:22

否 - 您的中央服务器将维护存储库。 您的开发人员将获取存储库的副本,进行更改,然后将其提交到您的存储库。

如果您想成功部署 subversion,实际上有很多事情需要弄清楚。

一篇关于在 Windows 上设置 Subversion 的非常好的文章 - https://blog。 codinghorror.com/setting-up-subversion-on-windows/

No - your central server will maintain the repository. Your developers will get copies of the repository, make changes, and then commit them to your repository.

You actually have quite a few things to figure out if you want to do a successful deployment of subversion.

One really good article about setting up subversion on Windows - https://blog.codinghorror.com/setting-up-subversion-on-windows/

三生殊途 2024-07-25 08:40:22

不可以,SVN 服务器必须安装在单台计算机上。 每个开发人员指向这台计算机并在本地(最终)获取存储库的完整副本或部分副本。

您还可以从 O'Reilly 购买一本有关 Subversion 的书。 抱歉,不记得标题了,但这对我很有帮助。

一切顺利 ! 西尔万.

No, SVN server must be installed on a single computer. Each developer point at this computer and get locally (and eventually) a full copy or a partial copy of the repository.

You may also buy a book from O'Reilly about Subversion. Don't remember the title, sorry, but it helps me a lot.

All the best ! Sylvain.

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