changeset 3261:329ac0c0c0e8

hgweb: extract raw prefix from NWI commands
author Brendan Cully <brendan@kublai.com>
date Wed, 04 Oct 2006 17:04:40 -0700
parents 1f1af9b273e8
children 1e322b44b366
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Wed Oct 04 17:04:40 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Oct 04 17:04:40 2006 -0700
@@ -664,12 +664,10 @@
                 return
 
             cmd = args.pop(0)
-            if cmd == 'raw':
-                req.form['style'] = ['raw']
-                cmd = 'rev'
-            elif cmd == 'rawdiff':
-                req.form['style'] = ['raw']
-                cmd = 'diff'
+            style = cmd.rfind('-')
+            if style != -1:
+                req.form['style'] = [cmd[:style]]
+                cmd = cmd[style+1:]
             req.form['cmd'] = [cmd]
 
             if args and args[0]: