Tagged: svn RSS

  • John 12:45 am on October 5, 2009 Permalink | Reply
    Tags: , , svn   

    SVN Notify by Email 

    Svn hook to email you information in post commit hook.

    Install svnnotify which will be used to send the email

    yum install perl-CPAN
    perl -MCPAN -e 'install SVN::Notify'
    perl -MCPAN -e 'install SVN::Notify::HTML::ColorDiff'
    

    The post-commit script

    #!/bin/sh
    for i in 'email1@domain.co.uk' 'email2@domain.com'
    do
    	svnnotify --repos-path "$1" \
    		--revision "$2" \
    		--to $i \
    		--from account@example.co.uk \
    		--handler HTML::ColorDiff -d \
    done
    
     
    • SonPhan 3:20 am on November 28, 2009 Permalink | Reply

      Hi , Please help me , How can i configure my svn server auto send mail with SVN-Notify modules?
      I have did as you show, but it can’t send mail.
      :(

  • John 3:48 pm on April 14, 2009 Permalink | Reply
    Tags: , svn   

    SVN Log to Latex 

    Needed to add a table of my svn log into my project write up so created a simple style sheet that would parse the xml output from svn. The xslt only generates the table

    svnlog-gen.sh

    #usage svnlog-gen.sh [repo-path] [output-file]
    svn log --xml $1 > tmp.out; xsltproc svnlog.xslt tmp.out > $2; rm tmp.out
    

    svnlog.xslt

    Example Output

     
    • Markus 5:44 am on October 6, 2009 Permalink | Reply

      This is exactly what I needed! Thank you very much!!!

      • Matthew Leingang 5:04 am on February 19, 2010 Permalink | Reply

        What Markus said.

        You should be able to avoid the temp file with a pipe, viz:

        svn log –xml $1 | xsltproc svnlog.xslt > $2

  • John 6:43 pm on April 1, 2009 Permalink | Reply
    Tags: , , svn,   

    Simple SVN WordPress Widget 

    After getting bored on working on my final year project I decided to take a look at creating widgets word my blog. There are SVN hooks on my repositories that store the commit details in a SQL database. I thought I would create a widget that would pull out the last message and display it.

    /*
    Plugin Name: LastCommit
    Plugin URI: http://blog.yeticode.co.uk/
    Description: Gets Last Commit Message
    Author: John Tindell
    Version: 1
    Author URI: http://blog.yeticode.co.uk/
    */
    function lastCommit_widget() {
    
    	$server = 'localhost';
    	$link = mssql_connect($server, 'username', '************');
    	echo '
    
  • '; echo "

    Last Commit

    "; if($link) { mssql_select_db('svnyeti', $link); $query = mssql_query('select top 1 * from SVNLog order by liLogEntryPk desc', $link); $row = mssql_fetch_array($query); print '

    ' . $row['lszLogEntry'] . '

    '; } echo '
  • '; } function init_lastCommit(){ register_sidebar_widget("LastCommit", "lastCommit_widget"); } add_action("plugins_loaded", "init_lastCommit");

    When I get more time I will develop this a bit more.

     
    • Glenn Bennett 3:26 pm on April 9, 2009 Permalink | Reply

      John,

      I would be easy to make the widget a bit more theme friendly by using my new tool over at widgetifyr.com.

      If you get a chance to try it please let me know what you think.

      Glenn

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel

Powered by Web Design Company Plugins