changeset 123:ac6166453d77

Added ability to get page revisions from the command-line.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 23 Nov 2013 13:31:35 -0800
parents 17188020e87e
children 6c261cb94631
files manage.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/manage.py	Thu Nov 21 21:35:56 2013 -0800
+++ b/manage.py	Sat Nov 23 13:31:35 2013 -0800
@@ -57,12 +57,15 @@
 
 
 @manager.command
-def get(url, resolve=False):
+def get(url, force_resolve=False, rev=None):
     """ Gets a page that matches the given URL.
     """
     page = wiki.getPage(url)
-    if resolve:
+    if force_resolve:
         page._force_resolve = True
+    if rev is not None:
+        print page.getRevision(rev)
+        return
     print page.text