Commit Graph

118 Commits

Author SHA1 Message Date
Matt Mackall
067d110f29 hgweb: web.encoding should override encoding.encoding (issue1183) 2009-06-20 13:00:25 -05:00
Martin Geisler
3f7c86dc69 wrap string literals in error messages 2009-05-31 01:30:16 +02:00
Dirkjan Ochtman
e4b1a0608c hgweb: extract config values after reading webdir-config 2009-05-26 10:16:17 +02:00
Patrick Mezard
89b691f7f6 Merge with crew-stable 2009-05-21 22:41:18 +02:00
Patrick Mezard
1e0e3ba6d6 hgwebdir: fix [collections] evaluation under Windows
Virtual and real path separators are not the same under Windows.
2009-05-21 20:32:45 +02:00
Jeremy Whitlock
c090150d2d hgweb: make hgwebdir handle dict/list paths the same as config paths
Before this patch, the only way to get hgwebdir to honor the recursive paths
was to create a config object or a config file with the recursive paths in it.
This patch makes hgwebdir treat paths the same whether passed in as a list,
tuple, config or however hgwebdir supports passing paths.
2009-05-20 16:04:37 +02:00
Peter Arrenbrecht
3d9bf2f616 indentation cleanup 2009-05-14 15:24:36 +02:00
Bryan O'Sullivan
1674afb927 hgwebdir: refresh configuration periodically
The old default behaviour of hgwebdir was to maintain a list of
repositories permanently. This interacted badly with persistent
application hosting software such as WSGI containers.  If a new repository
was published, it would potentially never appear in the top-level list
of repositories.

This change causes the hgwebdir configuration and list of repositories
served to be refreshed periodically (at most every 20 seconds).
2009-05-13 13:30:28 -07:00
Dirkjan Ochtman
5c6c43b746 templater: provide the standard template filters by default 2009-05-12 12:04:05 +02:00
Dirkjan Ochtman
d939b28808 hgweb: trust config file passed into hgwebdir
Before this patch, hgwebdir suddenly showed up empty for a webdir-conf file
that was for some reason not trusted. This was previously not a problem because
the trust mechanism wasn't required for the very separate webdir-conf.
2009-05-12 10:57:55 +02:00
Dirkjan Ochtman
1c646f503a hgweb: get rid of inaccurate hgwebdir.repos_sorted, localize machinery 2009-05-11 14:19:49 +02:00
Alexander Solovyov
038c7df455 hgwebdir: read --webdir-conf as actual configuration to ui (issue1586)
This cleans up code and allows specification of values more globally. For
example, it's now possible to specify web.contact in webdir-conf for all
repositories without a specified contact set.
2009-05-11 14:20:18 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
bfe35438ae hgweb: use new sessionvars code in hgwebdir, too 2009-04-27 11:37:30 +02:00
Dirkjan Ochtman
dc1e18ddad hgweb: some cleanups in hgwebdir, remove double defaults
Removed obsolete command, expose useful cleannames function.
2009-04-27 11:37:08 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Matt Mackall
ba8099cfb8 hgweb: kill parentui references 2009-04-26 16:50:43 -05:00
Matt Mackall
be7d59ab85 ui: kill most users of parentui name and arg, replace with .copy() 2009-04-26 16:50:43 -05:00
Matt Mackall
8034ce6ca9 hgweb: use config.config 2009-04-26 16:50:43 -05:00
Matt Mackall
ebffe5ccb8 ui: refactor option setting
No more passing options as constructor keywords. Basic options are now
always stored in the overlay for simplicity and consistency.
2009-04-23 15:40:10 -05:00
Dirkjan Ochtman
0b1a57839b templater: move stylemap function from hgweb to templater 2009-04-04 17:46:11 +02:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Dirkjan Ochtman
b2c394e625 hgweb: pass ErrorResponses directly into req.respond() 2009-02-09 11:29:09 +01:00
Matt Mackall
e0735a1762 error: move repo errors
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Dirkjan Ochtman
e91c670197 hgweb: fix long line lengths introduced in 9c98746d7c2b 2009-01-03 21:44:15 +01:00
Patrick Mezard
b49af937a1 hgwebdir_mod: fix a performance issue with static files 2009-01-03 01:00:46 +01:00
Benoit Allard
6edf6273f0 hgweb: recurse down collections only if ** in [paths]
collections: direct child repos only
paths *: direct child repos only (like collections)
paths **: recursive discovery

When ** is used, the mq repository (if any) is also shown.
2008-12-18 22:32:48 +01:00
Patrick Mezard
9b8cb99ec1 hgweb: extend [paths] syntax to match repositories recursively (issue852)
This feature somehow duplicates [collections] but it is simpler to use and has
less issues under Windows where using absolute path as configuration file key
is not supported.

Suggested by Dirkjan Ochtman <dirkjan@ochtman.nl>
2008-12-01 14:20:20 +01:00
Brendan Cully
f4cee1477f templater: return data in increasing chunk sizes
Currently hgweb is not streaming its output -- it accumulates the
entire response before sending it. This patch restores streaming
behaviour. To avoid having to synchronously write many tiny fragments,
this patch also adds buffering to the template generator. Local
testing of a fetch of a 100,000 line file with wget produces a slight
slowdown overall (up from 6.5 seconds to 7.2 seconds), but instead of
waiting 6 seconds for headers to arrive, output begins immediately.
2008-11-21 15:51:40 -08:00
Matt Mackall
076f93ace1 hgweb: Change default style to paper 2008-11-06 11:56:01 -06:00
Mark Edgington
bf5852441b hgweb: support for deny_read/allow_read options
reimplementation of a patch provided by Nilton Volpato.

Folded into a single patch by Thomas Arendsen Hein.
2008-10-31 15:28:06 +01:00
Martin Geisler
da335e4675 i18n: import _ instead of gettext 2008-10-21 17:47:49 +02: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
Dirkjan Ochtman
0c1845ffb9 hgweb: return content iterator instead of using write() callable
This is a new version of b6b16fec2a60 (which was backed out in faf83e1e40f5),
with an extra line removed to fix problems with hg serve. hg's internal web
server contains checking if the app isn't trying to write more bytes than
specified by the Content-Length header. The first try still contained an old
line that wrote the response, so the response was sent twice.
2008-08-30 17:13:23 +02:00
Martin Geisler
8c1d48c66f move % out of translatable strings
The translators need to see the raw format string, not the result of
using the format string.
2008-08-16 14:46:56 +02:00
Thomas Arendsen Hein
eeaee65118 Do not sort hgwebdir repositories if python list or tuple is given.
This was introduced by changeset 76e2de4eb18e (util: add sort helper)
2008-08-19 18:17:11 +02:00
Dirkjan Ochtman
1599d4d765 merge another backout 2008-07-02 12:27:57 +02:00
Dirkjan Ochtman
0bf39aa189 Backed out changeset b6b16fec2a60 (incorrect Content-Length on Windows) 2008-07-02 12:02:33 +02:00
Dirkjan Ochtman
35c3380f04 hgweb: return content iterator instead of using write() callable 2008-06-29 22:36:18 +02:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Dirkjan Ochtman
67493fd86d Merge from crew-stable. 2008-04-03 13:21:42 +02:00
Dirkjan Ochtman
95639b6467 hgweb: make hgwebdir work in the absence of PATH_INFO
Thanks to Andrea Arcangeli for reporting and an initial patch.
2008-04-03 13:14:43 +02:00
Dirkjan Ochtman
9731167667 Backed out changeset a3eeb13e3d5c (temporary template compatibility) 2008-03-24 18:18:39 +01:00
Alexis S. L. Carvalho
506e114776 hgweb: add compatibility code for old templates
Up to changeset 6713db859c82, HTTP headers were expected to be embedded
in the "headers" template.  Since that changeset, the content-type is
supposed to be defined as the "mimetype" template in the map file.

This changeset makes sure the old templates still work.
2008-03-24 13:45:01 -03:00
Thomas Arendsen Hein
8064adc9b8 Spacing cleanup 2008-03-16 23:24:53 +01:00
Eric Hopper
0a50218866 Allow hgwebdir collections to follow symlinks. 2008-03-15 12:42:34 -07:00
Brendan Cully
e1863ee903 Support web.baseurl in hgwebdir, overriding SCRIPT_NAME 2008-03-08 17:19:18 -08:00
Joel Rosdahl
c26213193c Avoid importing mercurial.node/mercurial.repo stuff from mercurial.hg 2008-03-06 22:51:16 +01:00
Thomas Arendsen Hein
deb94bc7fe Removed trailing spaces from everything except test output 2008-03-07 00:24:36 +01:00
Michele Cella
d5755b1f51 fix to let test-hgwebdir pass
fixes a regression introduced in changeset 3c6008c8685a
2008-02-08 15:42:28 +01:00