Ticket #6445 (closed defect: fixed)
post-commit script example in trac-post-commit-hook is missing environment variable "TRAC_ENV"
| Reported by: | gsf@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12-multirepos |
| Component: | version control | Version: | devel |
| Severity: | minor | Keywords: | trac-post-commit-hook multirepos |
| Cc: |
Description
The example post-commit script in the trac-post-commit-hook is missing the TRAC_ENV variable. See patch.
Attachments
Change History
comment:1 Changed 3 years ago by eblot
- Status changed from new to closed
- Resolution set to invalid
Not really: the comment section you're referring to explain how to get the environment variables from Subversion, i.e. how the Subversion server calls the hook script, passing the repository as the 1st argument and the revision as the 2nd argument.
TRAC_ENV needs to be given to the Python hook script.
However your patch refers to a shell script example that can be used to call the Python hook script in turn.
comment:2 Changed 3 years ago by eblot
BTW, do not forget to report the version of Trac you're using when you submit a new ticket.
comment:3 Changed 3 years ago by gsf@…
- Status changed from closed to reopened
- Resolution invalid deleted
Please look at this patch again. The example shell script for Subversion needs TRAC_ENV, which is not assigned in the example in the comments. TRAC_ENV is used nowhere in the Python script.
I'm using Trac r6294.
comment:4 Changed 3 years ago by eblot
- Priority changed from normal to low
- Version set to devel
- Severity changed from normal to minor
Yes, you're right.
comment:6 Changed 17 months ago by cboos
- Keywords multirepos added
- Milestone changed from 0.11-retriage to 0.12
This is fixed in the new source:sandbox/multirepos/contrib/trac-svn-hook.
comment:7 Changed 13 months ago by cboos
- Priority changed from low to normal
To be done: finish the hooks, in particular write a trac-svn-hook.cmd.


