comparison mercurial/hgweb/hgweb_mod.py @ 9731:0e080d519d1b

hgweb: treat rev as raw-rev if user agent is hg
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 06 Nov 2009 22:46:46 +0100
parents 36654238c050
children d3dbdca92458
comparison
equal deleted inserted replaced
9730:732fc0e9d411 9731:0e080d519d1b
149 node = args.pop(0) 149 node = args.pop(0)
150 req.form['node'] = [node] 150 req.form['node'] = [node]
151 if args: 151 if args:
152 req.form['file'] = args 152 req.form['file'] = args
153 153
154 ua = req.env.get('HTTP_USER_AGENT', '')
155 if cmd == 'rev' and 'mercurial' in ua:
156 req.form['style'] = ['raw']
157
154 if cmd == 'archive': 158 if cmd == 'archive':
155 fn = req.form['node'][0] 159 fn = req.form['node'][0]
156 for type_, spec in self.archive_specs.iteritems(): 160 for type_, spec in self.archive_specs.iteritems():
157 ext = spec[2] 161 ext = spec[2]
158 if fn.endswith(ext): 162 if fn.endswith(ext):