tags:

views:

90

answers:

4

We're moving over to using Subversion (Windows platform, TortoiseSVN as the client) as our version control system. With tools we've used previously, it's been possible to set up a 'reference directory' or folder on the network which stores the latest revision of everything that's been checked in, so that people can easily browse the latest versions without having to use a dedicated tool. Is it possible to configure Subversion to do this?

Ideally, it would update this reference directory on each check-in. Failing that, a daily update would be sufficient.

+1  A: 

Subversion doesn't have this built in, and neither does TortoiseSVN. You could add a post-commit script to the server, but in your case I'd rather use something like Continuous Integration. Check out Cruise Control.

In general, it will allow you to perform an "action" everytime a commit is added to the repository. This action can but does not have to include starting an automated build, something that you may want to add once you get the "reference copy" thing working.

Dave Van den Eynde
Actually SVN via apache does have this built in, the repository browser, such as http://svn.collab.net/repos/svn/TortoiseSVN also has it's own Repository Browser, which does the same thing - easy access to reference latest commit. It's actually better than that because you also get revision history
Si
True, but that's not what he wanted. He wanted a reference directory so that people can browse the source "without dedicated tools". I suspect he wants to do more than just browse the source, and build tools don't compile straight from the repository.
Dave Van den Eynde
Actually what I need is a 'manager-friendly solution.' :-) I.e., non-technical people can just look at a network folder using Windows Explorer.
saw-lau
In that case, I think the built in website of apache-svn and VisualSVN server is perfect.
Dave Van den Eynde
+2  A: 

If you just need to see the latest version of each individual file then the default web server integration with Apache SVN would do the trick.

Otherwise if you want access to a full directory structure by the file system any simple script can run an svn update command.

You could run something like CruiseControl with a simple task that watches the repository and updates everytime it changes.

morechilli
+1  A: 

The simplest answer would be to have a working copy of the entire repository checked out, and schedule an "svn update" at regular intervals.

Not the ideal solution, though - branches are supposed to be cheap in subversion and this solution makes them very expensive, although you can turn this off whenever - or just check out trunk or some relevant specific folder.

But really, TortoiseSVN is a gem when it comes to showing you what's going on.

Also, there are plenty of web based svn viewers out there, which have full integration beyond what the simple apache service gives you.

Jim T
+2  A: 

There are quite a few ways you could do this:

  • If you use the Apache repository access method, you get this for free by using Repository Browsing. This is the easiest way.
  • Another option is using the Repository Browser on TortoiseSVN.
  • If you really want a network share, then you could create a post-commit hook which calls svn update on the working copy. However this is more risky since the possibility exists that the working copy may be invalidated for some reason (merge conflict, etc). A fresh checkout on each commit would solve this, but is inefficient.

IMHO the first two options are far better than the last one, but choice is good :)

Si