Thursday, 26. February 2009, 14:11:42
subversion, linux
I like to be able to read logfiles to understand what happened on my machine. I thought it would be pretty nice to see, what gets updated in Subversion (SVN) and when. Furthermore I think it's really nice to get any update automatically online on my developer machine, so I activated the hook
post-commit and added the following lines:
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit.
runscripttime=`date +"%Y-%m-%d %H:%M:%S"`
echo -e "\n--$runscripttime--" >> /var/log/svn/myproject.log
/usr/bin/svn update /var/www/html/myproject/trunk >> /var/log/svn/myproject.log
First nothing happened, no update but I remembered having
the same problem before. After I adjusted the permissions of the hook AND the logfile the updates were directly added to the website folder and the update results added into the logfile.

The logfile now reads something like this:
--2009-02-26 12:08:18--
D /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/inc/class.tx_myproj_ext.elections_days.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/model/class.tx_myproj_ext_elected_images.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/model/class.tx_myproj_ext_data.php
A /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/gfx/upload_single_step_2.gif
--2009-02-26 15:45:17--
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/control/class.tx_myproj_ext_control.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/model/class.tx_myproj_ext_data.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/model/class.tx_myproj_ext_elected_images.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/pi1/class.tx_myproj_ext_pi1.php
--2009-02-26 16:30:06--
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/model/class.tx_myproj_ext_data.php
U /var/www/html/myproject/trunk/typo3conf/ext/myproj_ext/pi1/class.tx_myproj_ext_pi1.php
Monday, 18. February 2008, 15:13:26
subversion, linux
For several hours I tried to fix a small "bug" in my subversion installation, but without any results. I commited a file to subversion successfully, but the hook "post-commit" didn't do anything at all. So I logged on to my server, started the hook manually and it worked perfectly.
So what went wrong? Well... it all started with my login to the server. As I'm pretty lazy, I (locally) logged in as root, installed subversion, created the logfiles and so on. Everything seemed fine and as commiting worked too I was pretty happy. Then I changed the hook to update the logfiles but nothing happened. I started the hook manually... and it worked.
So I started to read several blogs about subversion, read online manuals, tutorials and so on... nothing helped.
When I asked a friend concerning this problem I suddenly had an idea... I logged on the server switched the user to my testuser and started the hook manually:
[testuser@localhost hooks] $ sh post-commit
post-commit: line 54: /var/log/svn/project.log: Permission denied
post-commit: line 55: /var/log/svn/project.log: Permission denied
After adjusting the permissions and ownership of the logfile everything works totally fine now. I still can't believe how blind I have been...
Tuesday, 12. February 2008, 16:34:51
linux, cvs, subversion
After alot of untraceable trouble with setting up
CVS on a local test server for 2 days, I kicked it from the server and installed
Subversion instead. It worked perfectly on my first attempt, even though I never installed it before.
When I started I had CVS ready after around 10 minutes, configured the firewall and created a repository. Everything looked fine as always. Then I tried to access the repository... but instead of a connect I got an error message: "no such repository"! After reading endless threads describing but never solving my problem I decided to try Subversion instead, even though I wasn't familiar with it until today. I read a documentation and installed it using a pretty neat
manual I found on linuxfromscratch.org.
Now all works well and I can finally head home. I'm so dead beat after hours and hours of trial and error with CVS, I'll surely have short nap and afterwards a nice time playing
"Red Steel" on my Wii or
"Tomb Raider Anniversary" on my PC.