comparison mercurial/hgweb.py @ 986:2810c625ca98

Add web:style option
author mpm@selenic.com
date Sun, 21 Aug 2005 15:00:02 -0700
parents edc368e0b9aa
children bfe12654764d
comparison
equal deleted inserted replaced
985:7ffa91f275ff 986:2810c625ca98
624 args = cgi.parse() 624 args = cgi.parse()
625 625
626 t = self.templates or self.repo.ui.config("web", "templates", 626 t = self.templates or self.repo.ui.config("web", "templates",
627 templatepath()) 627 templatepath())
628 m = os.path.join(t, "map") 628 m = os.path.join(t, "map")
629 style = self.repo.ui.config("web", "style", "")
629 if args.has_key('style'): 630 if args.has_key('style'):
630 b = os.path.basename("map-" + args['style'][0]) 631 style = args['style'][0]
632 if style:
633 b = os.path.basename("map-" + style)
631 p = os.path.join(t, b) 634 p = os.path.join(t, b)
632 if os.path.isfile(p): m = p 635 if os.path.isfile(p): m = p
633 636
634 port = os.environ["SERVER_PORT"] 637 port = os.environ["SERVER_PORT"]
635 port = port != "80" and (":" + port) or "" 638 port = port != "80" and (":" + port) or ""