Opened 10 years ago

Closed 17 months ago

#4038 closed defect (fixed)

trac-post-commit-hook have to be installed for full support

Reported by: gonzague.reydet@… Owned by: Ryan J Ollos
Priority: normal Component: TracSvnPoliciesPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

For full support of the implemented functionalities, this plugin needs the trac-post-commit-hook installed in the Trac source path, under the contrib folder.

This should be noted in the installation procedure.

If no you will obtain the following warning message: 'post-commit' hook failed with error output:

/bin/sh: /PATH/TO/TRAC/SOURCE/contrib/trac-post-commit-hook: No such file or directory

Attachments (0)

Change History (6)

comment:1 Changed 9 years ago by anonymous

As detailed in #5281, TRAC_CODE_PATH is required to show where the post-commit-hook exists. Here is a proposed procedure to be more automatic on installation (that must be checked in):

  1. Add an external on svnpolicies/hooks/trac-post-commit-hook pointing to
  2. Alter the to include hooks/trac-post-commit-hook
  3. Update svnpolicies/hooks/ (as listed in #5281) with this alternate:
    return run_command([str(trac_env) + os.path.sep +'hooks' + os.path.sep + 'trac-post-commit-hook',

... and one last step, which I can't figure out, is where in the plugin to add code to copy /svnpolicies/hooks/trac-post-commit-hook to the Trac environment's hooks directory. For now I just manually copy the file in there.

comment:2 Changed 8 years ago by anonymous

Owner: changed from Culapov Andrei to Robert Corsaro

comment:3 Changed 3 years ago by Ryan J Ollos

Owner: Robert Corsaro deleted

comment:4 Changed 17 months ago by Ryan J Ollos

Description: modified (diff)

comment:5 Changed 17 months ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

comment:1 has some good ideas, however I think the plugin has some design issues that I'll describe in #4486. The dependency on trac-post-commit-hook will be removed in the next commit. The script isn't needed, or included, in Trac 0.12 and later. In the future we might consider using trac-svn-hook.

comment:6 Changed 17 months ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16090:

1.0dev: Make compatible with Trac 1.0 and later

  • Read default repository from any provider. Fixes #12631.
  • Moved to Version Control section of admin panel
  • Removed permission PROJECT_ADMIN
  • TRAC_ADMIN restricts access to the admin panels. TracFineGrainedPermissions can be used to grant access to the resource general/svnpolicies
  • Fixed threading problems due to class-scope attributes (some possible issues remain)
  • Enable post-commit hook when enabling ticket control commands. Fixes #4049.
  • Remove dependency on trac-post-commit-hook. Fixes #4038.
  • Conform to PEP8

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.