Commit Graph

36 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Thomas Arendsen Hein
483231d996 Cleanup of whitespace, indentation and line continuation. 2007-06-19 08:06:37 +02:00
Matt Mackall
934033161c hg serve: don't lookup user-supplied names/addresses 2007-06-10 19:16:20 -05:00
Thomas Arendsen Hein
49220695bc Removed trailing whitespace and tabs from python files 2007-06-06 20:22:52 +02:00
Matt Mackall
6f71aab47d Merge with stable 2007-04-26 18:41:18 -05:00
Matt Mackall
584e6c9643 hg serve: don't do DNS lookups 2007-04-25 13:35:18 -05:00
Alexis S. L. Carvalho
4bb1d039c5 Merge with crew-stable. 2007-03-19 19:16:35 -03:00
Alexis S. L. Carvalho
b2ef464fc4 avoid wsgiapplication <-> MercurialHTTPServer circular reference 2007-03-19 19:07:38 -03:00
Alexis S. L. Carvalho
93eb041452 Merge with crew-stable 2007-03-04 09:03:21 -03:00
Patrick Mezard
c887e90ae6 web/server: disable address reuse option for BaseHTTPServer on windows
On windows, a socket with the SO_REUSEADDR option set is able to bind to
any port, even if there's already an active socket listening on it.

test-http: check server address cannot be reused.
2007-02-19 10:08:59 +01:00
Alexis S. L. Carvalho
f3a8f26178 hgweb/server.py: use hg.repository to create a repo object 2007-02-15 08:49:20 -02:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
b169322734 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.
2007-02-13 10:01:44 -02:00
Alexis S. L. Carvalho
744364abd4 merge with crew-stable 2007-02-13 10:25:45 -02:00
Thomas Arendsen Hein
46055c07ca sync with -stable 2007-01-02 22:40:52 +01:00
Thomas Arendsen Hein
742fac2ea2 Handle exceptions in do_hgweb: Send "Internal Server Error", log traceback 2007-01-02 22:12:38 +01:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Brendan Cully
eed329d895 Fix hg serve -6 getsockname handling 2006-12-08 17:10:40 -08:00
Thomas Arendsen Hein
411d64ce3e white space and line break cleanups 2006-11-17 08:06:54 +01:00
Matt Mackall
d23c8e6356 hgweb: internalize some socket details 2006-11-13 13:26:57 -06:00
Brendan Cully
7722a4de37 hgweb: support for generating and parsing NWI URLs 2006-10-04 17:04:40 -07:00
Benoit Boissinot
5d5586c52d hgweb: fix errors spotted by pychecker 2006-09-18 17:32:28 +02:00
Thomas Arendsen Hein
3bf23a7d35 If local repository is missing, make error message clearer.
Faheem Mitha suggested finding a better error message.
The nice error message is taken from cogito.
2006-09-11 10:08:30 +02:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Brendan Cully
dd9b6af1b4 Make hgweb threads into daemon threads.
This fixes the problem that an interrupted hg serve will not terminate
until the next request has been received.
2006-07-20 21:58:25 -07:00
Vadim Gelfer
e0b0ae3431 clean up trailing white space. 2006-07-12 08:28:00 -07:00
Alexis S. L. Carvalho
39d9875f38 Respect "Connection: close" headers sent by HTTP clients.
A HTTP client can indicate that it doesn't support (or doesn't want)
persistent connections by sending this header.

This not only makes the server more compliant with the RFC, but also
reduces the run time of test-http-proxy when run with python 2.3 from
~125s to ~5s (it doesn't affect it with python 2.4, which was already
~5s).
2006-07-07 14:33:51 -03:00
Eric Hopper
8ac8a46249 Put support for persistent connections back in. 2006-06-27 00:09:37 -07:00
Eric Hopper
000dcf2978 Fix two small bugs that would've prevented the web interface and IPv6
from working.
2006-06-27 00:09:35 -07:00
Eric Hopper
4498f60ff4 This patch make several WSGI related alterations.
First, it changes the server to be almost a generic WSGI server.

Second, it changes request.py to have wsgiapplication and
_wsgirequest.  wsgiapplication is a class that creates _wsgirequests
when called by a WSGI compliant server.  It needs to know whether
or not it should create hgwebdir or hgweb requests.

Lastly, wsgicgi.py is added, and the CGI scripts are altered to
use it to launch wsgiapplications in a WSGI compliant way.

As a side effect, all the keepalive code has been removed from
request.py.  This code needs to be moved so that it is exclusively
in server.py
2006-06-27 00:09:33 -07:00
Eric Hopper
a0494b3aa0 Fix server to set up a more WSGI compliant environment. 2006-06-27 00:09:31 -07:00
Vadim Gelfer
a6efe6d9e6 http server: support persistent connections.
only "hg serve" affected yet.  http server running cgi script will not
use persistent connections.  support for fastcgi will help that.

clients that support keepalive can use one tcp connection for all
commands during clone and pull.  this makes latency of binary search
during pull much lower over wan.

if server does not know content-length, it will force connection to
close at end.  right fix is to use chunked transfer-encoding but this is
easier and does not hurt performance. only command that is affected is
"changegroup" which is always last command during a pull.
2006-06-15 12:55:58 -07:00
Thomas Arendsen Hein
494ca88023 Fixed 'hg serve --webdir-conf foo' which broke due to split of hgweb. 2006-06-05 16:48:24 +02:00
Eric Hopper
1d1293da03 Adjusting hgweb splitup to be a little cleaner. 2006-06-02 08:25:02 -07:00
Eric Hopper
c6fcaec078 Fixing up comment headers for split up code. 2006-06-02 08:05:01 -07:00
Eric Hopper
20797956ec Splitting up hgweb so it's easier to change. 2006-05-31 08:03:29 -07:00