Ciel
Ciel

Reputation: 17772

Trouble with SVN and Filename 'changes'

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?

Upvotes: 4

Views: 1179

Answers (3)

Jürgen Steinblock
Jürgen Steinblock

Reputation: 31743

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).

Upvotes: 4

rene
rene

Reputation: 42494

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).

Upvotes: 1

Keith Irwin
Keith Irwin

Reputation: 5668

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.

Upvotes: 0

Related Questions