Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5950 closed defect (worksforme)

trac-post-commit-hook has errors when run manually

Reported by: jaweedxp@… Owned by: Christian Boos
Priority: normal Milestone:
Component: version control Version: 0.10.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi,

I'm running 0.10.4 and when I manually run post-commit it comes up with an error and for some reason tries to put a \r when trying to read the VERSION file (full message below). I'm running this on a debian box.

admin@trac:/var/data/projects/svn/project/hooks$ ./post-commit /var/data/projects/svn/project/ 14~ Traceback (most recent call last):

File "/var/data/projects/svn/project/hooks/trac-post-commit-hook", line 212, in ?

CommitHook()

File "/var/data/projects/svn/project/hooks/trac-post-commit-hook", line 142, in init

self.env = open_environment(project)

File "/usr/lib/python2.4/site-packages/trac/env.py", line 462, in open_environment

env = Environment(env_path)

File "/usr/lib/python2.4/site-packages/trac/env.py", line 147, in init

self.verify()

File "/usr/lib/python2.4/site-packages/trac/env.py", line 195, in verify

fd = open(os.path.join(self.path, 'VERSION'), 'r')

IOError: [Errno 2] No such file or directory: '/var/data/projects/trac/project∧r/VERSION'

My post-commit script is the following

REPOS="$1" REV="$2" LOG='/usr/bin/svnlook log -r $REV $REPOS' AUTHOR='/usr/bin/svnlook author -r $REV $REPOS' TRAC_ENV='/var/data/projects/trac/project/' TRAC_URL='http://trac/' /usr/bin/python /var/data/projects/svn/project/hooks/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" -u "$AUTHOR" -m "$LOG" -s "$TRAC_URL"

Attachments (0)

Change History (1)

comment:1 by hyuga <hyugaricdeau@…>, 17 years ago

Resolution: worksforme
Status: newclosed

This looks like a problem in your post-commit script. For example, there are several places where you're using single quotes where most shells would expect a backtick. I don't know what shell you're using, but I can promise you this is wrong in any of the common ones.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.