Mads Kiilerich
e4f8deae3f
hgweb: simplify internal staticfile return codes
2013-02-10 18:24:29 +01:00
Mads Kiilerich
202753eeb5
hgweb: pass the actual response body to request.response, not just the length
...
This makes it less likely to send a response that doesn't match Content-Length.
2013-01-15 01:07:03 +01:00
Yuya Nishihara
ee6b575238
hgweb: respond 403 forbidden for ssl required error
...
It's preferable to report "ssl required" as an error, so that the client
can detect error and exit with 255. Currently hg exits with 1, which is
"nothing to push."
2012-09-05 23:59:27 +09:00
Brodie Rao
92158e04de
cleanup: "raise SomeException()" -> "raise SomeException"
2012-05-12 16:00:58 +02:00
Martin Geisler
e57b3a9f70
hgweb: initialize permhooks at definition time
...
This is simpler than creating it empty and then appending the default
checkauthz hook 50 lines below.
2011-04-30 13:47:22 +02:00
Martin Geisler
5a3f4fec03
merge with stable
2011-04-19 15:19:54 +02:00
Martin Geisler
6cd55d2029
hgweb: detect change based on changelog size too
...
Before, there was a race between an access and a modification made
within the same second.
2011-04-19 15:15:56 +02:00
Mads Kiilerich
4a3ec69835
hgweb: give ErrorResponse a descriptive string/Exception representation
...
Very handy if the exception should appear in output.
2011-02-21 00:52:26 +01:00
Dan Villiom Podlaski Christiansen
ec590d5cd4
explicitly close files
...
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
2010-12-24 15:23:01 +01:00
Dirkjan Ochtman
fcd515c23a
hgweb: support very simple caching model (issue1845)
2010-09-08 15:23:48 +02:00
Matt Mackall
cc6de8544b
hgweb: drop use of super() for Exception base class
...
In Python 2.4, Exception is an old-style class and doesn't work with super.
2011-03-14 15:28:56 -05:00
Dirkjan Ochtman
0af26a9d11
don't depend on features of Exception as much
...
BaseException.message has been deprecated, so we try to not rely on it.
2011-03-12 15:51:39 +01:00
Augie Fackler
c986a6137a
hgweb: add support for 100-continue as recommended by PEP 333.
2010-02-06 04:27:28 -06:00
Matt Mackall
cd3ef170f7
Merge with stable
2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424
Update license to GPLv2+
2010-01-19 22:20:08 -06:00
Sune Foldager
ee001cdc90
hgweb: send proper error messages to the client
...
Fixes a bug in protocol which caused an exception during exception handling in
some cases on Windows. Also makes sure the server error message is correctly
propagated to the client, instead of being thrown away.
2009-11-02 10:20:04 +01:00
Alejandro Santos
77d606ac51
compat: use open() instead of file() everywhere
2009-07-05 11:01:30 +02:00
timeless
fb33de67af
Generally replace "file name" with "filename" in help and comments.
2009-06-09 09:25:17 -04:00
Brendan Cully
5779dfb1e0
hgweb: Make get_mtime use repository to find store path.
...
It was calculating it directly, which is redundant and caused
it to break with shared repositories.
2009-12-15 12:33:04 -08:00
Sune Foldager
69c1e615e4
hgweb: add support for extension-provided permission hooks
...
This allows extensions to hook into permission checking, providing both
authentication and authorization as needed. The existing authorization
function has been changed to a hook, which is added by default.
2009-11-23 11:03:55 +01:00
Martin Geisler
750183bdad
updated license to be explicit about GPL version 2
2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
0b1a57839b
templater: move stylemap function from hgweb to templater
2009-04-04 17:46:11 +02:00
Sune Foldager
190a26b26d
hgweb: support custom http headers in ErrorResponse
2009-02-09 11:31:52 +01:00
Dirkjan Ochtman
5e743c6696
hgweb: move the diffs() generator into webutil
2008-11-03 20:41:48 +01:00
Brendan Cully
03a69e59f7
Allow per-file shadowing of static directory in templatepath
2008-10-28 22:24:17 -07:00
Brendan Cully
34868ca5be
Allow hgweb to search for templates in more than one path.
...
This patch is constructed to make it easy for external extensions to
provide their own templates, by updating templater.path.
2008-10-17 11:34:31 -07:00
Rocco Rutte
f70a5a0f4e
hgweb: Respond with HTTP 403 for disabled archive types instead of 404
...
This makes it easier for clients/users to distinct between supported
but disabled and unsupported archive types.
2008-09-05 17:28:37 +02:00
Dirkjan Ochtman
b3dea85ba6
hgweb: raise ErrorResponses to communicate protocol errors
2008-07-22 18:23:20 +02:00
Dirkjan Ochtman
793235765f
hgweb: generate error message only if nothing is passed
2008-07-22 18:21:37 +02:00
Thomas Arendsen Hein
ad12af151f
merged Edward Lee's line anchors patch
2008-02-15 19:44:54 +01:00
Edward Lee
9f8402d3c0
Add line anchors to annotate, changeset, diff, file views for hgweb
2007-09-04 22:25:37 -05:00
Dirkjan Ochtman
3d668210f2
hgweb: explicit response status
2008-02-01 10:31:13 +01:00
Dirkjan Ochtman
4ea6b6bcae
send conservatively capitalized HTTP headers
2008-01-23 14:28:25 +01:00
Thomas Arendsen Hein
1566cda979
Don't let ui.username override web.contact (issue900)
...
63beab327d26 introduced using ui.username before web.contact, but this was
never documented and might cause commit accidents.
- Drop web.author (deprecated since 2005)
- Try ui.username or $EMAIL as a fallback to display something useful.
- Update docs for the fallbacks.
2008-01-01 17:07:15 +01:00
Thomas Arendsen Hein
347da85c36
Removed tabs and trailing whitespace in python files
2007-12-29 19:49:48 +01:00
Bryan O'Sullivan
9ae1a2c354
hgweb: fix breaking tests on Python < 2.5
2007-11-28 09:39:17 -08:00
Bryan O'Sullivan
e19dabc11f
hgweb: return meaningful HTTP status codes instead of nonsense
2007-11-28 08:38:42 -08:00
Thomas Arendsen Hein
3005b8655d
hgweb: use generator to count parity of horizontal stripes for easier reading.
...
- use web.stripes in all places and consistently
- start with parity0 for lists generated in reverse (e.g. changelog)
2007-05-29 16:42:05 +02:00
Alexis S. L. Carvalho
678568081f
Don't use ints in HTTP headers
2007-01-18 22:16:26 -02:00
Matt Mackall
f17a4e1934
Replace demandload with new demandimport
2006-12-13 13:27:09 -06:00
Benoit Boissinot
e005ffc8c4
switch to the .hg/store layout, fix the tests
2006-12-01 13:34:09 +01: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
Wojciech Milkowski
8785ba977a
Fix static file serving over HTTP on Windows.
...
Files to be served should be opened in binary mode.
2006-10-04 18:06:03 +02:00
Vadim Gelfer
dc377b58c1
update copyrights.
2006-08-12 12:30:02 -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
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