Commit Graph

44 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov 56c2b61458 Merge with original r2905 2013-07-18 19:13:28 +04:00
vfilippov f3ba9d5e0a Bug 63447 - Single sign-on for ViewVC
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@861 6955db30-a419-402b-8a0d-67ecbb4d7f56
2013-07-18 17:06:56 +04:00
cmpilato 6fe390a642 Move a customization out of ezt.py to eliminate unnecessary deltas
against the upstream version of this module.

* lib/common.py
  (TemplateData): Moved here...

* lib/ezt.py
  ...from here.

* lib/query.py,
* lib/viewvc.py
  Import 'TemplateData' from 'common' now, and update references to this
  relocated class.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2711 8cb11bc2-c004-0410-86c3-e597b4017df7
2012-01-04 15:35:12 +00:00
cmpilato b07b83d252 Teach the EZT library to handle nested [format] blocks rather than its
current only-use-the-most-recently-noticed formatter approach.

* lib/ezt.py
  (Template._cmd_format): Rename 'printer' parameter to 'formatter'.
  (_print_formatted): New helper function.
  (_write_value): Now pop/restore the whole stack of formatters, and
    use _print_formatted() to do the real output writing.
  (Context.__init__): Rename 'printers' member to 'formatters'.
    Consumers updated.
  (_raw_formatter, _html_formatter, _uri_formatter): Renamed from
    _raw_printer(), _html_printer(), and _uri_printer() respectively.
    Consumers updated.
  (_xml_formatter): New.
  (_formatters): Renamed from _printers.  Consumers updated.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2376 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-05-20 19:06:11 +00:00
vfilippov 6835e74f20 Merge with ViewVC 1.2-dev http://viewvc.tigris.org/svn/viewvc@2204
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@184 6955db30-a419-402b-8a0d-67ecbb4d7f56
2009-06-16 14:11:20 +00:00
cmpilato 63af297920 Try to make ViewVC provide a consistent, predictable data dictionary
in all of its templated views.  Do this with a custom, dictionary-like
class that prevents the creation of new keys after an initial
instantiation of keys and (possibly dummy) values.

* lib/ezt.py
  (TemplateData): New.

* lib/viewvc.py
  (common_template_data): Now return an ezt.TemplateData() object.
  (make_comma_sep_list_string): New.
  (markup_or_annotate): Use new ezt.TemplateData() interface now.  Use
    make_comma_sep_list_string() where applicable.
  (view_roots, view_log, view_cvsgraph, view_diff, view_revision,
   view_queryform, view_query): Use new ezt.TemplateData() interface now.
  (view_directory): Use new ezt.TemplateData() interface now.  Drop
    'search_re_form' dictionary item.

* lib/query.py
  (main): Use new ezt.TemplateData() interface now.  While here, drop
    'script_name' calculation (it isn't used).

* templates/include/dir_header.ezt
  Display the search form if 'search_re_action' is set, not 'search_re_form'.

* docs/template-authoring-guide.html
  Remove 'search_re_form'.  Update 'search_re_action' description.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2123 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-24 16:55:25 +00:00
cmpilato 586c6bfb9e * lib/ezt.py
(Template._cmd_for): Raise a more useful exception message when the
    to-be-looped-over variable ain't a sequence.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2115 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-19 17:44:07 +00:00
cmpilato ca12b5257c * lib/ezt.py
(Template._cmd_print): Raise a more helpful exception to give some
    clues to template authors who tried to, say, print a sequence
    reference.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2111 8cb11bc2-c004-0410-86c3-e597b4017df7
2009-03-19 15:21:30 +00:00
vfilippov 4e047ae281 bug 44931
s.encode('utf-8') in ezt


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@59 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-11 10:46:42 +00:00
vfilippov 00f38a1b55 utf8string diffs
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@41 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-12-04 15:47:45 +00:00
vfilippov 822ec29624 bug 37020
fucking encodings


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@22 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-14 14:53:48 +00:00
vfilippov f3aa325419 bug 37020
viewvc 1.1.0-beta1 initial commit


git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@4 6955db30-a419-402b-8a0d-67ecbb4d7f56
2008-11-11 14:17:41 +00:00
cmpilato 0dfb93969d Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1590 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-04-10 15:26:36 +00:00
cmpilato 6a03c7a4dd Add a new "uri" format to EZT.
NOTE: This is not currently used in ViewVC.  I needed it in another
piece of software, but wanted the tweaks to be publicly available
somewhere.

* lib/ezt.py
  (FORMAT_URI, _uri_printer): New.
  (_printers): Add mapping for new URI-formatting code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1495 8cb11bc2-c004-0410-86c3-e597b4017df7
2007-01-02 15:39:51 +00:00
rey4 eb5ccaf906 Fix bug intepreting EZT substitution patterns
* lib/ezt.py
  (_write_value): fix logic error from wrong indentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1344 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-04-21 13:27:20 +00:00
rey4 1f416a919f Fix EZT callback implementation so along with being able to write raw data
to the output, callbacks can also write formatted output (controlled by
[format] directives.) EZT now passes Context object arguments to callbacks
instead of file pointers, so more functionality can be exposed to Callbacks
in the future without loss of backwards compatibility.

Also make improvements to implementation of [format] so directives will
take effect in files included through variable references ([include path])
just like files included through string constants ([include "path"]).
And make it possible to specify custom format types (beyond "raw" "html"
"xml") with callbacks and without the need to modify ezt.py.

* lib/ezt.py
  (__doc__): update documentation
  (Template._printers, Template._cmd_print_html, Template._cmd_print_xml):
    remove
  (Template._parse, Template._cmd_format, Template._cmd_end_format, 
   _raw_printer, _html_printer, _printers): update [format] implementation
  (Template.parse): update call to _parse
  (Template.execute): update call to _execute
  (Template.generate, Template._execute, Template._cmd_print,
   Template._cmd_format, Template._cmd_include, Template._cmd_if_any,
   Template._cmd_if_index, Template._cmd_is, Template._do_if,
   Template._cmd_for, Template._cmd_define):
    move file pointer into Context object
  (_write_value): handle callbacks as printers and callbacks that use printers
  (_context, Context): rename _context class to Context and fill out methods
    since object is now exposed outside EZT as an interface for accessing EZT
    functionality from callback functions

* lib/viewcvs.py
  (MarkupPipeWrapper.__call__, MarkupShell.__call__):
    update for new (futureproofed) callback implementation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1252 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-10 04:24:12 +00:00
rey4 ddaebb0f26 Make EZT library support python iterators so you can pass in things like
like generator functions. This patch was attached to issue 201. I am the
author, but credit goes to Greg Stein for valuable feedback which allowed
me to simplify the initial implementation.

* lib/ezt.py
  (Template.generate, Template._cmd_if_index, Template._cmd_for,
   _get_value): replace ctx.for_index member with ctx.for_iterators
  (_Iterator, OldIterator, _iter): new


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1243 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 22:21:47 +00:00
cmpilato 97a07dc88e This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0
Strict.  Changes have been made in the EZT templates, the CSS files,
HTML code embedded in the Python files as well as in the help
files. The original code structure and design is the very same.  No
other improvements have been made to the browser code and it still
uses the old layout tables to create the page grid.

Apart from the XHTML/CSS code changes, the patch adds an argument (-x
x) for CVSGraph in viewcvs.py in the view_cvsgraph function to tell
CVSGraph to generate XHTML code. For Mozilla/Firefox to recognize the
id attribute in the image map generated, the content-type must be set
to application/xhtml+xml (see
https://bugzilla.mozilla.org/show_bug.cgi?id=109445).  This patch does
however not change the content-type, but uses an ugly hack to make the
CVSGraph output work in Mozilla with the current text/html
content-type: a name attribute is merged into the id attribute in the
map_name defined in the cvsgraph.conf.dist file.

The XHTML code does not contain the standard XML declaration, just the
XHTML 1.0 Strict Doctype. This is to keep ViewCVS as encoding agnostic
as before and let the browser decide which encoding to use. An XML
file without the encoding declared must be interpreted as UTF-8 (or
UTF-16 if the byte order mark is included).

* viewcvs/cvsgraph.conf.dist
  Add name="" hack to the 'map_name' variable so Mozilla/Firefox will work.

* viewcvs/lib/ezt.py
  XHTML-ize sample output.

* viewcvs/lib/viewcvs.py
  XHTML-ize hard-coded output.
  (view_cvsgraph): Pass "-x x" to cvsgraph to force XHTML production.

* viewcvs/lib/blame.py
* viewcvs/lib/debug.py
* viewcvs/lib/py2html.py
* viewcvs/lib/query.py
* viewcvs/lib/vclib/bincvs/__init__.py
* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/error.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/query_form.ezt
* viewcvs/templates/query_results.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/roots.ezt
* viewcvs/templates/docroot/help_dirview.html
* viewcvs/templates/docroot/help_log.html
* viewcvs/templates/docroot/help_logtable.html
* viewcvs/templates/docroot/help_query.html
* viewcvs/templates/docroot/help_rootview.html
* viewcvs/templates/docroot/styles.css
* viewcvs/templates/include/branch.ezt
* viewcvs/templates/include/branch_form.ezt
* viewcvs/templates/include/diff_form.ezt
* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/file_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
* viewcvs/templates/include/paging.ezt
* viewcvs/templates/include/sort.ezt
* viewcvs/templates/include/view_tag.ezt
  XHTML-ize hard-coded output and templatized data.

* viewcvs/CHANGES
  Note this change.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1109 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-28 17:06:16 +00:00
rey4 f236e63a43 Various improvements to EZT
- make substitution pattern implementation to use current format instead
    of writing directly to output

  - make it possible to pass python functions to ezt templates as simple
    callbacks

  - update documentation with information about callbacks, file pointers,
    and the [format] directive

* lib/ezt.py
  (__doc__):
    update documentation

  (_write_value):
    add code to implement callbacks and substitution patterns

  (Template._parse, Template._cmd_print, Templte._cmd_print_html):
    update to work with changed _write_value function

  (Template._cmd_subst):
    removed, functionality moved into _write_value


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1088 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-08-24 05:10:45 +00:00
cmpilato 7e563d0746 Minor code cleanups.
* lib/viewcvs.py
  (view_diff): Little comment fix.

* lib/vclib/svn_ra/__init__.py
  (ChangedPath): Remove; use the one from vclib.svn.

* lib/ezt.py
  Update to latest upstream version, but reapply "the LongType fix".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1054 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-12 17:00:56 +00:00
cmpilato 9c5c43b625 Implement an assignment mechanism in EZT, a new [define variable][end]
construct.  Patch by James Henstridge <james@daa.com.au>, tweaked to
conform with Greg Stein's review, and stripped of the template changes
that made use of the new functionality by C. Michael Pilato (that's me).

* viewcvs/lib/ezt.py
  import cStringIO, and failing that, import StringIO.
  (_block_cmd_specs): Add 'define' to the list of block specs.
  (Template.generate): Init defines member.
  (Template._parse): Don't prepare references for 'define' commands.
  (Template._cmd_define): New.
  (_get_value): Look for items in the defines dictionary before
    falling back to the data dictionary.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@832 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-21 03:41:34 +00:00
cmpilato d57c96259e * viewcvs/lib/ezt.py
Import LongType from types, too.
  (_get_value): Handle conversion of LongType as well.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@806 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-02-20 18:20:59 +00:00
cmpilato dbe55837bb * viewcvs/lib/ezt.py
Remove HTML-speak throughout.  This module is quite useful for much
  more than just HTML.  Also:
  (Template.__init__): Add 'compress_whitespace' parameter (defaulting
    to 1) to control whether or not runs of whitespace are compressed.
  (Template._parse): Only compress whitespace if the
    compress_whitespace variable is non-zero.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@770 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-29 02:01:37 +00:00
gstein 79728fb463 Update copyright years.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@543 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-09-05 07:34:45 +00:00
pefu d92ff2f95e People hacking on templates have difficulties to track down errors.
This is a minor improvement on ezt template syntax error reporting.
Added two examples of bad template syntax to doctest section of the
module docstring.  Added doc string to the exception classes.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@524 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-06-06 13:05:57 +00:00
pefu caed1bbc6f Improve misleading docstring (Thanks to Lucas Bruand for pointing this out).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@490 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-20 07:02:08 +00:00
gstein df09de394d Add arguments to [include] directives. This allows the caller to pass
in additional arguments to the target EZT file. The target file can
refer to the arguments as [arg0] thru [argN].

Example usage: [include "header.ezt" "annotate"]


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@418 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 09:47:26 +00:00
gstein b476f4a882 add a new utility function for creating a "boolean" value
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@411 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 04:43:41 +00:00
gstein 2910bc4a22 If more than one argument is given to the implied PRINT, then treat it
as a formatting command. Prepare the arguments and pass them to the
new _cmd_format function.

_cmd_format splits up the format/value and then delivers it to the
output file with any potential substitutions.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@409 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 02:29:42 +00:00
gstein 62f37986d5 Some more refinements:
* [include] now uses the current template's directory as a base for
  including other templates. Thus, you can [include "header.ezt"] to
  refer to a header.ezt template in the same directory.

* _cmd_print() now looks for a "read" attribute on the value, to
  determine whether it is a stream (rather than a simple string). It
  can now copy a stream to the output.

* added a simple catch for unclosed blocks. It doesn't say *what* is
  unclosed, but it will at least give you an error about it, rather
  than quiet failure.

* [for] loops now iterate until the end of a list (determined
  internally by the interpreter when an IndexError occurs), rather
  than using len(list). This allows for lists of an indeterminate
  length to be used.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@392 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:03:53 +00:00
gstein 46d8987848 Changes to directive argument parsing.
1) don't include the surrounded [ ] in the regex group, this avoids the need
   to slice them off (the [1:-1] stuff)
2) use a new regex to properly parse the args: loose double quotes, strict
   symbols.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@390 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-15 03:37:59 +00:00
gstein 8e9831d6ec Enhance the directive parsing to allow anything between double quotes, and
to be restrictive on what a refname can contain.

Add some basic tests for the parsing regex.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@388 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-13 12:46:09 +00:00
gstein a807605e31 Minor tweaks on the way to i18n.
* _prepare_ref() and _get_value() can now handle string constants
* change [is] processing to stop special-casing strings
* single quotes are not allowed, so simplify [include] parsing


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@381 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 09:50:37 +00:00
pefu d7c84f3149 Fix unit test to take the new white space compression into
account.  Using this opportunity to update another not related
part of the module doc string.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@343 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 20:03:19 +00:00
gstein fcec542cfb Add a new debug module for developers to do timing/profiling and similar
tasks. Add a bit of instrumentation for EZT template parsing.

Add whitespace reduction to EZT. On my box, this doubles the parse time of
directory.ezt from .03 to .06 seconds, and log.ezt from 0.047 to 0.1
seconds. (about double in both cases) My two samples showed a reduction in
the response size by about 25%.

Instrument the overall execution of ViewCVS to examine relative percentage
of template parsing.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@341 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 12:54:40 +00:00
gstein 45d1849883 Enable [if-index REF first]
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@333 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 10:22:36 +00:00
pefu af4ba05019 Started to "rape" one of Greg's latest pets: 'lib/ezt.py' ;-)
* Added much more "denglish" text to the module doc string!
  Attention: The docstring is probably not yet DOC-SIG (DPS) compatible.
  I lost track following the exciting work done there lately.
  Please correct any bad english grammar.  May be I will be able
  to improve my english from reviewing your diffs <wink>.

* Reworked the initial (one-and-only) test case so far to include
  at least one if block directive and fixed some typos.

* Added more doc strings to functions and methods.

* implemented an include directive.  My implementation might not be very
  elegant.  I wanted to optimize the case, where the include
  directive occurs within a for block, but the name of the include
  file is a string constant.  The include file is readed in only once then.

  To be able do this I wanted to recursivly call the parse_file method
  and append the returned 'program' to the 'program' assembled so far.
  To do this, I renamed 'parse' and 'parse_file' into '_parse' and
  '_parse_file' which return the program sequence instead of assigning
  to instance attribute directly.  To avoid a change in the interface,
  I added two new wrapper methods 'parse' and 'parse_file', which
  simply call these new private methods.

  The other case (include filename given as a value reference) is
  handled in a way similar to what was suggested by Greg: I added a
  _cmd_include() method which will invoke _parse() and _execute()
  each time again, if its execution is encountered.  This however
  will avoid (delay) reading the include file, if the directives
  happens to be in an if or else clause, which is not executed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@297 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-08 18:55:53 +00:00
pefu ab0ac566fe Started to document this module. Docstring contains a runnable
example using Tim Peters 'doctest' module


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@284 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-27 14:42:43 +00:00
gstein 9c1d4a954b Fix nested lists, do some small optimizations in _get_value(), and some code
cleanup.

It was possible to do [for one.two], but it was impossible to refer to
[one.two] or [one.two.field]. The _get_value() function was only checking
the first part of the dotted name for use in an iteration.

We now maintain a stack of iterations in progress (in scope, basically).
When we prepare a value reference, we pass that list and do an up-front
check for the use of an iteration variable. The preparation returns the
starting point of the value lookup, and the rest of the attribute names.

(before, we returned a (refname, split-ref) tuple, now we return (refname,
 start, rest-of-ref) tuple)

We also optimize _get_value() to use 'start' rather than ref[0] and 'rest'
rather than ref[1:] (i.e. skip an index and a slice).

The value-references in the code were changed to avoid tuple-unpacking and
just pass the whole reference to _get_value() (which does the unpacking as
part of its argument definition). This effectively hides most of the
internal format of a prepared value reference.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@253 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-21 03:26:28 +00:00
gstein 9e55650c62 *) download_url() now adds request.amp_query to all URLs since all callers
did that anyways (except for one spot -- noted below)

*) In download_link(), open the window initially pointing at about:blank
   rather than an *incorrect* URL (it didn't have amp_query). Using
   about:blank will be faster anyways; and the TARGET stuff in the anchor
   will direct it to the proper URL.

*) Add templates/log.ezt for the file-log page

*) Change view_log() to begin using the new template. It is now used for the
   top portion of the file. (e.g. more work to do on the entries and bottom
   portion of the page)

*) ezt.py now allows '/' in the directives (typically, for quoted stuff)
   (this regex stuff really should be tweaked to allow just about anything
   in the quoted portions)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@247 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 22:51:56 +00:00
gstein cf456c5cfb Add double-quote to the regex to allow (quoted) constants in the [is]
directive.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@220 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-25 09:15:14 +00:00
gstein a0135416b5 add a new directive: [is ref ref] or [is ref "value"]. like an "if"
statement, comparing the two values for equality. runs the first section if
they match, the else-section if they do not.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@216 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-24 11:56:21 +00:00
gstein 27bcce39a8 Fix the comment parsing: allow more than simply alphanums in the text. Now
it allows everything but the closing bracket.

Add some commentary for the regex since it is central to the operation of
the templating engine.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@215 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-24 10:59:33 +00:00
gstein b8582e57c7 Begin introduction of templates. For now, just the top portion of the
directory page is generated via template.

* viewcvs.conf.dist, config.py: remove [text] options and defaults; those
    values are now simply text within the template.

* viewcvs.py: load the template, define information to pass to it, and
    invoke it.

* directory.ezt: template for the directory page (and top-level root
    selection and module page).

* ezt.py: templating library from the "edna" project. no changes from the
    HEAD in edna's cvs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@213 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-23 12:07:32 +00:00