Show More
@@ -934,8 +934,7 b' class hgwebdir:' | |||||
934 | def footer(**map): |
|
934 | def footer(**map): | |
935 | yield tmpl("footer", **map) |
|
935 | yield tmpl("footer", **map) | |
936 |
|
936 | |||
937 |
|
|
937 | m = os.path.join(templatepath(), "map") | |
938 | m = os.path.join(templates, "map") |
|
|||
939 | tmpl = templater(m, common_filters, |
|
938 | tmpl = templater(m, common_filters, | |
940 | {"header": header, "footer": footer}) |
|
939 | {"header": header, "footer": footer}) | |
941 |
|
940 | |||
@@ -946,8 +945,8 b' class hgwebdir:' | |||||
946 | u.readconfig(file(os.path.join(path, '.hg', 'hgrc'))) |
|
945 | u.readconfig(file(os.path.join(path, '.hg', 'hgrc'))) | |
947 | get = u.config |
|
946 | get = u.config | |
948 |
|
947 | |||
949 |
url = os.environ["REQUEST_URI"] |
|
948 | url = ('/'.join([os.environ["REQUEST_URI"], name]) | |
950 |
|
|
949 | .replace("//", "/")) | |
951 |
|
950 | |||
952 | yield dict(contact=get("web", "contact") or |
|
951 | yield dict(contact=get("web", "contact") or | |
953 | get("web", "author", "unknown"), |
|
952 | get("web", "author", "unknown"), | |
@@ -960,21 +959,12 b' class hgwebdir:' | |||||
960 |
|
959 | |||
961 | parity = 1 - parity |
|
960 | parity = 1 - parity | |
962 |
|
961 | |||
963 | try: |
|
962 | virtual = os.environ.get("PATH_INFO", "").strip('/') | |
964 | virtual = os.environ["PATH_INFO"] |
|
963 | if virtual: | |
965 | except: |
|
|||
966 | virtual = "" |
|
|||
967 |
|
||||
968 | virtual = virtual.strip('/') |
|
|||
969 |
|
||||
970 | if len(virtual): |
|
|||
971 | real = dict(self.repos).get(virtual) |
|
964 | real = dict(self.repos).get(virtual) | |
972 | if real: |
|
965 | if real: | |
973 |
|
|
966 | hgweb(real).run() | |
974 | h.run() |
|
|||
975 | return |
|
|||
976 | else: |
|
967 | else: | |
977 |
write(tmpl("notfound", repo |
|
968 | write(tmpl("notfound", repo=virtual)) | |
978 | return |
|
969 | else: | |
979 |
|
||||
980 | write(tmpl("index", entries=entries)) |
|
970 | write(tmpl("index", entries=entries)) |
General Comments 0
You need to be logged in to leave comments.
Login now