Edgewall Software

Ticket #3464 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 2 years ago

Enable trac to support multiline commit messages

Reported by: viktor@… Owned by: cmlenz
Priority: low Milestone:
Component: version control Version: 0.9.6
Severity: minor Keywords: hooks
Cc:

Description

Currently trac-post-commit-hook relies on the commit message being passed in the command line. That is a limitation both in size and in number of lines limited to one (at least it appeared so on my (sorry) windows environment - trac received only the first line of the commit message)

Attaching modified post-commit-hook, summary of changes:

  • Add -f, --file to options
  • if -m was not given, look for file given in -f, read all lines into a message, adding newlines.

This makes sure that:

  • all newlines in the message are preserved
  • all keywords in all lines are found.

I've started learning Python just doing this, so I haven't done any error checking (i.e. file exists, anything can be read from it etc.)

All you have to do is modify the svn post-commit script to store the commit message into a temporary file and replace -m message with -f filepath.

Attachments

trac-post-commit-hook (7.4 KB) - added by viktor@… 2 years ago.
trac-post-commit-hook.2 (7.8 KB) - added by viktor@… 2 years ago.
updated to trunk version, the previous was from 0.9.5

Change History

Changed 2 years ago by viktor@…

Changed 2 years ago by viktor@…

updated to trunk version, the previous was from 0.9.5

Changed 2 years ago by eblot

  • keywords hooks added

I guess we could get rid of this environment-specific issues if we move the calls to svnlook into the Python script, using the Python SWIG wrappers to access the Subversion repository.

Changed 2 years ago by mgood

  • status changed from new to closed
  • resolution set to duplicate

See #1602 regarding the use of the commit hooks on Windows. There are scripts attached there that support multi-line messages.

Also, please don't attach full files. See TracDev/SubmittingPatches for a description of how to submit your changes.

Add/Change #3464 (Enable trac to support multiline commit messages)

Author



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