Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/server.py @ 4079:40c9710e8182
Pass a ui from create_server to hgwebdir and a repo from hgwebdir to hgweb
This allows repo pages to respect hg serve --webdir-conf <file> --style=gitweb
(part of issue253).
Since we're creating a ui object anyway, use it as the parentui of the ui
objects created for every repo entry. This has the unintended side-effect
that --name=foo on the command line will set the name of all repos.
If one of the repos being served has a .hg/hgrc owned by a user that is not
trusted, hg will now print the "Not trusting file..." warning when reading
it. This is consistent with the behaviour from a hg serve from inside the
repo.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 13 Feb 2007 10:01:44 -0200 |
parents | 769be3c57564 |
children | e6d26e71f049 3d7480ada3e5 |
comparison
equal
deleted
inserted
replaced
4078:ff08cebcd116 | 4079:40c9710e8182 |
---|---|
218 pass | 218 pass |
219 self.addr, self.port = addr, port | 219 self.addr, self.port = addr, port |
220 | 220 |
221 def make_handler(self): | 221 def make_handler(self): |
222 if self.webdir_conf: | 222 if self.webdir_conf: |
223 hgwebobj = self.webdirmaker(self.webdir_conf) | 223 hgwebobj = self.webdirmaker(self.webdir_conf, ui) |
224 elif self.repo is not None: | 224 elif self.repo is not None: |
225 hgwebobj = self.repoviewmaker(repo.__class__(repo.ui, | 225 hgwebobj = self.repoviewmaker(repo.__class__(repo.ui, |
226 repo.origroot)) | 226 repo.origroot)) |
227 else: | 227 else: |
228 raise hg.RepoError(_("There is no Mercurial repository here" | 228 raise hg.RepoError(_("There is no Mercurial repository here" |