SVN 和文件名“更改”出现问题

发布于 2024-10-12 21:22:19 字数 404 浏览 3 评论 0原文

我正在 Visual Studio 2010 中进行编程,使用 TortiseSVN 和 VisualSVN 作为我的客户端来连接到 SVN 存储库。

总体来说,我在 SVN 方面经常遇到一些问题。不断出现的一件事是,如果我对文件(即文件名)进行更改,或者将它们移动到新文件夹等,我最终会与存储库发生各种冲突,并且只会导致各种奇怪的错误。

我理解版本控制和签入/签出访问的重要性,但是你们大多数人会做什么来处理这种事情呢?我的意思是,我已经尝试完成整个“从 Subversion 中删除”,更改我的文件,然后“添加到 Subversion”的操作,但它似乎并没有很好地完成这项工作。在处理 Web 项目时,这一点尤其令人沮丧,因为随着项目的发展和变得多元化,文件名可能会频繁更改。

有没有标准的方法来处理这种事情,或者这只是 SVN 的缺陷之一?

I am programming in Visual Studio 2010, using TortiseSVN and VisualSVN as my client to connect to SVN repositories.

I am having a bit of a frequent problem though with the whole SVN thing in general. One thing that keeps cropping up is that if I make changes to files - namely filenames, or move them to new folders, etc, I end up getting all kinds of conflicts with the repository and it just causes all sorts of strange errors.

I understand the importance of version control and check-in/check-out access like this, but what do most of you do to deal with this kind of thing? I mean, I've tried doing the whole 'Remove from Subversion', change my file, then 'Add to Subversion' thing, and it just doesn't seem to do the job very well. This is especially frustrating when working on web projects where filenames can change very frequently as a project evolves and becomes multifaceted.

Are there any standard ways to deal with this kind of thing, or is it just one of the flaws of SVN in general?

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

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

发布评论

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

评论(3

一笔一画续写前缘 2024-10-19 21:22:19

首先我必须承认,在过去的几年里,我陷入了 SVN 提供的每一个陷阱。
但99%都是我的错。

常见错误是:

  • 重命名文件并仅将 lowercase.txt 更改为 UPPERCASE.txt(仅限 Windows,为避免这种情况,请先将名称更改为 UPPERCASE1.txt,然后再重命名为 UPPERCASE.txt)
  • 使用资源管理器进行重命名/删除/移动操作(最好使用Tortoises内置方法
  • 交叉合并相关的冲突

以及更多我现在不记得的了。

我还没有使用过visualsvn,但我认为它是构建在Tortoise之上的。如果你使用Visual Studio,我推荐 ankhsvn http://ankhsvn.open.collab.net/ 它与Visual Studio 并捕获您可能犯的大多数错误(全部来自 IDE 内)。

First I must admit that over the last years I stepped in every pitfall SVN offers.
But in 99% it was my fault.

Common mistakes are:

  • Renaming a file and only changing lowercase.txt to UPPERCASE.txt (Windows only, to avoid this change the name to UPPERCASE1.txt first and than to rename to UPPERCASE.txt)
  • Using the explorer for Rename / Delete / Move operations (better use Tortoises Build-In methods
  • Cross Merge related conflicts

and some more I can't remember at the moment.

I haven't used visualsvn yet, but I think it is build on top of Tortoise. If you use Visual Studio, I would recommend ankhsvn http://ankhsvn.open.collab.net/ which has a great integration into visual studio and catches most mistakes you can make (all from within the IDE).

尘曦 2024-10-19 21:22:19

另一个提示:不要尝试在一次提交中移动/删除/重命名一大堆文件和目录。 subversion 服务器和客户端 v1.6(Ankhsvn 和 tortoise 都依赖于此)中至少存在一些错误,这些错误至少会搞砸您的工作副本。多重提交方法将起作用(因此首先重命名、提交,然后移动一个文件夹、提交等)。

Another tip: don't try to move/delete/rename a whole bunch of files AND directories in one commit. There is at least a couple of bugs in subversion server and client v1.6 (where both Ankhsvn and tortoise depend on) that screw up at least your working copy. A multiple commit approach will work (so first rename, commit, then move one folder, commit, etc).

不寐倦长更 2024-10-19 21:22:19

Subversion 将文件名更改处理为删除和添加,这可能会产生一些问题。这只是 Subversion 的固有限制,也是我们中的一些人转而使用不同版本控制系统的部分原因。

Subversion processes file name changes as a delete and an add, which can be somewhat problematic. It's just an inherent limitation of Subversion and is a part of why some of us have switched to using different version control systems.

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