Ticket #3620 (assigned enhancement)

Opened 5 years ago

Last modified 1 year ago

Add wiki page revision support

Reported by: anonymous Assigned to: rjollos (accepted)
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

Change History

03/15/10 01:21:45 changed by hasienda

  • keywords set to revision.
  • summary changed from Add wiki page revision support... to 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)

06/06/12 08:27:04 changed by rjollos

  • status changed from new to assigned.
  • owner changed from coderanger to rjollos.

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.

06/06/12 08:53:30 changed by rjollos

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


Add/Change #3620 (Add wiki page revision support)




Change Properties
Action