Modify

Opened 14 years ago

Closed 14 years ago

#7302 closed enhancement (fixed)

Subversion commit hook for trac 0.12 support.

Reported by: anonymous Owned by: Russ Tyndall
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords: trac 0.12
Cc: Trac Release: 0.12

Description

Hi, I love this plugin.

Please provide svn hook script for trac 0.12 or alternate means, for example the component that implements IRepositoryChangeListener.

Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by Russ Tyndall

This trac post commit script seems to still work on 12, if it doesnt please file a bug report. (I use a different/customized post commit that allows me to commit to any trac from any repository.) This is way more than most people need so I dont include it (but can if you like).

This is the svn post commit script I have been using to call it (much the same as the one documented for trac). I have not rewritten this as a trac plugin, though might at somepoint, when I get around to setting up explicit repository syncing.

For production you can just remove the logging (or setup logrotate)

LOG="/var/trac/svn_commit_hook.log"
touch $LOG;
echo "`date` in svn post commit : $1 : $2" >> $LOG
REPOS="$1"
REV="$2"
MESSAGE=`svnlook log -r $REV $REPOS`
AUTHOR=`svnlook author -r $REV $REPOS`
CNAME=`basename "$REPOS"`
TRAC_ENV="/var/trac/$CNAME"

echo "`date` TracEnv:$TRAC_ENV Repo:$REPOS Rev:$REV Auth:$AUTHOR" >> $LOG

/usr/bin/python /var/trac/trac-post-commit.py -p "$TRAC_ENV" -r "$REV" -u "$AUTHOR" -m "$MESSAGE" >> $LOG

comment:2 Changed 14 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.