1

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.

Sergei Nikulov
  • 5,029
  • 23
  • 36
end-user
  • 2,845
  • 6
  • 30
  • 56

1 Answers1

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