Commit Graph

420 Commits (c35dabcaeb81a30a79e2e538c330e9d8fa92b8b5)

Author SHA1 Message Date
gstein c35dabcaeb Rolling 0.9.1
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@429 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-27 05:17:51 +00:00
gstein f45b5f8d7f bleck... a debug statement was left in the code. all those people with
0.9 are going to see a really large /tmp/log file...


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@428 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-27 05:15:47 +00:00
pefu 44528c0b7e quick backport to Python 1.5.2
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@427 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-24 11:38:30 +00:00
pefu 11f594b7ed Using 0.10 as a version number AFTER 0.9 is a really bad idea and
will cause a lot of confusion, because many people will think 0.10 < 0.9!

Since the main functionality of ViewCVS is mature, there is no need to
avoid bumping up the version up to 1.0-dev.  I do that right now.

Merry Xmas to all.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@426 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 15:54:18 +00:00
gstein 8a9719a5f8 we're developing 0.10 now...
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@425 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 12:04:32 +00:00
gstein 7ca272ab88 updates for 0.9
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@423 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 11:26:46 +00:00
gstein d13e98ef34 rolling 0.9
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@422 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 11:15:50 +00:00
gstein ba99093be8 fix the test for selecting the "Side by Side" popup
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@421 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 10:34:14 +00:00
gstein 9171ad07a8 Add a missing UTC onto the revision's date.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@420 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 09:58:33 +00:00
gstein cd03714ecd Stop defining page titles in the code, and do it in the templates
instead.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@419 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 09:57:06 +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 f46fed363e Provide for a way to internationalize the "ago" times in the pages.
(need to put instructions somewhere, but in brief:)

An admin can create a KV file in the [i18n] domain:

kv_files = [i18n]data/%lang%-text.conf

That KV file should have a [time] section and options named
%(name)_singular and %(name)_plural, where name is one of: second,
minute, hour, day, week, month, year. Each of the values should be
like: %d second. Additionally, one option name "little_time" with a
value like: very little time  (e.g. no format specifier).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@417 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 07:07:14 +00:00
gstein b41bd99aa3 Fix a bug where accidentally overwrote [nav_path] with the file
navigation. Change the file navigation to [nav_file] (in the code and
the template)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@416 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 04:47:18 +00:00
gstein c9710b9ba2 remove the "diff_name" variable; it is unused and we don't want
(language-specific) text in the source.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@415 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 04:18:42 +00:00
gstein 5ca27eee4c Revise some of the attic handling to clarify what is happening, some
of the naming, and shift some text from the program to the templates.

* viewcvs.conf.dist: clarify description of the hide_attic default

* viewcvs.py: add [show_attic_href], [hide_attic_href], and
    [rows.state] variables for managing the attic links. remove the
    [rows.hide_attic_href] and [rows.attic] variables.

* directory.ezt, dir_alternate.ezt: use the new vars to insert the
    text/links for the attic handling.

* upgrading.html: document the template variable changes. a few other
    tweaks.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@414 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-23 04:13:35 +00:00
gstein caf33e7862 Misc updates:
* adjust the timers to take a tag on the start; this allows them to be
  started/stopped independently, rather than needing to nest them

* add a few timers to get some perf info

* removed unused stuff: header_comment and html_link()

* use request.amp_query for the tarball_href


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@413 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 11:16:05 +00:00
gstein 1470ccd12f Various UI fixes and tweaks
* viewcvs.py:
  - make "search" param a sticky variable; it should propagate through
    the screens, across column sort changes, etc
  - htmlify() the search expression
  - add a new variable to specify whether a search form is needed on
    the directory page (to select a tag and/or a regex)
  - add [files_shown] since [num_files] isn't "right"; need longer
    term fix for variable w.r.t message when zero files are selected
  - always create form parameters because we may have a search form
    (and now use them in the search form)
  - use new ezt.boolean() where appropriate

* directory.ezt, dir_alternate.ezt:
  - display the current location and selection criteria in one block
  - move selection form to bottom of screen; this emphasizes the
    directory contents rather than how to select/refine the contents
  - tweak the "no_match" message since the search expression could be
    causing the zero-matches
  - use a table to format the various forms of selection criteria
  - use the params for *both* tag selection and regex selection
  - optionally display the "show all files" button, based on whether
    there is current selection criteria or not


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@412 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 04:54:38 +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 eacb04ee26 Whoops! Get the right template for the "markup" page.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@410 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-22 04:15:50 +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 ae049f281b Implement the alternate view: revnum in front, linking to log page;
fname in second column, linking to HEAD.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@408 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 12:22:12 +00:00
gstein 7e3baffea4 add dir_alternate.ezt
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@407 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 11:59:45 +00:00
gstein c40b88fb8b Remove the flip_links toggle and add a radio button for dir_alternate.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@406 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 11:11:51 +00:00
gstein c7fc7d8885 Oops. main_title is still used by the templates. We could probably
eliminate it, but keep it for now.

Found by: Peter Funk <pf@artcom-gmbh.de>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@405 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 10:59:46 +00:00
gstein 68336ffcdf Move the set of the name to *after* we strip the Attic/ from it. Prior
to this, when we displayed the attic contents, then would have Attic/
on the front of the name (erroneously).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@404 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 10:11:00 +00:00
gstein 70db664ec6 Clean up the mess in directory.ezt
* rather than using [headers] to determine the columns, just display
  them explicitly. use the new [have_logs] to determine whether the
  additional columns are needed.

* fix a bunch of problems in directory.ezt relating to unreadable
  files or errors while reading CVS information (lining up columns and
  whatnot)

* remove the "show_author" config option, favoring removal from the
  templates instead.

* remove the unused "hide_non_readable" option. remove the
  "use_java_script" and "open_extern_window" options; these were
  removed recently, but accidentally left in the .conf file.

* remove the "flip_links_in_dirview" option, favoring a new template
  instead. added a copy of directory.ezt as dir_alternate.ezt. changes
  to actually make the columns flipped are coming in a future commit.

* remove the [rev_in_front], [rows.span], and [rows.cols] options;
  these are now obsolete given the above changes

* add documentation to upgrading.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@403 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 04:50:33 +00:00
timcera e88fcaebce Added lib/accept.py
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@402 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-21 04:46:11 +00:00
pefu e2c82d9341 Bugfix: Exception handling: html_footer(None) passes a None-request
to generate_page()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@401 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-20 10:19:36 +00:00
gstein 3844161f7d add a little commented-out print statement for debugging
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@400 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-20 00:25:45 +00:00
gstein 9da5df779a Add capability for a couple forms of internationalization.
* define a new "languages" config item for the available languages

* use the accept.py module to select the appropriate language based on
  the Accept-Language header and the languages config.

* add a new key/value files concept. load them after determining the
  language to use.

* support %lang% specification in the template files. This required
  passing the "request" variable to generate_page() and to
  html_footer()

* pass the 'kv' name into all templates


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@399 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-20 00:18:12 +00:00
gstein f9d697db0c Add some code to parse and process the Accept-Language header. We'll
be using this to dynamically select what language to use for page
generation.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@398 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-19 05:09:21 +00:00
timcera 8432cb1c1d An [end] directive was missing, ViewCVS was throwing the new unclosed block
error.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@397 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 06:11:13 +00:00
timcera c8718c00cd Added new template files.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@396 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 06:07:47 +00:00
gstein d71c208540 Big update! Convert the rest of the pages to use templates.
* annotation, human readable diff, CvsGraph, and a marked-up file all
  use a template to generate the basic parts of the page. In many
  cases (annotate, graph, markup), the content is still rendered
  by other code.

* for the diff support, we take advantage of the new list iteration
  support in EZT to "iterate on" a DiffSource object, which parses a
  diff stream into structured object for the template to display.

* for the CvsGraph page, we make use of EZT's new stream support to
  stream in an imagemap from the CvsGraph executable. the graph page
  includes a navigation header now.

* updated the upgrading.html page with some items missing from the 0.7
  instructions, plus new instructions.

* because of the complete conversion, the configuration file no longer
  specifies colors or images -- these are all in the templates now.
  Removed the relevant material from config.py and viewcvs.conf.dist.

* converted html_footer() to use the new footer.ezt template because
  we still have to call that manually in the markup and annotate
  cases.

* add the templates to viewcvs.conf.dist and config.py

* added a handy generate_page() utility for generating pages from a
  template and its input data.

* removed download_link, html_icon, html_option, print_diff_select,
  and navigate_header utility functions. These all printed HTML to the
  output, but are obsolete due to the new templates.

* the new nav_header_data() utility function fills in data used by the
  "header.ezt" template, which replaces the navigate_header() func.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:22:14 +00:00
gstein 830c6ba76c Move the footer to its own template, and include it from the others.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@394 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:09:00 +00:00
gstein e9a4e3bbe2 Minor fix to the diff-selection popup. It tested for "c" when it
should have been "s". (the resulting bug is that a side-by-side diff
would never appear pre-selected in the popup)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@393 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:06:53 +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
timcera a2b579b5ac Allow the installer to view differences between old and new configuration files.
* Use lib/ndiff.py to do the differencing.
* Passes by configuration files that have no differences between new and old.
* Create menu loop to choose between overwrite, do not overwrite and view
  differences.

Future:
  Need to work on difference format, ndiff is unusual.  Need line numbers.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@391 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-16 01:58:00 +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 73209134c9 minor change to reduce a bit of code: use copy_stream() where possible
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@389 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-15 03:36:36 +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
pefu 83f6a7c7d5 Install new help pages also
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@387 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 20:43:58 +00:00
pefu acbf138a6e Add Help buttons.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@386 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 20:42:31 +00:00
pefu e872681988 More help pages and improved navigation between help pages.
help_logtable not yet finished (sorry, I will try to do this later).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@385 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 14:14:54 +00:00
pefu 27430791cb Added a new toggle to the Tkinter GUI allowing to play around with
Tim Ceras new 'use_re_search' configuration option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@384 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 12:29:51 +00:00
gstein e72b133665 Add warnings about the regex-based searching option.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@383 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 11:48:21 +00:00
gstein 3ea9aec854 Fixes for the regex searching.
* get_file_tests(): revert a portion: on error, append file, not full_name

* process_checkout(): take individual params rather than a request object.
    nit: removed a call to normpath()

* view_checkout(): pass the individual params to process_checkout()

* search_files():
  - call it "request" for consistency with other uses of the object
  - DON'T CHANGE ITS FIELDS. the request object is passed to the template,
    which needs values from it. we cannot go mucking with it. and who knows
    what the caller may want to do with it.
  - set up various local vars rather than munging request.*. note that we
    call mimetypes.guess_type() manually
  - rearrange ordering within loop to avoid expensive operations if we are
    just going to bail out: if we have a dir, or the file isn't a text file.
  - style nits: spaces after commas in function calls' args
  - if we terminate reading of a pipe, then close it (avoids a hang)
  - pass individual params to process_checkout()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@382 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 11:42:13 +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
gstein d3ed0a9cb5 add use_re_search default
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@380 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 09:47:27 +00:00
pefu 77f1d6f2e4 ViewCVS 0.8 is out and development for 0.9 started
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@379 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-11 11:52:59 +00:00