Multiple projects with one subversion repo
I'm currently looking into deploying red mine to replace our current bugtracking/project management solution. We have a resonably large subversion repo with approximately 18000 commits that contains all our source code.
Our typical structure is svn://svnserver/Project/foo. So each project will be referring to a sub directory of the main svn repo. I've added a couple of different projects and aligned them to the respective folders in subversion and redmine has successfully download the history. But it appears to grab the history from the repo for both projects separately. The problem with this is that when adding a new project the first hit on the repositories page can take 10/15 minutes to load the history, and I assume that the projects whoose repository pages aren't visited often will fall behind in terms of history and then have a long loading time the next time they are hit. So, is there anyway to keep the svn repos in sync together?
Hopefully this makes sense to someone.
I have the following command in my cron:
redmine /var/www/REDMINE_DIRtrunk/script/runner "Repository.fetch_changesets" -e production
It loads changeset via cron, so when one visits the repo page he hasn't to wait so long.
If you can't find a solution to having one repository for multiple projects, it is not actually that hard to split the repository into multiple smaller one. The instructions are in the book Version Control with Subversion, chapter 5 (available online here). I recently did this as part of our migration to Redmine and I was surprised by how painless it was (the only complication is if the directory name you use for the project name has changed).
Thanks Dimitry, using the script/runner is of course the sensible thing to do! I've set that up as a scheduled task since I'm running windows and all seems to be well. On a sort of related matter, how often would you suggest I run this? I've set it for every hour but is that too much? Too little? Any suggestions?
建 李, I'm not sure that splitting the repro is the right way to go? Surely you have to deal with more user accounts, backups, config, confusion etc? Maybe not? How is splitting your repro working out for you?
Thanks again for your answers.
Michael, I have this job running in cron every 2 minutes. I use keywords in commit comments to automatically close tickets and my repository isn't so big, just about 30-50 commits per week. On my server this cron job runs ~20 seconds, when server is idle and ~40 seconds, when server is loaded.
It it actually working really well for us so far.
With regards to authentication, we access the repositories via WebDAV over https, and let Redmine handle the authentication
The root directories for all our repositories are all located in a single otherwise empty directory with their project identifier as the directory name, so we have a simple script that lists the contents of the root directory, loops through the entries and runs svnautobackup on each one.
New Projects get new empty repositories automatically created for them (in the format described above)
Overall, Subversion administration has been minimal after the initial setup. I am not sure how portable this exact setup would be to a windows installation but I would imagine the principles would be transferable.