# HG changeset patch # User Brendan Cully # Date 2008-10-29 04:58:30 # Node ID 6e9fe4ff9c5499a7b8354337a622562f2d4312d9 # Parent a1f8ad3c18217efa21b69401cb19b35da0b6f442 hgweb: handle subdirectories within static directory diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -141,15 +141,16 @@ class hgweb(object): else: cmd = '' - if args and args[0]: - node = args.pop(0) - req.form['node'] = [node] - if args: - req.form['file'] = args + if cmd == 'static': + req.form['file'] = ['/'.join(args)] + else: + if args and args[0]: + node = args.pop(0) + req.form['node'] = [node] + if args: + req.form['file'] = args - if cmd == 'static': - req.form['file'] = req.form['node'] - elif cmd == 'archive': + if cmd == 'archive': fn = req.form['node'][0] for type_, spec in self.archive_specs.iteritems(): ext = spec[2]