--- a/hgext/zeroconf/__init__.py Fri Jun 30 03:45:42 2017 +0200
+++ b/hgext/zeroconf/__init__.py Fri Jun 30 03:45:43 2017 +0200
@@ -127,7 +127,9 @@
with app._obtainrepo() as repo:
name = app.reponame or os.path.basename(repo.root)
path = repo.ui.config("web", "prefix", "").strip('/')
- desc = repo.ui.config("web", "description", name)
+ desc = repo.ui.config("web", "description")
+ if not desc:
+ desc = name
publish(name, desc, path, port)
else:
# webdir
@@ -137,7 +139,9 @@
u.readconfig(os.path.join(path, '.hg', 'hgrc'))
name = os.path.basename(repo)
path = (prefix + repo).strip('/')
- desc = u.config('web', 'description', name)
+ desc = u.config('web', 'description')
+ if not desc:
+ desc = name
publish(name, desc, path, port)
return httpd
--- a/mercurial/configitems.py Fri Jun 30 03:45:42 2017 +0200
+++ b/mercurial/configitems.py Fri Jun 30 03:45:43 2017 +0200
@@ -615,6 +615,9 @@
coreconfigitem('web', 'descend',
default=True,
)
+coreconfigitem('web', 'description',
+ default="",
+)
coreconfigitem('worker', 'backgroundclose',
default=dynamicdefault,
)
--- a/mercurial/hgweb/hgwebdir_mod.py Fri Jun 30 03:45:42 2017 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py Fri Jun 30 03:45:43 2017 +0200
@@ -428,7 +428,7 @@
continue
contact = get_contact(get)
- description = get("web", "description", "")
+ description = get("web", "description")
seenrepos.add(name)
name = get("web", "name", name)
row = {'contact': contact or "unknown",
--- a/mercurial/hgweb/webcommands.py Fri Jun 30 03:45:42 2017 +0200
+++ b/mercurial/hgweb/webcommands.py Fri Jun 30 03:45:43 2017 +0200
@@ -719,8 +719,11 @@
start = max(0, count - web.maxchanges)
end = min(count, start + web.maxchanges)
+ desc = web.config("web", "description")
+ if not desc:
+ desc = 'unknown'
return tmpl("summary",
- desc=web.config("web", "description", "unknown"),
+ desc=desc,
owner=get_contact(web.config) or "unknown",
lastchange=tip.date(),
tags=tagentries,