Opened 18 years ago
Closed 18 years ago
#3464 closed enhancement (duplicate)
Enable trac to support multiline commit messages
Reported by: | 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)
Change History (4)
by , 18 years ago
Attachment: | trac-post-commit-hook added |
---|
by , 18 years ago
Attachment: | trac-post-commit-hook.2 added |
---|
comment:1 by , 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 , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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.
updated to trunk version, the previous was from 0.9.5