views:

130

answers:

3

We're finding ourselves unable to open our project in Visual Studio because SVN is adding lines like

"<<<<<<< .mine"

to our .csproj files.

This is apparently something SVN inserts when it has trouble merging files, but we're not interested in merging things as two people can never have the same file checked out.

How do we set Visual SVN to Replace instead of Merge?

Thanks for any help.

+2  A: 

What do you mean by "two people can never have the same file checked out"? I think you are misunderstanding how Subversion works - checkout is not an exclusive lock on a file.

David M
Argh. I wish someone had made this clear before we "upgraded" from Visual SourceSafe (which did allow file exclusivity). Still, if it worked then it wouldn't be a problem, I guess. Instead we're spending a lot of our time editing conflicts.
Django Reinhardt
So why do these different developers have different versions of the same project files, and is this legitimate or is it not? If it is, then either you must remove the project files into version control, or tell the developers to work on different branches.
reinierpost
What? Legitimate? What do you mean? And how do we "remove the project file into version control"? The .csproj is already in version control, why would we want to "remove" it?
Django Reinhardt
A: 

Visual SVN uses Tortoise on the backend I believe. when you are in a conflicted situation (i.e. SVN cannot merge the two versions cleanly) you should have the option you should get a pop up where you have the option to either "Use Local" or "Use Repository". If you choose "Resolve Later" you'll get what you are describing.

Kyle
Yes, VisualSVN provides an IDE integration wrapper around TortoiseSVN.
David M
+2  A: 

It's doing that because SVN tries to preserve whatever changes you've made to your local working copy. Thats a pretty important aspect to the SVN method of version control so I don't know, and doubt, if its possible to do that. I do know you can tell svn to ignore files, but their changes then won't be committed to the repository, nor updated from the repository.

If its a problem, delete the csproj file, then when you update it will redownload the proper version. Do that whenever theres a problem. If it happens quite a bit, then one of the developers is messing with the file.

Past projects I've worked on had a dozen engineers working on the same projects, and we never had constant merge problems with the .csproj files.

whatsisname