hgwebdir: try to get web.style and web.motd from the ui.config system
This finishes fixing
issue253. As a bonus, web.style and web.motd
settings from ~/.hgrc will be used for the hgwebdir index page.
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.
hg serve: call setconfig on the parentui
It makes sense to do this on the "global" ui object, since command line
options should affect the whole process.
This should fix hg serve --style=gitweb inside a repo (part of
issue253).
Prevent type exception on concatenation if diffstat returns None.
This will most often occur if diffstat is not installed in the
target platform, though may also happen in other cases where
diffstat fails to execute.
Signed-off-by: Sean Dague <sean@dague.net>
Try to pass repo.ui to reposetup hooks
The ui object we received in this function may belong to another repo,
which could be confusing from the hook point of view. Trying to use
the ui object from the newly created repo should avoid this confusion.