Dirkjan Ochtman
64bb18f0dd
cleanups: undefined variables
2010-06-08 09:30:45 +02:00
Matt Mackall
bb539b800d
templater: drop \ when handling escaped {
2010-04-05 15:25:08 -05:00
Matt Mackall
d5c8978fe3
templater: strip whitespace inside template methods
2010-04-05 15:25:08 -05:00
Matt Mackall
0c19c19e10
templater: drop raw method
2010-04-05 15:25:08 -05:00
Matt Mackall
484c6d04d0
templater: raise nested functions
2010-04-05 15:25:08 -05:00
Matt Mackall
92fd5b132b
templater: use recursive flattening
...
This avoids slow list operations compared to the iterative version
2010-04-05 15:25:08 -05:00
Matt Mackall
7e256edce5
templater: cache self.defaults.get
2010-04-05 15:25:08 -05:00
Matt Mackall
39b48fa1ce
templater: privatize class variables
2010-04-05 15:25:08 -05:00
Matt Mackall
8d0693deb8
templater: map -> mapping
2010-04-05 15:25:08 -05:00
Matt Mackall
7834a75f92
templater: extend preparsing
...
preparse filters and formats and supply functions to apply
2010-04-05 15:25:08 -05:00
Matt Mackall
cefead81fd
templater: preparse templates and cache
...
This breaks templates down into a list of literal and {} groups, with
group types preidentified.
2010-04-05 15:25:08 -05:00
Matt Mackall
7455c67fcd
templater: directly parse templates, no regexes
2010-04-05 14:33:41 -05:00
Benoit Boissinot
4371f512b2
fix spaces/identation issues
2010-02-05 18:50:08 +01:00
Matt Mackall
8d99be19f0
many, many trivial check-code fixups
2010-01-25 00:05:27 -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
Dirkjan Ochtman
c93b170e46
hgweb: don't choke when an inexistent style is requested (issue1901)
2009-11-12 16:39:11 +01:00
Dirkjan Ochtman
2f2b5e0e4f
templater: remove support for ## template variables
2009-08-20 10:41:56 +02:00
Patrick Mezard
f32df1c921
Make {file_copies} usable as a --template key
...
Before this, to display file copies in templates, you had to write something
like {file_copies%filecopy}. For some reason, the {file_copy} subtemplate was
used by default but not defined by default in changeset_templater, while styles
were already using it. Here we define {file_copy} in changeset_templater, and
change the templater to handle formatting strings like {file_copies%filecopy}
with already expanded keys (in this case {file_copies}), for backward
compatibility.
2009-12-13 18:06:24 +01:00
Martin Geisler
e651951731
templater: lowercase error message
...
Changing this messages should be safe: automated scripts ought to have
debugged their templates and wont grep for this error message.
2009-05-17 16:25:48 +02:00
Matt Mackall
cfe14089d0
templater: replace eval with closure
2009-05-17 18:17:04 -05:00
Dirkjan Ochtman
140e5350fc
templater: keep a cache of Python functions for filter expressions
2009-05-17 16:08:47 +02:00
Dirkjan Ochtman
56f023f70e
templater: replace regex complexity by simple str containment checks
2009-05-17 16:06:48 +02:00
Dirkjan Ochtman
f421494a6a
templater: clean up the process method, separating code paths
2009-05-17 16:05:50 +02:00
Dirkjan Ochtman
43d9564cff
some modernization cleanups, forward compatibility
2009-05-13 14:08:39 +02:00
Dirkjan Ochtman
6f7f8e3dec
templater: make the templating engine pluggable to some extent
2009-05-12 12:05:19 +02:00
Dirkjan Ochtman
5c6c43b746
templater: provide the standard template filters by default
2009-05-12 12:04:05 +02:00
Simon Heimberg
09ac1e6c92
separate import lines from mercurial and general python modules
2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad
updated license to be explicit about GPL version 2
2009-04-26 01:08:54 +02:00
Dirkjan Ochtman
6bfc24b2af
templater: fix little problem from stylemap() changes
2009-04-27 16:26:31 +02:00
Dirkjan Ochtman
388d357896
templater: separate template management and actual string processing
2009-04-06 15:09:54 +02:00
Matt Mackall
86dab18ddb
config: getsource -> source
2009-04-26 16:50:43 -05:00
Matt Mackall
581beec905
templater: use new config parser
...
This gives us the ability to use includes and continuations
2009-04-26 16:50:43 -05:00
Dirkjan Ochtman
23935afdfe
templatefilters: strings are iterators, but shouldn't be joined anyway
2009-04-06 16:26:57 +02:00
Dirkjan Ochtman
0b1a57839b
templater: move stylemap function from hgweb to templater
2009-04-04 17:46:11 +02:00
Dirkjan Ochtman
d963dd0023
kill some trailing spaces
2008-11-27 16:07:13 +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
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
b79ad5315b
templater: make a template a string-only iterator
2008-06-29 13:16:25 +02:00
Matt Mackall
1cca88367c
hgweb: minor improvements for new web style
...
- make renamelink take a context
- pass current node to shortlog page rather than tip
- pass user/desc/date/rename to filediff
- improve template error reporting for foo%bar
2008-03-31 21:49:33 -05:00
Dirkjan Ochtman
c9f3b5991c
give better error message on non-existent mapfile (issue813)
2008-03-21 12:05:01 +01:00
Matt Mackall
41e5c79455
templates: move filters to their own module
...
This eliminates just about all Mercurial dependencies in templater.py
2008-01-31 14:44:19 -06:00
Matt Mackall
a849fab9e4
templater: move email function to util
2008-01-31 14:44:19 -06:00
Matt Mackall
7b0d46c8cd
templater: remove node import
2008-01-31 14:44:19 -06:00
Christian Ebert
5c18a69d2e
Prefer i in d over d.has_key(i)
2008-01-20 14:39:25 +01:00
Robert Bachmann
ecb337b8cb
Added support for the Atom syndication format
2007-08-30 16:42:17 +02:00
Alexis S. L. Carvalho
f9b8c79d22
hgweb: use lrwxrwxrwx as the permissions of a symlink
2007-07-03 03:06:40 -03:00
Matt Mackall
e293a4cd6d
Merge with stable
2007-04-10 14:05:15 -05:00
TK Soh
424b1a050d
minor typo fix in templater's docstring
2007-04-10 12:24:28 -05:00
Alexis S. L. Carvalho
d725a42fd8
merge with crew-stable
2006-12-16 02:51:16 -02:00