Commit Graph

266 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
01e8022cb1 hgweb: Apply the new method of passing session variables to links. 2006-10-11 22:01:24 +02:00
Thomas Arendsen Hein
0a1b56c636 hgweb: Keep session variables (currently only style) in HTML forms, too.
Adjusted default and gitweb template for this.
2006-10-11 20:59:37 +02:00
Brendan Cully
0504e469fe hgweb: trap lookup errors 2006-10-11 16:56:41 -07:00
Brendan Cully
2c17d58455 Add better error message for bad commands 2006-10-11 16:50:17 -07:00
Brendan Cully
79084fa005 gitweb: fix last change field in summary 2006-10-11 16:32:06 -07:00
Brendan Cully
d91d2a7969 hgweb: globally default to tip if no revision is specified 2006-10-11 11:30:59 -07:00
Brendan Cully
951d20240e NWI base URL detection fixes 2006-10-10 10:28:20 -07:00
Matt Mackall
7f2b842075 hgweb: add file sizes to manifest browsing 2006-10-10 00:07:46 -05:00
Matt Mackall
37abb9909c hgweb: remove obsolete listfiles function 2006-10-09 23:46:05 -05:00
Thomas Arendsen Hein
2ee8d98180 hgweb: Search templates in templatepath/style/map, too, using a common function.
This allows for web templates to be self-contained in a directory, which makes
copying and modifying them easier.
2006-10-06 18:28:50 +02:00
Brendan Cully
7c7a163df2 hgweb: be more conservative about expanding SCRIPT_NAME 2006-10-05 15:36:53 -07:00
Brendan Cully
3bd24cf35e hgweb: fix NWI parsing when hgwebdir isn't at / 2006-10-05 14:45:15 -07:00
Brendan Cully
b9613f325a hgweb: provide means for handling query parameters 2006-10-05 14:27:14 -07:00
Thomas Arendsen Hein
44070a89f6 hgweb: Added safety net for PATH_INFO starting with double slash.
This happens e.g. when using the following apache config:
  RewriteRule (.*) /hgwebdir/$1 [PT]
instead of the less readable (but more correct):
  RewriteRule (.*) /hgwebdir$1 [PT]
2006-10-05 11:57:38 +02:00
Brendan Cully
7722a4de37 hgweb: support for generating and parsing NWI URLs 2006-10-04 17:04:40 -07:00
Brendan Cully
8c204fda3d hgweb: extract raw prefix from NWI commands 2006-10-04 17:04:40 -07:00
Brendan Cully
8e67b8f4bf hgweb: accept NewWebInterface URLs 2006-10-04 17:04:40 -07:00
Benoit Boissinot
b58f394b3c fix warnings from pychecker 2006-10-02 21:10:31 +02:00
Brendan Cully
390726ea06 hgweb: add methods to get contexts from request 2006-10-01 12:56:58 -07:00
Brendan Cully
85dff9928e hgweb: use contexts in more handlers 2006-09-30 21:32:29 -07:00
Brendan Cully
c97293d3eb hgweb: teach siblings and callers to use contexts 2006-09-29 16:26:09 -07:00
Brendan Cully
768e7d3ebd hgweb: kill off #filenode# 2006-09-29 16:26:09 -07:00
Brendan Cully
ebabaa1a54 hgweb: kill #manifest# 2006-09-29 16:26:09 -07:00
Brendan Cully
2bba3f27c5 gitweb: cosmetic fixes.
Fix the padding around the changelog description.
Alternate row colours for the changeset file list.
2006-09-27 12:08:33 -07:00
Brendan Cully
96206c5322 hgweb: yield filenode as well as node in annotate, use filenode in annotateline 2006-09-27 12:08:32 -07:00
Brendan Cully
bdb9096ffa hgweb: fix changeset link in annotate view. 2006-09-27 12:08:30 -07:00
Brendan Cully
96b5443293 hgweb: make annotate line revisions point to annotation for that rev 2006-09-27 09:10:31 -07:00
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
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
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
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
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
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
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
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
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
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