def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): if baseui: u = baseui.copy() else: u = ui.ui() self.repo = hg.repository(u, repo) else: self.repo = repo self.repo = self._getview(self.repo) self.repo.ui.setconfig('ui', 'report_untrusted', 'off') self.repo.baseui.setconfig('ui', 'report_untrusted', 'off') self.repo.ui.setconfig('ui', 'nontty', 'true') self.repo.baseui.setconfig('ui', 'nontty', 'true') hook.redirect(True) self.mtime = -1 self.size = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config('web', 'templates') self.websubtable = self.loadwebsub()
def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): if baseui: u = baseui.copy() else: u = ui.ui() self.repo = hg.repository(u, repo) else: self.repo = repo self.repo = self._getview(self.repo) self.repo.ui.setconfig("ui", "report_untrusted", "off") self.repo.baseui.setconfig("ui", "report_untrusted", "off") self.repo.ui.setconfig("ui", "nontty", "true") self.repo.baseui.setconfig("ui", "nontty", "true") hook.redirect(True) self.mtime = -1 self.size = -1 self.reponame = name self.archives = "zip", "gz", "bz2" self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config("web", "templates") self.websubtable = self.loadwebsub()
def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): if baseui: u = baseui.copy() else: u = ui.ui() r = hg.repository(u, repo) else: # we trust caller to give us a private copy r = repo r.ui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.baseui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.ui.setconfig('ui', 'nontty', 'true', 'hgweb') r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb') # resolve file patterns relative to repo root r.ui.setconfig('ui', 'forcecwd', r.root, 'hgweb') r.baseui.setconfig('ui', 'forcecwd', r.root, 'hgweb') # displaying bundling progress bar while serving feel wrong and may # break some wsgi implementation. r.ui.setconfig('progress', 'disable', 'true', 'hgweb') r.baseui.setconfig('progress', 'disable', 'true', 'hgweb') self._repos = [hg.cachedlocalrepo(self._webifyrepo(r))] self._lastrepo = self._repos[0] hook.redirect(True) self.reponame = name
def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): if baseui: u = baseui.copy() else: u = ui.ui() r = hg.repository(u, repo) else: # we trust caller to give us a private copy r = repo r = self._getview(r) r.ui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.baseui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.ui.setconfig('ui', 'nontty', 'true', 'hgweb') r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb') # displaying bundling progress bar while serving feel wrong and may # break some wsgi implementation. r.ui.setconfig('progress', 'disable', 'true', 'hgweb') r.baseui.setconfig('progress', 'disable', 'true', 'hgweb') self.repo = r hook.redirect(True) self.repostate = ((-1, -1), (-1, -1)) self.mtime = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config('web', 'templates') self.websubtable = self.loadwebsub()
def __init__(self, repo, name=None, baseui=None): if isinstance(repo, str): if baseui: u = baseui.copy() else: u = ui.ui() r = hg.repository(u, repo) else: r = repo r = self._getview(r) r.ui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.baseui.setconfig('ui', 'report_untrusted', 'off', 'hgweb') r.ui.setconfig('ui', 'nontty', 'true', 'hgweb') r.baseui.setconfig('ui', 'nontty', 'true', 'hgweb') self.repo = r hook.redirect(True) self.mtime = -1 self.size = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config('web', 'templates') self.websubtable = self.loadwebsub()
def __init__(self, repo, name=None): if isinstance(repo, str): u = ui.ui() u.setconfig('ui', 'report_untrusted', 'off') u.setconfig('ui', 'interactive', 'off') self.repo = hg.repository(u, repo) else: self.repo = repo hook.redirect(True) self.mtime = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config('web', 'templates')
def __init__(self, repo, name=None): if isinstance(repo, str): parentui = ui.ui(report_untrusted=False, interactive=False) self.repo = hg.repository(parentui, repo) else: self.repo = repo hook.redirect(True) self.mtime = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config("web", "templates", templater.templatepath(), untrusted=False)
def __init__(self, repo, name=None): if isinstance(repo, str): parentui = ui.ui(report_untrusted=False, interactive=False) self.repo = hg.repository(parentui, repo) else: self.repo = repo hook.redirect(True) self.mtime = -1 self.reponame = name self.archives = 'zip', 'gz', 'bz2' self.stripecount = 1 self._capabilities = None # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = self.config("web", "templates", templater.templatepath(), untrusted=False)
def __init__(self, reponame): parentui = ui.ui(report_untrusted=False, interactive=False) self.repo = appenginerepository(reponame, parentui) hook.redirect(True) self.reponame = reponame self.archives = "zip", "gz", "bz2" self.stripecount = 1 # a repo owner may set web.templates in .hg/hgrc to get any file # readable by the user running the CGI script self.templatepath = "templates" # originally configurable data. self.maxchanges = 10 self.stripecount = 1 self.maxshortchanges = 60 self.maxfiles = 10 self.allowpull = True self.encoding = util._encoding self.style = "coal"