Show More
@@ -922,8 +922,10 b' def server(path, name, templates, addres' | |||||
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 |
|
|
925 | cp = ConfigParser.SafeConfigParser() | |
926 |
|
|
926 | cp.read(config) | |
|
927 | self.repos = cp.items("paths") | |||
|
928 | self.repos.sort() | |||
927 |
|
929 | |||
928 | def run(self): |
|
930 | def run(self): | |
929 | def header(**map): |
|
931 | def header(**map): | |
@@ -939,9 +941,7 b' class hgwebdir:' | |||||
939 |
|
941 | |||
940 | def entries(**map): |
|
942 | def entries(**map): | |
941 | parity = 0 |
|
943 | parity = 0 | |
942 | repos = self.cp.items("paths") |
|
944 | for name, path in self.repos: | |
943 | repos.sort() |
|
|||
944 | for name, path in repos: |
|
|||
945 | u = ui() |
|
945 | u = ui() | |
946 | u.readconfig(file(os.path.join(path, '.hg', 'hgrc'))) |
|
946 | u.readconfig(file(os.path.join(path, '.hg', 'hgrc'))) | |
947 | get = u.config |
|
947 | get = u.config | |
@@ -968,8 +968,8 b' class hgwebdir:' | |||||
968 | virtual = virtual.strip('/') |
|
968 | virtual = virtual.strip('/') | |
969 |
|
969 | |||
970 | if len(virtual): |
|
970 | if len(virtual): | |
971 |
|
|
971 | real = dict(self.repos).get(virtual) | |
972 | real = self.cp.get("paths", virtual) |
|
972 | if real: | |
973 | h = hgweb(real) |
|
973 | h = hgweb(real) | |
974 | h.run() |
|
974 | h.run() | |
975 | return |
|
975 | return |
General Comments 0
You need to be logged in to leave comments.
Login now