Does anyone know how to issue an svn "switch" command with the Msbuild.Community.Tasks.Subversion toolset? I want to switch my working copy from trunk to tags.
Asked
Active
Viewed 77 times
1 Answers
0
Yes. I use SvnClient command for that
Here the example how it can be done in msbuild file.
<PropertyGroup>
<ExtSrcRoot>...here the path to destination folder...</ExtSrcRoot>
<GMOCK_REPO>http://googlemock.googlecode.com/svn/tags/release-1.6.0</GMOCK_REPO>
</PropertyGroup>
<ItemGroup>
<DEP_GMOCK Include="$(ExtSrcRoot)/gmock"/>
</ItemGroup>
<Target Name="dep_gmock_up" Condition="Exists(@(DEP_GMOCK))">
<SvnClient Command="switch " RepositoryPath="$(GMOCK_REPO)" LocalPath="@(DEP_GMOCK)"/>
<SvnUpdate LocalPath="@(DEP_GMOCK)"/>
</Target>
GMOCK_REPO can be changed to any tag your want.

Sergei Nikulov
- 5,029
- 23
- 36
-
@end-user don't forget accept answer if it will solve your question :) – Sergei Nikulov Jul 14 '14 at 11:28