Modify

Opened 4 years ago

Closed 4 years ago

#7302 closed enhancement (fixed)

Subversion commit hook for trac 0.12 support.

Reported by: anonymous Owned by: bobbysmith007
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 4 years ago by bobbysmith007

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 4 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bobbysmith007. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.