comparison mercurial/hgweb/hgweb_mod.py @ 3260: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 3207e30bf468
comparison
equal deleted inserted replaced
3259:1f1af9b273e8 3260:329ac0c0c0e8
662 args = query.split('/', 2) 662 args = query.split('/', 2)
663 if not args or not args[0]: 663 if not args or not args[0]:
664 return 664 return
665 665
666 cmd = args.pop(0) 666 cmd = args.pop(0)
667 if cmd == 'raw': 667 style = cmd.rfind('-')
668 req.form['style'] = ['raw'] 668 if style != -1:
669 cmd = 'rev' 669 req.form['style'] = [cmd[:style]]
670 elif cmd == 'rawdiff': 670 cmd = cmd[style+1:]
671 req.form['style'] = ['raw']
672 cmd = 'diff'
673 req.form['cmd'] = [cmd] 671 req.form['cmd'] = [cmd]
674 672
675 if args and args[0]: 673 if args and args[0]:
676 node = args.pop(0) 674 node = args.pop(0)
677 req.form['node'] = [node] 675 req.form['node'] = [node]