SVN 和文件名“更改”出现问题
我正在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先我必须承认,在过去的几年里,我陷入了 SVN 提供的每一个陷阱。
但99%都是我的错。
常见错误是:
以及更多我现在不记得的了。
我还没有使用过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:
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).
另一个提示:不要尝试在一次提交中移动/删除/重命名一大堆文件和目录。 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).
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.