Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb.py @ 964:3f37720e7dc7
hgweb: Make maxfiles, maxchanges, and allowpull proper config options
author | mpm@selenic.com |
---|---|
date | Fri, 19 Aug 2005 22:12:40 -0800 |
parents | 305ab68c4394 |
children | 4f81068ed8cd |
line wrap: on
line diff
--- a/mercurial/hgweb.py Fri Aug 19 22:11:48 2005 -0800 +++ b/mercurial/hgweb.py Fri Aug 19 22:12:40 2005 -0800 @@ -127,8 +127,6 @@ } class hgweb: - maxchanges = 10 - maxfiles = 10 def __init__(self, path, name=None, templates=""): self.templates = templates @@ -142,6 +140,9 @@ if s.st_mtime != self.mtime: self.mtime = s.st_mtime self.repo = repository(ui(), self.path) + self.maxchanges = self.repo.ui.config("web", "maxchanges", 10) + self.maxfiles = self.repo.ui.config("web", "maxchanges", 10) + self.allowpull = self.repo.ui.configbool("web", "allowpull", True) def date(self, cs): return time.asctime(time.gmtime(float(cs[2].split(' ')[0]))) @@ -688,7 +689,7 @@ elif args['cmd'][0] == 'changegroup': httphdr("application/mercurial-0.1") nodes = [] - if self.viewonly: + if not self.allowpull: return if args.has_key('roots'):