Austin
Austin

Reputation: 51

Can VisualSVN be driven from the command line?

I have a series of MSVC source trees, each representing a release of the project, that I would like to manage with Subversion and VisualSVN. There are a lot of them, so I want to script the process of adding each release to the repository. I can parse the .vcxproj file to find the changes between releases, but I also need to be able to update VisualSVN's database of which files have been added to or removed from the project. Is that possible at all? If so, I would be grateful for hints on how to go about it.

Upvotes: 2

Views: 422

Answers (1)

David W.
David W.

Reputation: 107090

If you're that good at parsing files that you're going to parse the .vcxproj project file, you can use something other than the VisualSVN client which is built for integration into VisualStudio.

A Subversion server (including VisualSVN's) can use any Subversion client you want. You're not stuck using VisualSVN if you're not doing this inside of Visual Studio.

You can use the Subversion command line client to help you in your task. The command line client is fairly simple to use and can be used in various scripting programs. The command line client comes with TortoiseSVN as an optional installation (you have to select it to install it), or you can get it from CollabNet (which requires registration) or SlikSVN which requires no registration.

Some scripting environments such as Python have their own Subversion libraries that can talk to the Subversion server. It's always preferable (but not always easy) to use these packages when scripting in these languages.

A word of warning: There are many file types that should not be committed into Subversion. This includes any generated files, so nothing in your bin or obj directory, user preferences, etc. VisualSVN knows not to include these files when it adds or updates files in the Subversion server. If you're doing this outside of VisualStudio, you'll have to watch these file types yourself.

Upvotes: 3

Related Questions