Modify

Opened 7 years ago

Closed 7 years ago

#1835 closed enhancement (fixed)

[patch] AddCommentMacro updated to 0.11

Reported by: osimons Owned by: athomas
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Enclosed is a patch that migrates AddCommentMacro to Trac 0.11.

It maintains the structure and workings of the 0.10 version, and as a working macro it should now be easier to refactor further to use Genshi tag() or even a template for output rendering. However, I have intentionally left this out for now in order to have as few changes as possible.

Some comments on the patch:

  • It depends on a 0.11 update of MacroPostPlugin. I have created a separate ticket with a patch for this - see #1832. A bumped version of 0.2 is made to syncronise, but feel free to find some other means of matching this dependency.
  • I have also bumped the version of AddCommentMacro to 0.3 to signify a change - again, feel free to name the version as you like.
  • There is one new feature in this patch - or rather, and adjustment to 0.11 that is not just migrating code: Like Trac wiki pages, the authname will always default to req.authname if the user is logged in. The username textbox will only show for anonymous users.
  • The macro documentation is improved slightly to add the missing argument and so on.
  • I branched it locally before updates (svn cp 0.10 0.11), so the paths in the diff refers to 0.11. It is originally branched from 0.10 rev 2489.

Attachments (3)

addcommentmacro-011dev-r2502.diff (11.2 KB) - added by osimons 7 years ago.
Patch for 0.11 version of AddCommentMacro.
addcommentmacro-011dev-r2507.diff (11.1 KB) - added by osimons 7 years ago.
A to_unicode() had dropped out during initial conversion. New version of patch (replacing 2502)
addcommentmacro-011dev-r2792.diff (12.0 KB) - added by osimons 7 years ago.
Updated to work with the very recent 0.11 - new context / resource APIs, security, genshi.builder and so on.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by osimons

Patch for 0.11 version of AddCommentMacro.

Changed 7 years ago by osimons

A to_unicode() had dropped out during initial conversion. New version of patch (replacing 2502)

Changed 7 years ago by osimons

Updated to work with the very recent 0.11 - new context / resource APIs, security, genshi.builder and so on.

comment:1 Changed 7 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

Latest patch applied in [2797]. Closing.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from athomas. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.