[PATCH 2 of 8] Longer variable names in hgwebdir: l->repos, v->name, r->path
Thomas Arendsen Hein
thomas at intevation.de
Sun Aug 28 16:54:52 UTC 2005
# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Node ID 1ad52c7679e14abd40f6f3e319f707df63bc6daa
# Parent ee4f60abad9399dd1e3c5671f6790044e64dbe52
Longer variable names in hgwebdir: l->repos, v->name, r->path
diff -r ee4f60abad93 -r 1ad52c7679e1 mercurial/hgweb.py
--- a/mercurial/hgweb.py Sun Aug 28 15:29:28 2005
+++ b/mercurial/hgweb.py Sun Aug 28 15:53:37 2005
@@ -939,11 +939,11 @@
def entries(**map):
parity = 0
- l = self.cp.items("paths")
- l.sort()
- for v,r in l:
+ repos = self.cp.items("paths")
+ repos.sort()
+ for name, path in repos:
cp2 = ConfigParser.SafeConfigParser()
- cp2.read(os.path.join(r, ".hg", "hgrc"))
+ cp2.read(os.path.join(path, ".hg", "hgrc"))
def get(sec, val, default):
try:
@@ -951,15 +951,15 @@
except:
return default
- url = os.environ["REQUEST_URI"] + "/" + v
+ url = os.environ["REQUEST_URI"] + "/" + name
url = url.replace("//", "/")
yield dict(author=get("web", "author", "unknown"),
- name=get("web", "name", v),
+ name=get("web", "name", name),
url=url,
parity=parity,
shortdesc=get("web", "description", "unknown"),
- lastupdate=os.stat(os.path.join(r, ".hg",
+ lastupdate=os.stat(os.path.join(path, ".hg",
"00changelog.d")).st_mtime)
parity = 1 - parity
More information about the Mercurial
mailing list