Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hgweb.py @ 1131:a67982e64109
Create repository objects instead of using own ConfigParser in hgwebdir.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 28 Aug 2005 17:55:15 +0200 |
parents | 1ad52c7679e1 |
children | 92525920ad29 |
comparison
equal
deleted
inserted
replaced
1130:1ad52c7679e1 | 1131:a67982e64109 |
---|---|
940 def entries(**map): | 940 def entries(**map): |
941 parity = 0 | 941 parity = 0 |
942 repos = self.cp.items("paths") | 942 repos = self.cp.items("paths") |
943 repos.sort() | 943 repos.sort() |
944 for name, path in repos: | 944 for name, path in repos: |
945 cp2 = ConfigParser.SafeConfigParser() | 945 repo = repository(ui(), path) |
946 cp2.read(os.path.join(path, ".hg", "hgrc")) | 946 get = repo.ui.config |
947 | |
948 def get(sec, val, default): | |
949 try: | |
950 return cp2.get(sec, val) | |
951 except: | |
952 return default | |
953 | 947 |
954 url = os.environ["REQUEST_URI"] + "/" + name | 948 url = os.environ["REQUEST_URI"] + "/" + name |
955 url = url.replace("//", "/") | 949 url = url.replace("//", "/") |
956 | 950 |
957 yield dict(author=get("web", "author", "unknown"), | 951 yield dict(author=get("web", "author", "unknown"), |