##// END OF EJS Templates
configitems: register the 'web.description' config
Boris Feld -
r34235:a6c18628 default
parent child Browse files
Show More
@@ -127,7 +127,9 b' def zc_create_server(create_server, ui, '
127 with app._obtainrepo() as repo:
127 with app._obtainrepo() as repo:
128 name = app.reponame or os.path.basename(repo.root)
128 name = app.reponame or os.path.basename(repo.root)
129 path = repo.ui.config("web", "prefix", "").strip('/')
129 path = repo.ui.config("web", "prefix", "").strip('/')
130 desc = repo.ui.config("web", "description", name)
130 desc = repo.ui.config("web", "description")
131 if not desc:
132 desc = name
131 publish(name, desc, path, port)
133 publish(name, desc, path, port)
132 else:
134 else:
133 # webdir
135 # webdir
@@ -137,7 +139,9 b' def zc_create_server(create_server, ui, '
137 u.readconfig(os.path.join(path, '.hg', 'hgrc'))
139 u.readconfig(os.path.join(path, '.hg', 'hgrc'))
138 name = os.path.basename(repo)
140 name = os.path.basename(repo)
139 path = (prefix + repo).strip('/')
141 path = (prefix + repo).strip('/')
140 desc = u.config('web', 'description', name)
142 desc = u.config('web', 'description')
143 if not desc:
144 desc = name
141 publish(name, desc, path, port)
145 publish(name, desc, path, port)
142 return httpd
146 return httpd
143
147
@@ -615,6 +615,9 b" coreconfigitem('web', 'deny_read',"
615 coreconfigitem('web', 'descend',
615 coreconfigitem('web', 'descend',
616 default=True,
616 default=True,
617 )
617 )
618 coreconfigitem('web', 'description',
619 default="",
620 )
618 coreconfigitem('worker', 'backgroundclose',
621 coreconfigitem('worker', 'backgroundclose',
619 default=dynamicdefault,
622 default=dynamicdefault,
620 )
623 )
@@ -428,7 +428,7 b' class hgwebdir(object):'
428 continue
428 continue
429
429
430 contact = get_contact(get)
430 contact = get_contact(get)
431 description = get("web", "description", "")
431 description = get("web", "description")
432 seenrepos.add(name)
432 seenrepos.add(name)
433 name = get("web", "name", name)
433 name = get("web", "name", name)
434 row = {'contact': contact or "unknown",
434 row = {'contact': contact or "unknown",
@@ -719,8 +719,11 b' def summary(web, req, tmpl):'
719 start = max(0, count - web.maxchanges)
719 start = max(0, count - web.maxchanges)
720 end = min(count, start + web.maxchanges)
720 end = min(count, start + web.maxchanges)
721
721
722 desc = web.config("web", "description")
723 if not desc:
724 desc = 'unknown'
722 return tmpl("summary",
725 return tmpl("summary",
723 desc=web.config("web", "description", "unknown"),
726 desc=desc,
724 owner=get_contact(web.config) or "unknown",
727 owner=get_contact(web.config) or "unknown",
725 lastchange=tip.date(),
728 lastchange=tip.date(),
726 tags=tagentries,
729 tags=tagentries,
General Comments 0
You need to be logged in to leave comments. Login now