[PATCH 4 of 8] Completed renaming author to contact in hgwebdir:

Thomas Arendsen Hein thomas at intevation.de
Sun Aug 28 11:54:54 CDT 2005


# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Node ID 92525920ad291a2f9cc9248ac0fef8134f51926b
# Parent  a67982e64109087eb728b5cb7a45a37c5785639b
Completed renaming author to contact in hgwebdir:
Prefer [web] contact = foo instead of author, but still accept the old name.
Adjusted template to show obfuscated contact. Drop bogus <i>email</i> entry.

diff -r a67982e64109 -r 92525920ad29 mercurial/hgweb.py
--- a/mercurial/hgweb.py	Sun Aug 28 15:55:15 2005
+++ b/mercurial/hgweb.py	Sun Aug 28 16:13:28 2005
@@ -948,7 +948,8 @@
                 url = os.environ["REQUEST_URI"] + "/" + name
                 url = url.replace("//", "/")
 
-                yield dict(author=get("web", "author", "unknown"),
+                yield dict(contact=get("web", "contact") or
+                                   get("web", "author", "unknown"),
                            name=get("web", "name", name),
                            url=url,
                            parity=parity,
diff -r a67982e64109 -r 92525920ad29 templates/map
--- a/templates/map	Sun Aug 28 15:55:15 2005
+++ b/templates/map	Sun Aug 28 16:13:28 2005
@@ -35,7 +35,7 @@
 changesettag = "<tr><th class="tag">tag:</th><td class="tag">#tag#</td></tr>"
 filediffparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>"
 filelogparent = "<tr><td align="right">parent #rev#:&nbsp;</td><td><a href="?cmd=file;file=#file#;filenode=#node#">#node|short#</a></td></tr>"
-indexentry = "<tr class="parity#parity#"><td><a href="#url#">#name#</a></td><td>#shortdesc#</td><td>#author#<i>#email|obfuscate#</i></td><td>#lastupdate|age# ago</td><td><a href="#url#?cmd=changelog;style=rss">RSS</a></td></tr>"
+indexentry = "<tr class="parity#parity#"><td><a href="#url#">#name#</a></td><td>#shortdesc#</td><td>#contact|obfuscate#</td><td>#lastupdate|age# ago</td><td><a href="#url#?cmd=changelog;style=rss">RSS</a></td></tr>"
 index = index.tmpl
 archiveentry = "<a href="?cmd=archive;node=#node#;type=#type#">#type#</a> "
 notfound = notfound.tmpl


More information about the Mercurial mailing list