Commit Graph

19 Commits

Author SHA1 Message Date
Yuya Nishihara
cd5b8b18a0 server: move service factory from hgweb 2016-10-15 14:09:36 +09:00
Yuya Nishihara
7a38271c60 hgweb: extract app factory
I'll move createservice() to the server module, but createapp() seems good to
remain in the hgweb module because of its dependency on hgweb/hgwebdir_mod.
2016-10-15 14:06:46 +09:00
Yuya Nishihara
9ed442849f hgweb: load server settings from --web-conf (issue4699)
It copies the ui before loading the webconf and passes the copied ui only
to the service. This way, the hgwebdir app can reload configs cleanly.
2015-10-31 22:50:03 +09:00
Yuya Nishihara
5cfcdd71d7 hgweb: make sure command options are set to all ui objects
Before this patch, it was unclear why the httpservice object could read the
server options (e.g. --port) from 'ui'. It just worked because repo.ui is ui.
2015-11-21 13:28:12 +09:00
Yuya Nishihara
8d4fdbd827 hgweb: eliminate duck-typing to select hgweb or hgwebdir by command option
Since createservice() was moved to hgweb and hgweb imports both hgweb_mod and
hgwebdir_mod, we no longer have to force hgweb() function to select one of
them by the type of 'o' variable. Let's be explicit!

This patch does not change hgweb() function because it is the interface of
existing WSGI and CGI scripts.
2015-10-31 22:26:50 +09:00
Yuya Nishihara
c64bc024c8 hgweb: extract factory function of httpservice object
The next patch will merge the cmdutil.service() calls of both commandserver
and hgweb. Before doing it, this patch wipes out the code specific to hgweb
from commands.serve().
2015-10-31 22:15:16 +09:00
Yuya Nishihara
4fb8995ece hgweb: move httpservice object from commands module
This avoids the deep import of hgweb.server at the commands module.
2015-10-31 21:57:45 +09:00
Yuya Nishihara
47690f822c hgweb: use absolute_import 2015-10-31 22:07:40 +09:00
Matt Mackall
25324611e7 hgweb: make hgweb.hgweb a unified interface to hgweb/hgwebdir 2010-04-26 11:03:40 -05:00
Matt Mackall
d803a5b601 hgweb: add baseui to hgweb entrypoint 2010-04-26 11:03:40 -05:00
Matt Mackall
51f651d888 hgweb: make top-level prototypes mirror their callees 2010-04-26 11:03:40 -05:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Eric Hopper
c6fcaec078 Fixing up comment headers for split up code. 2006-06-02 08:05:01 -07:00
Eric Hopper
0379b620c6 Final stage of the hgweb split up.
hgweb and hgwebdir now have their own modules.
2006-05-31 10:42:44 -07:00
Eric Hopper
20797956ec Splitting up hgweb so it's easier to change. 2006-05-31 08:03:29 -07:00
Alexis S. L. Carvalho
8b1ff2c942 hgweb.manifest: revno of manifest and changelog aren't always the same
In the v4l-dvb repo, the manifest revno and the changelog revno are not
in sync.  This happened because the same patch was applied to the same
revision in two different branches, resulting in the same manifest text,
with the same parents and so the first revision was reused.

Since hgweb.manifest was assuming the revnos of the manifest and of the
changelog were always the same, clicking on manifest -> bz2 in the
v4l-dvb site would download the wrong revision.

Use the linkrev to go from manifest revision to changelog revision.

This still won't be perfect since the page will still talk about
"manifest for changeset XYZ", where XYZ was the first changeset to have
this manifest, which is not necessarily the same changeset that the user
clicked to get to this page - but at least the contents will be the
same.
2006-05-20 15:34:19 -03:00
Eric Hopper
0c1117d5be Moving hgweb.py into it's own module in preparation for breaking it up. 2006-05-18 11:48:33 -07:00