Modify

Opened 16 years ago

Closed 5 years ago

#3620 closed enhancement (fixed)

Add wiki page revision support

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords: revision
Cc: Trac Release: 0.10

Description

It would be nice to allow for selecting specific revisions of wiki pages. This can be done with links to source files in the repository, but I envision a need to do this for wiki pages as well.

For example, if I have a set of wiki pages that make up the documentation for my component, I can use an "include" macro to collect the pages onto a single page for generation of a user manual. While that page should change over time (as revisions to the manual are made), I'd like to be able to fix a specific version of that page to a specific version of my user manual. So, a specific version of the user manual will be made up of the set of specific versions of each wiki page that makes up the user manual. Once I've "released" my user manual, I don't want additional changes to the manual to be made. The wiki pages that make up the user manual may change as new items get added and updated, but without approval, they should not be incorporated into the previous version of the user manual.

I see two approaches...

[[Include(PageName@rev#)]] to pick a specific version of the page.

or,

[[Include(PageName, rev#, ...)]] to pick a specific version of the page.

The former may be preferable since it parallels the source file selection in wiki links.

Attachments (0)

Change History (6)

comment:1 Changed 15 years ago by Steffen Hoffmann

Keywords: revision added
Summary: Add wiki page revision support...Add wiki page revision support

#4011 was closed as a duplicate, but proposes following code to actually fix this

try:
    source_format, source_obj = source.split('#', 1)

except ValueError?: # If no : is present, assume its a wiki page
    source_format, source_obj = 'wiki', source

try:
    source_obj, source_ver = source_obj.split(':', 1)

except ValueError?: # If no : is present, assume its a wiki page
    source_ver, source_obj = None, source_obj

. . .

page = WikiPage?(self.env, source_obj, version=source_ver)

comment:2 Changed 13 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

I'm not understanding the need for the trailing # in comment:description, and the example in comment:1 appears to be a little mixed-up as well, with regard to the characters that are used for splitting. I'll commit an implementation of this shortly, and please let me know if I'm overlooking something.

comment:3 Changed 13 years ago by Ryan J Ollos

(In [11628]) Refs #3620: Added support for specifying the revision of a wiki page.

comment:4 Changed 12 years ago by Ryan J Ollos

Status: assignednew

comment:5 Changed 11 years ago by Ryan J Ollos

Status: newassigned

comment:6 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.