Edgewall Software
Modify

Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#6445 closed defect (fixed)

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

Reported by: gsf@… Owned by: Christian Boos
Priority: normal Milestone: 0.12-multirepos
Component: version control Version: devel
Severity: minor Keywords: trac-post-commit-hook multirepos
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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

Attachments (1)

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

Download all attachments as: .zip

Change History (10)

by gsf@…, 17 years ago

Attachment: tpch.diff added

comment:1 by Emmanuel Blot, 17 years ago

Resolution: invalid
Status: newclosed

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 by Emmanuel Blot, 17 years ago

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

comment:3 by gsf@…, 17 years ago

Resolution: invalid
Status: closedreopened

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 by Emmanuel Blot, 17 years ago

Priority: normallow
Severity: normalminor
Version: devel

Yes, you're right.

comment:5 by Christian Boos, 17 years ago

Keywords: trac-post-commit-hook added
Milestone: 0.11.1

comment:6 by Christian Boos, 16 years ago

Keywords: multirepos added
Milestone: 0.11-retriage0.12

comment:7 by Christian Boos, 15 years ago

Priority: lownormal

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

comment:8 by Christian Boos, 15 years ago

Resolution: fixed
Status: reopenedclosed

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 by Christian Boos, 15 years ago

Milestone: 0.120.12-multirepos

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.