Mercurial > hg
changeset 1260:4603eef60237
hgweb: use ui:username rather than web:contact
This also removes the creation of .hg/hgrc with web:contact at init time.
author | mpm@selenic.com |
---|---|
date | Thu, 15 Sep 2005 14:05:48 -0500 |
parents | f75567782aba |
children | fccc90f1994e |
files | mercurial/hgweb.py mercurial/localrepo.py tests/test-archive |
diffstat | 3 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb.py Thu Sep 15 03:00:10 2005 -0500 +++ b/mercurial/hgweb.py Thu Sep 15 14:05:48 2005 -0500 @@ -964,8 +964,9 @@ url = ('/'.join([req.env["REQUEST_URI"].split('?')[0], name]) .replace("//", "/")) - yield dict(contact=get("web", "contact") or - get("web", "author", "unknown"), + yield dict(contact=(get("ui", "username") or # preferred + get("web", "contact") or # deprecated + get("web", "author", "unknown")), # also name=get("web", "name", name), url=url, parity=parity,
--- a/mercurial/localrepo.py Thu Sep 15 03:00:10 2005 -0500 +++ b/mercurial/localrepo.py Thu Sep 15 14:05:48 2005 -0500 @@ -39,9 +39,6 @@ if create: os.mkdir(self.path) os.mkdir(self.join("data")) - f = self.opener("hgrc", "w") - f.write("[web]\n") - f.write("contact = %s\n" % ui.shortuser(ui.username())) self.dirstate = dirstate.dirstate(self.opener, ui, self.root) try:
--- a/tests/test-archive Thu Sep 15 03:00:10 2005 -0500 +++ b/tests/test-archive Thu Sep 15 14:05:48 2005 -0500 @@ -13,6 +13,7 @@ echo bletch>baz/bletch hg addremove hg commit -m 3 +echo "[web]" >> .hg/hgrc echo "name = test-archive" >> .hg/hgrc echo "allowzip = true" >> .hg/hgrc echo "allowgz = true" >> .hg/hgrc