Edgewall Software
Modify

Ticket #6445 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

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:
Release Notes:
API Changes:

Description

The example post-commit script in the trac-post-commit-hook is missing the TRAC_ENV variable. See patch.

Attachments

tpch.diff (445 bytes) - added by gsf@… 4 years ago.

Download all attachments as: .zip

Change History

Changed 4 years ago by gsf@…

comment:1 Changed 4 years ago by eblot

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

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 4 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 4 years ago by gsf@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

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

  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Version set to devel

Yes, you're right.

comment:5 Changed 4 years ago by cboos

  • Keywords trac-post-commit-hook added
  • Milestone set to 0.11.1

comment:6 Changed 3 years ago by cboos

  • Keywords multirepos added
  • Milestone changed from 0.11-retriage to 0.12

comment:7 Changed 3 years ago by cboos

  • Priority changed from low to normal

To be done: finish the hooks, in particular write a trac-svn-hook.cmd.

comment:8 Changed 3 years ago by cboos

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

There's actually a more focused ticket for trac-svn-hook.cmd, #6370.

So I'm closing this one (new trac-svn-hook complete and hopefully clear about setting TRAC_ENV).

comment:9 Changed 2 years ago by cboos

  • Milestone changed from 0.12 to 0.12-multirepos
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.