summaryrefslogtreecommitdiff
path: root/mercurial/hgweb/hgweb_mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'mercurial/hgweb/hgweb_mod.py')
-rw-r--r--mercurial/hgweb/hgweb_mod.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
index 63a9c6c..bf24d0c 100644
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -7,7 +7,7 @@
# GNU General Public License version 2 or any later version.
import os
-from mercurial import ui, hg, hook, error, encoding, templater, util
+from mercurial import ui, hg, hook, error, encoding, templater
from common import get_stat, ErrorResponse, permhooks, caching
from common import HTTP_OK, HTTP_NOT_MODIFIED, HTTP_BAD_REQUEST
from common import HTTP_NOT_FOUND, HTTP_SERVER_ERROR
@@ -36,7 +36,7 @@ class hgweb(object):
self.repo = repo
self.repo.ui.setconfig('ui', 'report_untrusted', 'off')
- self.repo.ui.setconfig('ui', 'nontty', 'true')
+ self.repo.ui.setconfig('ui', 'interactive', 'off')
hook.redirect(True)
self.mtime = -1
self.size = -1
@@ -73,8 +73,7 @@ class hgweb(object):
self.repo = hg.repository(self.repo.ui, self.repo.root)
self.maxchanges = int(self.config("web", "maxchanges", 10))
self.stripecount = int(self.config("web", "stripes", 1))
- self.maxshortchanges = int(self.config("web", "maxshortchanges",
- 60))
+ self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
self.maxfiles = int(self.config("web", "maxfiles", 10))
self.allowpull = self.configbool("web", "allowpull", True)
encoding.encoding = self.config("web", "encoding",
@@ -149,7 +148,7 @@ class hgweb(object):
cmd = cmd[style + 1:]
# avoid accepting e.g. style parameter as command
- if util.safehasattr(webcommands, cmd):
+ if hasattr(webcommands, cmd):
req.form['cmd'] = [cmd]
else:
cmd = ''
@@ -237,7 +236,6 @@ class hgweb(object):
port = port != default_port and (":" + port) or ""
urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port)
logourl = self.config("web", "logourl", "http://mercurial.selenic.com/")
- logoimg = self.config("web", "logoimg", "hglogo.png")
staticurl = self.config("web", "staticurl") or req.url + 'static/'
if not staticurl.endswith('/'):
staticurl += '/'
@@ -278,7 +276,6 @@ class hgweb(object):
tmpl = templater.templater(mapfile,
defaults={"url": req.url,
"logourl": logourl,
- "logoimg": logoimg,
"staticurl": staticurl,
"urlbase": urlbase,
"repo": self.reponame,