Edgewall Software
Modify

Ticket #4778 (new enhancement)

Opened 5 years ago

Last modified 20 months ago

simplified wikification of svn log messages

Reported by: Sergei Haller <sergei@…> Owned by: cboos
Priority: normal Milestone: next-major-0.1X
Component: wiki system Version: devel
Severity: normal Keywords: formatter
Cc: rbu@…, lists@…
Release Notes:
API Changes:

Description (last modified by cboos) (diff)

Is it possible to simplify the wikification of svn log messages? The problem I get is if we have
some math content (like

x^5+x^4+x

which will show like x5+x4+x. There are some other things as well, which we don't actually need in or project, as the log messages are and will always be plain text. The only thing I'd like to keep is the recognition of revision numbers in the log messages with the appropriate links.

Is it hard to achieve this? (Would be ok if it is in the source, i.e. not configurable by admin/user)

Thanks.

Attachments

format.patch (599 bytes) - added by Sergei Haller <sergei@…> 5 years ago.
short-mes.patch (684 bytes) - added by Sergei Haller <sergei@…> 5 years ago.
somewhat related. fixes shorten_line call in revision log if wiki_format_messages is disabled.

Download all attachments as: .zip

Change History

comment:1 Changed 5 years ago by Sergei Haller <sergei@…>

  • Type changed from defect to enhancement

comment:2 Changed 5 years ago by Sergei Haller <sergei@…>

well, I found the place (template/changeset) and replaced

-              ${wiki_to_html(context, changeset.message, escape_newlines=True)}
+              <pre>${changeset.message}</pre>

is there any easy way to parse the message for revision numbers and convert them to links?

comment:3 follow-up: Changed 5 years ago by cboos

  • Component changed from changeset view to wiki
  • Description modified (diff)
  • Keywords formatter added
  • Milestone set to 0.11
  • Owner changed from cboos to jonas
  • Summary changed from wikification of svn log messages to simplified wikification of svn log messages

There's currently a TracIni#changeset-section option for that (wiki_format_messages).

Also, I'm in the process of refactoring the Wiki engine. I think it should be possible to create a "TracLinks only" formatter, so that only things like tickets and changesets links get formatted.

Changed 5 years ago by Sergei Haller <sergei@…>

comment:4 in reply to: ↑ 3 ; follow-up: Changed 5 years ago by Sergei Haller <sergei@…>

Replying to cboos:

There's currently a TracIni#changeset-section option for that (wiki_format_messages).

thanks, I must have overseen that option. Though it doesn't respect line breaks. This is easily fixed (see attached patch)

Also, I'm in the process of refactoring the Wiki engine. I think it should be possible to create a "TracLinks only" formatter, so that only things like tickets and changesets links get formatted.

that'd be great, too.

comment:5 in reply to: ↑ 4 Changed 5 years ago by cboos

Replying to Sergei Haller <sergei@sergei-haller.de>:

Replying to cboos:

There's currently a TracIni#changeset-section option for that (wiki_format_messages).

thanks, I must have overseen that option. Though it doesn't respect line breaks. This is easily fixed (see attached patch)

thanks, applied in r4799.

Changed 5 years ago by Sergei Haller <sergei@…>

somewhat related. fixes shorten_line call in revision log if wiki_format_messages is disabled.

comment:6 Changed 5 years ago by cboos

  • Owner changed from jonas to cboos

hm, btw, I didn't notice attachment:short-mes.patch but I did notice the columns full of shorten_line(message) → r4800 ;-)

comment:7 Changed 5 years ago by cboos

In #3203, there's the idea to specifically disable one kind of link resolver (the r… style changeset links).

comment:8 Changed 5 years ago by cboos

#4944 was closed as duplicate (emphasis was put there on the need to respect whitespace).

comment:9 Changed 5 years ago by cboos

  • Milestone changed from 0.11 to 0.12

WikiEngine refactoring and related fixes postponed.

comment:10 Changed 4 years ago by Alexander@…

Is the "TracLinks only" formatter already implemented? I am new to Trac and do not know how to interpret the message "milestone changed from 0.11 to 0.12" in this thread. The Trac instance I am a user of is still based on 0.10.3, but if I knew there was a feature like "TracLinks only", I might be able to convince the admin to upgrade to a newer version. The problem I had with the Wiki formatter is described in #6510.

comment:11 Changed 4 years ago by cboos

It simply means this feature is on the TODO list for 0.12.

comment:12 Changed 3 years ago by rbu@…

  • Cc rbu@… added

adding to cc (this text is needed to not trigger the spam detection, unfortunately)

comment:13 Changed 2 years ago by cboos

  • Severity changed from normal to minor

comment:14 Changed 2 years ago by cboos

  • Severity changed from minor to normal

#3591 was closed as duplicate of this ticket.

comment:15 Changed 20 months ago by Thijs Triemstra <lists@…>

  • Cc lists@… added

Could be useful for the 'description' field in the csv export as well.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from cboos. Next status will be 'new'
The owner will be changed from cboos to anonymous. Next status will be 'assigned'
Author


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

 
Note: See TracTickets for help on using tickets.