Edgewall Software

Ticket #6445 (reopened defect)

Opened 19 months ago

Last modified 3 months ago

post-commit script example in trac-post-commit-hook is missing environment variable "TRAC_ENV"

Reported by: gsf@… Owned by: cboos
Priority: low Milestone: 0.12
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

tpch.diff Download (445 bytes) - added by gsf@… 19 months ago.

Change History

Changed 19 months ago by gsf@…

Changed 19 months 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.

Changed 19 months ago by eblot

BTW, do not forget to report the version of Trac you're using when you submit a new ticket.

Changed 19 months 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.

Changed 19 months ago by eblot

  • priority changed from normal to low
  • version set to devel
  • severity changed from normal to minor

Yes, you're right.

Changed 19 months ago by cboos

  • keywords trac-post-commit-hook added
  • milestone set to 0.11.1

Changed 3 months ago by cboos

  • keywords multirepos added
  • milestone changed from 0.11-retriage to 0.12

Add/Change #6445 (post-commit script example in trac-post-commit-hook is missing environment variable "TRAC_ENV")

Author


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


Change Properties
<Author field>
Action
as reopened
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
 
Note: See TracTickets for help on using tickets.