与多个用户一起使用 SVN

发布于 2024-12-19 05:14:32 字数 190 浏览 0 评论 0原文

我们目前正在使用 SVN 来处理我们的代码。然而,有时我们会同时编码。

例如,3 个人查看同一个项目。用户 1 完成某件事并去签入。用户 2 和 3 如何在不丢失当前工作的情况下获得更新?我们尝试过更新命令,但通常会产生一些错误。

我们应该使用 SVN 以外的东西吗?

我正在使用 eclipse 的 svn 存储库。

We are currently using SVN to handle our code. However, sometimes we all code all at once.

For example 3 people check out the same project. User 1 gets something done and goes to check it in. How can Users 2 and 3 get the update without losing their current work? We've tried the update command but usually yields some errors.

Should we be using something other than SVN?

I am using eclipse's svn repository.

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

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

发布评论

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

评论(3

£烟消云散 2024-12-26 05:14:32

Subversion 专为您正在做的事情而设计。不过,您的问题可以通过对 Subversion 工作原理的基本了解来解决。我建议阅读 svn 书籍 的第 1 章和第 2 章。

此外,您在更新中看到的错误可能是冲突,这在本书中有所介绍。

Subversion is designed exactly for what you're doing. However, your questions are covered by a basic understanding of how Subversion works. I recommend reading Chapters 1 and 2 of the svn book.

Also, the errors you're seeing on updates are probably conflicts, which are covered in the book.

书信已泛黄 2024-12-26 05:14:32

如果它产生错误,则意味着您对同一行代码进行了不兼容的更改,这会导致合并冲突。无论您使用哪种 VCS,如果您以不兼容的方式修补同一段代码,都会遇到相同的问题。

VCS 并不能始终解决合并问题。您需要一些协作规则来确定谁在处理代码的哪一部分,这将主要解决合并问题。

实际上,如果您遇到合并冲突,您需要手动解决它,提交回来并让其他用户更新他们的工作副本。

If it yields errors it means you made incompatible changes to the same lines of code, which leads to merge conflicts. Whatever VCS you'll use you'll have the same issues, should you be patching the same piece of code in incompatible ways.

VCS doesn't solve your problems with merging always. You need some collaboration rules as to who's working on which part of code and that will solve the merging issues mostly.

Practically, if you experience a merge conflict, you need to resolve it by hand, commit back and let other users update their working copy.

悲喜皆因你 2024-12-26 05:14:32

你可以尝试Git,但我怀疑问题出在源代码管理软件上。

您使用哪个客户端?更新不应产生错误。开发人员需要学习如何分支、更新、合并和提交代码。这并不总是容易的,但却是必要的。

需要遵循的一些规则:

  1. 尽早并经常入住。您等待登记的时间越长,碰撞和合并的可能性就越大。
  2. 习惯频繁更新。
  3. 始终在提交之前进行更新。

Git 可以使合并变得更容易,但它并不能消除合并。

You could try Git, but I doubt that the problem is the source code management software.

Which client are you using? Update shouldn't be yielding errors. Developers need to learn how to branch, update, merge, and commit code. It's not always easy, but it's necessary.

A few rules to follow:

  1. Check in early and often. The longer you wait to check in, the more likely collisions and merges will be.
  2. Get used to updating frequently.
  3. Always update before you commit.

Git can make merges easier, but it doesn't eliminate them.

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