Check out from one repository and in to another

I'm automating an existing C# project. Source control is Subversion. I have one solution that is stored in one source code repository, built, then the assemblies need to be stored in a different repository. Both repositories are on different servers and have different login credentials. I'm looking for suggestions on how to do this.

0
3 comments

It seems the simplest solution to achieve what you're asking for is to add a script (batch file or msbuild) that manually checks in the output files using the svn.exe command line tool.

Hook this post build action up by adding a step in the build server configuration or by hooking it up in your msbuild script chain. Make sure to check if the conditions are right for checking in - you probably do not want to check in after a developer debug build on a developer machine.

--Jesper Högström

0

I want to do this without external scripts (.bat, etc). I think I found the way. MSBuild Community Tasks adds a Subversion task that should accomplish this. I'm currently tackling a different issue for this project and will post my results on the Subversion issue when I get back to it.

0

It actually turned out to be very simple with the Community Build Task.

<Import Project="..\3rd party\Tools\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>


<SvnCommit UserName="username" Password="pwd" ToolPath="..\3rd Party\Tools\Subversion\" LocalPath="..\Source\*.*" Message="TeamCity Autobuild." Targets="..\Source\*.*"/>
 

You need to have a copy of svn.com someplace where the build script can get to it. That's specified in the ToolPath.

0

Please sign in to leave a comment.