Skip navigation.

v.plonk!

Can't wait to get my hands on the Dragon Age Toolset...

Subversion with hooked auto-update and logfiles

,

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. :cool:
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

tUM 2008: End of party and resultsSVG for statistics

Comments

Anonymous 26. May 2009, 15:00

Anonymous writes:

Helpful! :up:
Do you know a good site about the most important commands for SVN?

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

Download Opera, the fastest and most secure browser