How to get out of subversion source control in visual studio?
Asked Answered
P

5

20

I have a solution that is source controlled with Subversion and AnkhSVN in Visual Studio 2008, but I would like to remove source control from it, how do I do that?

Psychosomatics answered 5/5, 2009 at 9:26 Comment(3)
Is it a silly question to ask why you want to de-SCR your project?Angeloangelology
I think I have bound it to high up the root, and now it wants to use a repository it shouldn't be usingPsychosomatics
I had a similar issue where I had a really old project that was actually bound to an SVN server that no longer existed. Needed to unversion all the files so I could add it to our current SVN server.Faenza
C
32

SVN, as opposed to the dreaded VSS, does not clutter your project files with its "bindings": it keeps all its system information in .svn or _svn subfolders inside every version-controlled directory. Thus, "removing" version control from a project effectively means deleting all these folders.

This is tedious, however, so SVN has a special command called svn export which either "exports a clean directory tree from the repository specified by URL" or "exports a clean directory tree from the working copy ".

Critic answered 5/5, 2009 at 9:30 Comment(2)
If you were using Tortoise, you could right click on the root folder of your solution and under the Tortoise SVN sub menu, click Export to gain access to the export command.Enigmatic
You can also export in place, i.e. strip a working copy from its .svn folders, with svn export --force .Pelletier
H
13

As far as I know, AnkhSVN stores bindings in the project and solution files (also cached in solution user options file **.suo*).

I think that you can remove these bindings by going to File | Source control | Change Source Control (or in the dedicated AnkhSVN toolbar). In that dialog there should be a command to Disconnect the projects.

Household answered 5/5, 2009 at 9:43 Comment(2)
This step is optional in AnkhSVN (as registering in the solution and/or projects is optional for most project types), but you should do this if you did mark your project as managed by Subversion before.Moorings
I did this, and also deleted the svn folder. Then I placed it in a Git repo and pushed it up. Now, every time I open the solution, it thinks it's still in SVN, but has no reference to where. I have to disconnect it again every time I open it, and change the Tools/Options/Source Control/Current source control plug-in to Git, which makes me a sad panda.Giacometti
C
4

Remove .svn folders and your source tree will not be versioned anymore.

Confirmand answered 5/5, 2009 at 9:38 Comment(2)
Not true if you have marked your project as "Managed by Subversion" in visual studio.Rebus
I had to remove the following lines from the .sln file: GlobalSection(SubversionScc) = preSolution Svn-Managed = True Manager = AnkhSVN - Subversion Support for Visual Studio EndGlobalSectionTakeshi
C
1

If you want to remove the Subversion control of a file/folder, but want to leave it where it currently is, you can use the 'Delete (keep local)' option on TortoiseSVN. To see this option you must hold down shift when you right-click the file/folder, then it will appear in the context menu.

Conner answered 5/5, 2009 at 10:13 Comment(1)
This will not remove the administrative area in the project; it will just mark them to be deleted from sourcecontrol on the next commit. (And you can never delete the root of your working copy).Moorings
K
1
  1. Delete SVN folder with a hidden attributes from your file system
  2. open VS solution file in text editor & remove a reference to subversion "...Managed by Subversion..." works fine for me..
Keese answered 17/5, 2013 at 13:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.