Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb.py @ 1143:4fffb3d84b7c
Allow list of (virtual, real) or dictionary to be passed to hgwebdir.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 29 Aug 2005 07:39:01 +0200 |
parents | 74d184a40a2e |
children | b6f5a947e62e |
comparison
equal
deleted
inserted
replaced
1142:74d184a40a2e | 1143:4fffb3d84b7c |
---|---|
920 httpd.serve_forever() | 920 httpd.serve_forever() |
921 | 921 |
922 # This is a stopgap | 922 # This is a stopgap |
923 class hgwebdir: | 923 class hgwebdir: |
924 def __init__(self, config): | 924 def __init__(self, config): |
925 cp = ConfigParser.SafeConfigParser() | 925 if type(config) == type([]): |
926 cp.read(config) | 926 self.repos = config |
927 self.repos = cp.items("paths") | 927 elif type(config) == type({}): |
928 self.repos.sort() | 928 self.repos = config.items() |
929 self.repos.sort() | |
930 else: | |
931 cp = ConfigParser.SafeConfigParser() | |
932 cp.read(config) | |
933 self.repos = cp.items("paths") | |
934 self.repos.sort() | |
929 | 935 |
930 def run(self): | 936 def run(self): |
931 def header(**map): | 937 def header(**map): |
932 yield tmpl("header", **map) | 938 yield tmpl("header", **map) |
933 | 939 |