Subversion with hooked auto-update and logfiles
Thursday, 26. February 2009, 14:11:42
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:
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:
#!/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








Anonymous # 26. May 2009, 15:00
Helpful! :up:
Do you know a good site about the most important commands for SVN?