# HG changeset patch # User mpm@selenic.com # Date 1126811148 18000 # Node ID 4603eef602373b0bb3ed2e66aa0da2afd8bfb067 # Parent f75567782abad13aba834671b9e20448e90e8ac2 hgweb: use ui:username rather than web:contact This also removes the creation of .hg/hgrc with web:contact at init time. diff -r f75567782aba -r 4603eef60237 mercurial/hgweb.py --- 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, diff -r f75567782aba -r 4603eef60237 mercurial/localrepo.py --- 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: diff -r f75567782aba -r 4603eef60237 tests/test-archive --- 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