Posts Tagged ‘cvs’

hiding svn directory in resin

Thursday, February 12th, 2009

I got all my websites checked into Subversion (SVN), and usually scp them from my desktop to the webserver. But sometimes I edit the pages directly on the server.
So to keep changes from being lost, I decided to just have a checked out version of the page (svn) on the server as well.. To keep things in sync :)

But for some reason I don’t want people to snoop in my .svn directory. I googled but did not find any immediate solution, so here it is, a quick fix for anyone who might have the same “problem”.

Hide .svn directory in resin webserver
(also works for cvs or anything else you don’t want resin to give those greedy users)

just add a rewrite rule for the host in the resin configuration file (resin.conf), this prevents the webserver from letting anyone into the directory (or viewing svn/cvs files).

Here is my config file:

<host id="www.trekwar.org" root-directory=".">
<host-alias>trekwar.org</host-alias>
<web-app id="/">
<document-directory>webapps/trekwar.org</document-directory>
</web-app>
<rewrite-dispatch>
<redirect regexp="\.svn" target="index.jsp?msg=keep+away+from+my+svn+directory"/>
</rewrite-dispatch>
</host>

Bye bye CVS.. Good morning SVN

Tuesday, March 25th, 2008

After years of faithful service, I made the change from CVS to Subversion (SVN). I installed SVN on the server, and set up the SSH keys on my desktop and got up TortoiseSVN and SVN for eclipse. I used cvs2svn to copy over everything from CVS to SVN (which required about 1-2 hours of removing the Norwegian characters Æ Ø Å from filenames from misc. schoolwork). I like TortoiseSVN much more than TortoiseCVS, but I’ve had some problems with checking out stuff into eclipse. Seems like I have to check in everything as eclipse projects for it to work straight away. I notice that SVN seems a bit slower than CVS (when using it with SSH and pre-authenticated keys), if it becomes a problem then I’ll just install SVN on my windows desktop and mirror the repository on my server.

all work..

Sunday, February 4th, 2007

Today I did the most tedious work ever.
Having committed everything on my CVS server using a Linux client for the last years, I accidentally forgot to mark stuff as binary. As a result every binary file (like pictures, datafiles, etc..) get fucked up if I check them out on a windows computer.

So, I’ve spent around 3 hours going into every directory in the CVS tree, running the “cvs admin -kb” command on all binary files..

Followed by a couple of “cvs update -A”.

All this so I might checkout some files to eclipse on my stationary computer..