Opened 9 years ago

# Add wiki page revision support

Reported by: Owned by: anonymous Ryan J Ollos normal IncludeMacro normal revision 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.

### comment:1 Changed 7 years ago by Steffen Hoffmann

#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 5 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos new → assigned

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 5 years ago by Ryan J Ollos

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

### comment:4 Changed 4 years ago by Ryan J Ollos

Status: assigned → new

### comment:5 Changed 3 years ago by Ryan J Ollos

Status: new → assigned

### Modify Ticket

Action
as assigned The owner will remain Ryan J Ollos.