Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3464 closed enhancement (duplicate)

Enable trac to support multiline commit messages

Reported by: viktor@… Owned by: Christopher Lenz
Priority: low Milestone:
Component: version control Version: 0.9.6
Severity: minor Keywords: hooks
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (2)

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

Download all attachments as: .zip

Change History (4)

by viktor@…, 18 years ago

Attachment: trac-post-commit-hook added

by viktor@…, 18 years ago

Attachment: trac-post-commit-hook.2 added

updated to trunk version, the previous was from 0.9.5

comment:1 by Emmanuel Blot, 18 years ago

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.

comment:2 by Matthew Good, 18 years ago

Resolution: duplicate
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.