##// END OF EJS Templates
Longer variable names in hgwebdir: l->repos, v->name, r->path
Thomas Arendsen Hein -
r1130:1ad52c76 default
parent child Browse files
Show More
@@ -939,11 +939,11 b' class hgwebdir:'
939 939
940 940 def entries(**map):
941 941 parity = 0
942 l = self.cp.items("paths")
943 l.sort()
944 for v,r in l:
942 repos = self.cp.items("paths")
943 repos.sort()
944 for name, path in repos:
945 945 cp2 = ConfigParser.SafeConfigParser()
946 cp2.read(os.path.join(r, ".hg", "hgrc"))
946 cp2.read(os.path.join(path, ".hg", "hgrc"))
947 947
948 948 def get(sec, val, default):
949 949 try:
@@ -951,15 +951,15 b' class hgwebdir:'
951 951 except:
952 952 return default
953 953
954 url = os.environ["REQUEST_URI"] + "/" + v
954 url = os.environ["REQUEST_URI"] + "/" + name
955 955 url = url.replace("//", "/")
956 956
957 957 yield dict(author=get("web", "author", "unknown"),
958 name=get("web", "name", v),
958 name=get("web", "name", name),
959 959 url=url,
960 960 parity=parity,
961 961 shortdesc=get("web", "description", "unknown"),
962 lastupdate=os.stat(os.path.join(r, ".hg",
962 lastupdate=os.stat(os.path.join(path, ".hg",
963 963 "00changelog.d")).st_mtime)
964 964
965 965 parity = 1 - parity
General Comments 0
You need to be logged in to leave comments. Login now