I am using Visual Studio 2010 and git (git svn). My coworker uses pure svn with the Ankhsvn plugin.
When i try to open the file with the Git Source Control Provider enabled, Visual Studion complains:
Source Control Plug-in
The active solution or project is controlled by adifferen source control plug-in than the one you have selected. If you change the source control plu-in, the active solution or project will be closed.
Do you want to continue?
When i click yes an empty solution is opened. When i click no, all the git specific icons next to the solution items are missing (i still see the branch name in the solution explorer) and i get prompted about the Source Control Plug-in every time i open the solution.
When i clone the svn repository which my coworker created the solution sln file contains the following
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
I have deleted this section and now the solution opens without problems when the Git Source Control Provider is activated but complains when you select the Ankhsvn Provider - the situation is reversed.
I would like to tell git to remove this part of the .sln file during a pull (git svn fetch) and add it when i commit (git svn dcommit). Is this possible through gitattributes and how to do it?
EDIT:
I have now added
solutionname.sln filter=ankhsvn
to $GIT_DIR/info/attributes
and
[filter "ankhsvn"]
clean=sed '/^Global$/ r ../ankhsvnsection '
smudge=sed '/GlobalSection(SubversionScc)/,/EndGlobalSection/d '
to my .git/config file.
ankhsvnsection contains the secton that is removed by the smudge operation. I does not seem to do anything?!