Commit Graph

1004 Commits

Author SHA1 Message Date
Brendan Cully
28bde50134 hgweb: use filectx.annotate instead of filelog 2006-09-27 09:10:28 -07:00
Benoit Boissinot
2caa3e642d fix warnings spotted by pychecker 2006-09-18 17:43:31 +02: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
Thomas Arendsen Hein
645ecf61cd Fix hgweb's patch display in changeset view. 2006-08-18 13:06:38 +02:00
Matt Mackall
6ecbc46d1a Move ui.diffopts to patch.diffopts where it belongs 2006-08-15 11:34:08 -05:00
Giorgos Keramidas
95e3cba367 hgweb: repo.changes() is now called repo.status() 2006-08-13 18:01:44 +03:00
Vadim Gelfer
13d751feaf refactor text diff/patch code.
rename commands.dodiff to patch.diff.
rename commands.doexport to patch.export.
move some functions from commands to new mercurial.cmdutil module.
turn list of diff options into mdiff.diffopts class.

patch.diff and patch.export now has clean api for call from 3rd party
python code.
2006-08-12 16:13:27 -07:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Alexis S. L. Carvalho
219803f060 Fix some bugs introduced during the manifest refactoring 2006-08-12 08:53:23 -03:00
Matt Mackall
44b96c96eb Change remaining users of manifest flags 2006-08-11 10:57:42 -05:00
Benoit Boissinot
56e758020e merge gitweb with crew 2006-07-27 02:37:04 +02:00
Vadim Gelfer
0778999161 hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
all repository classes now have url() method that returns url of repo.
2006-07-25 13:50:32 -07:00
Josef "Jeff" Sipek
5d12a047d0 [hgweb] Implemented shortlog (gitweb templates only) 2006-07-24 20:56:30 -04:00
Josef "Jeff" Sipek
c45ef63c97 [hgweb] Fixed up gitweb templates
Now the gitweb templates have archive links
2006-07-24 20:10:04 -04:00
Frank Kingswood
b817bf8839 hgweb: Configurable zebra stripes
With this change, you can set
    [web]
    stripes=3
to get stripes every three lines (a-la fanfold paper), instead of every
line on source and directory listings. The default behaviour is stripes=1
which generates output similar to current, and you can also turn stripes
off by setting it to 0.
2006-07-24 23:06:05 -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
a7bbf7d88f rename stream hgrc option to compressed. 2006-07-16 10:04:16 -07:00
Vadim Gelfer
f7b6882acb clone: disable stream support on server side by default.
enable in hgrc like this:
[server]
stream=True
2006-07-15 16:06:35 -07:00
Vadim Gelfer
9ea4436262 add support for streaming clone.
existing clone code uses pull to get changes from remote repo.  is very
slow, uses lots of memory and cpu.

new clone code has server write file data straight to client, client
writes file data straight to disk.  memory and cpu used are very low,
clone is much faster over lan.

new client can still clone with pull, can still clone from older servers.
new server can still serve older clients.
2006-07-14 11:17:22 -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
Haakon Riiser
7b06333d1a diff: add -b/-B options 2006-06-29 15:16:25 +02:00
Benoit Boissinot
7dd019b60b use __contains__, index or split instead of str.find
str.find return -1 when the substring is not found, -1 evaluate
to True and is a valid index, which can lead to bugs.
Using alternatives when possible makes the code clearer and less
prone to bugs. (and __contains__ is faster in microbenchmarks)
2006-07-09 01:30:30 +02:00
Alexis S. L. Carvalho
741f652c36 hgweb: fix unbundle.
After the WSGI changes, even if a push over HTTP succeeds, apache
complains about "Premature end of script headers: hgwebdir.cgi" and
returns a "HTTP Error 500: Internal Server Error", making the local hg
abort.

The change to either of the files touched by this patch is enough to fix
this, but I think changing both is a more robust solution.
2006-07-03 00:33:19 -03:00
Eric Hopper
7011a8d5a5 Cleanup hgweb and hgwebdir's run method a bit. 2006-06-30 09:50:25 -07:00
Eric Hopper
39248f1205 Fix hgwebdir to run hgweb using run_wsgi. 2006-06-30 08:47:41 -07:00
Eric Hopper
cbbc59972c Arrange for old copies of CGI scripts to still work. 2006-06-29 19:06:18 -07:00
Eric Hopper
f4e85c5507 Fix raw files in the web UI. 2006-06-29 18:34:26 -07:00
Eric Hopper
a557f02a71 Really fix http headers for web UI and issue 254.
This also arranges for static content to allow a keepalive connection.
2006-06-27 09:33:12 -07:00
Vadim Gelfer
26b73700a8 merge with wsgi changes. 2006-06-27 00:10:41 -07: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
Thomas Arendsen Hein
58e95b6ac7 Make "[web] allow_push, deny_push" and "[http_proxy] no" use ui.configlist. 2006-06-26 16:47:24 +02:00
Thomas Arendsen Hein
b1e9507c44 Fixed [web] allow_archive for comma separated parameters by using ui.configlist.
Changed tests/test-archive to use allow_archive instead of the deprecated
allowzip, allowgz and allowbz2.
2006-06-26 14:56:14 +02:00
Vadim Gelfer
9420a748d4 push over http: server side authorization support.
new hgrc entries allow_push, deny_push, push_ssl control push over http.

allow_push list controls push.  if empty or not set, no user can push.
if "*", any user (incl. unauthenticated user) can push.  if list of user
names, only authenticated users in list can push.

deny_push list examined before allow_push.  if "*", no user can push.
if list of user names, no unauthenticated user can push, and no users
in list can push.

push_ssl requires https connection for push.  default is true, so password
sniffing can not be done.
2006-06-20 15:23:01 -07:00
Vadim Gelfer
6086f69eb4 push over http: server support.
write "unbundle" verb for http.
2006-06-20 15:16:50 -07:00
Vadim Gelfer
f739175f8c http: query server for capabilities 2006-06-15 17:07:30 -07:00
Vadim Gelfer
b0f5563c91 hgweb: split "verbs" into methods. 2006-06-15 13:27:57 -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
Benoit Boissinot
e0e1e090fa hgweb: fix errors and warnings found by pychecker
- fix missing import
- use type_ instead of type
- remove unused variable
2006-06-04 12:19:51 +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
Thomas Arendsen Hein
e4abeb4452 Fix automatic decompression of tarballs with Firefox.
The encoding was set to gzip/bzip2, so Firefox (correctly) assumed, that this
has to be "decoded" (i.e. decompressed).
2006-06-01 18:36:32 +02:00
TK Soh
63cd05485f hgweb: fix tracebacks on both index and repo pages 2006-06-01 09:14:27 -05:00
Thomas Arendsen Hein
28d5a5ad5d Allow comma to separate types in allow_archive, too. Use longer variable name. 2006-06-01 17:51:40 +02:00
TK Soh
633f958ebe hgweb: add allow_archive support to [web] section of hgrc 2006-06-01 10:02:24 -05: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