hgweb: extract raw prefix from NWI commands
authorBrendan Cully <brendan@kublai.com>
Wed, 04 Oct 2006 17:04:40 -0700
changeset 3261 329ac0c0c0e8
parent 3260 1f1af9b273e8
child 3262 1e322b44b366
hgweb: extract raw prefix from NWI commands
mercurial/hgweb/hgweb_mod.py
--- 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]: