##// END OF EJS Templates
Use ConfigParser only in hgwebdir.__init__()
Thomas Arendsen Hein -
r1141:033c968d default
parent child Browse files
Show More
@@ -922,8 +922,10 b' def server(path, name, templates, addres'
922 922 # This is a stopgap
923 923 class hgwebdir:
924 924 def __init__(self, config):
925 self.cp = ConfigParser.SafeConfigParser()
926 self.cp.read(config)
925 cp = ConfigParser.SafeConfigParser()
926 cp.read(config)
927 self.repos = cp.items("paths")
928 self.repos.sort()
927 929
928 930 def run(self):
929 931 def header(**map):
@@ -939,9 +941,7 b' class hgwebdir:'
939 941
940 942 def entries(**map):
941 943 parity = 0
942 repos = self.cp.items("paths")
943 repos.sort()
944 for name, path in repos:
944 for name, path in self.repos:
945 945 u = ui()
946 946 u.readconfig(file(os.path.join(path, '.hg', 'hgrc')))
947 947 get = u.config
@@ -968,8 +968,8 b' class hgwebdir:'
968 968 virtual = virtual.strip('/')
969 969
970 970 if len(virtual):
971 if self.cp.has_option("paths", virtual):
972 real = self.cp.get("paths", virtual)
971 real = dict(self.repos).get(virtual)
972 if real:
973 973 h = hgweb(real)
974 974 h.run()
975 975 return
General Comments 0
You need to be logged in to leave comments. Login now