Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Fri Nov 06 13:48:17 2009 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Fri Nov 06 22:46:46 2009 +0100 @@ -151,6 +151,10 @@ if args: req.form['file'] = args + ua = req.env.get('HTTP_USER_AGENT', '') + if cmd == 'rev' and 'mercurial' in ua: + req.form['style'] = ['raw'] + if cmd == 'archive': fn = req.form['node'][0] for type_, spec in self.archive_specs.iteritems():