jonmorgan
jonmorgan

Reputation: 2610

Batch adding Subversion repositories to Eclipse

I've found myself in the odd position of being a TA for a software engineering class wherein I routinely have to check out each student's project from a Subversion repository. What this currently entails is manually adding around 100 repositories to Eclipse every two weeks.

All of the repository URLs are of the same form, something along the lines of domain/svn/teamXprojectY where X and Y are numbers in a given range. It would be trivial to output these URLs to a text file or something along those lines, but is there any way to automate adding these repositories to Subclipse? I've searched online as well as in the Preferences and menu options for Subclipse and can't find anything that might help me.

If anybody has any idea how to do this, it would be much appreciated. Thanks!

Upvotes: 1

Views: 410

Answers (1)

Mark Phippard
Mark Phippard

Reputation: 10419

You can make an Eclipse "Team Project Set" file that lists all the projects you want to checkout. You then just have to import this file and it will add all the repositories and checkout out the projects.

The easiest way to see the format of the file is to take a workspace with a few sample projects checked out via Subclipse in it and do File > Export > Team Project Set and choose those projects.

You can then edit this file with any editor and later on do File > Import > Team Project Set.

If you are willing to serve your repositories via Apache, then another option is to install CollabNet Subversion Edge on your server and CollabNet Desktop in Eclipse (all free). With this combination, you just enter the URL of your Subversion Edge server into the CollabNet Sites view and all of the repositories on the server are accessible without entering their URL's.

http://www.open.collab.net/products/subversion/whatsnew.html

There are other reasons using Subversion Edge might make your life easier. The next version due in a week has a full REST API so you could automate managing users and repositories via scripts. Even without that, it gives you a full web UI to manage the server and repositories.

Upvotes: 2

Related Questions