Commit Graph

120 Commits (c35dabcaeb81a30a79e2e538c330e9d8fa92b8b5)

Author SHA1 Message Date
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 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 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
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 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 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
timcera d59be9459d * Added regular expression search of all files in a directory.
+ created search_files function
  + split view_checkout into view_checkout and process_checkout.
    Wanted the process_checkout code to checkout the files from the
    repository.
  + split get_file_data into get_file_data and get_file_tests.
    Wanted get_file_tests to tell what kind of object was in the repository.
  + Modified directory.ezt to include searches.
    - Moved select by tag function up to the top of the page
    - Included code to return how many files survived the filters
    - The 'Reset' button now says 'Show all files'.
  + Modified viewcvs.conf.dist to include use_re_search option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@378 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-11 05:19:22 +00:00
gstein 1b4543ed92 Remove the even_odd option; it is no longer used.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@370 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-10 09:42:18 +00:00
timcera 02b0870390 * Removed requirement for trailing blanks on paths in viewcvs.conf.
In fact, can have them or not, doesn't matter.
* Changed logic dealing with collecting the revision number from the view_tag
  for rlog.  Identical 'rlog=...' statements were in both the if and else
  blocks.
* Added "'.for': 'fortran'" to list of extensions for enscript.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@367 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-07 14:43:42 +00:00
pefu 7a3c8bf9c4 Fix title string in cvsgraph output: path was missing. module is unsed by ViewCVS
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@362 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-05 14:52:59 +00:00
pefu 16281c1db5 A lot of small changes in one commit:
lib/viewcvs.py, templates/directory.ezt:
* Fix SF Bug [ #486085 ] checkout_magic_path uses invalid chars
  Provide backward compatibility for old style URLs.

standalone.py:
* Changed from calling viewcvs.main() to calling viewcvs.runcgi(),
  so that the timing results sampled by debug are displayed in the browser.

* Added two more toggles to the GUI.  Now it is simpler to perform a
  systematic test of several permutations of these config flags.

* Shortened the label text for the query entry field in the standalone GUI.

* Added some comments to this Tkinter GUI setup code, which has grown beyond
  than what I was my first intention.

lib/viewcvs.py, lib/config.py, cgi/viewcvs.conf.dist, standalone.py
and templates/directory.ezt:
* Added a new config flag variable called flip_links_in_dirview, which defaults
  to the classic setting (like cvsweb).  If it is set to 1 instead then the
  file and revision columns are exchanged and at the same time these two columns
  exchange the meaning of their links.  This design should solve the user
  interface design problem brought up first in
    http://www.lyra.org/pipermail/viewcvs-dev/2001-November/000285.html
  which was than than further discussed here:
    http://www.lyra.org/pipermail/viewcvs-dev/2001-November/000288.html
    http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/viewcvs/viewcvs/templates/Attic/direasy.ezt?hideattic=0
    http://www.lyra.org/pipermail/viewcvs/2001q4/000533.html
  Since than I received two personal emails from people sharing my POV.

  Unfortunately the huge [for rows]-block in directory.ezt has grown
  again.  But it is difficult to avoid this with the current design of
  lib/viewcvs.py and the templating engine lib/ezt.py.  I'm open to
  suggestions.

  In lib/viewcvs.py function view_directory I factored out the computation
  of row.span into a new local variable called span, since the number of
  empty trailing columns is decreased by one if the flip_links layout
  is configured.

templates/query.ezt:
* Rearranged the table columns in the commit database query result table,
  so that they match the existing table layouts of directory.ezt and
  log_table.ezt.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@360 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-27 21:56:06 +00:00
pefu 0393ef47f7 synchronize lib/config.py with viewcvs.conf.dist.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@357 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-19 21:25:01 +00:00
pefu d01364d0bd * Changed path used to serve help pages to take CWD='lib' into account
(required for the templates)
* Implemented two suggestions from Gregs reviewing mails:
  1: The fragment comes after the URL. The above pattern would be something
     like: "href=\"%m%F%7#rev%R\""
  2: request.qmark_query is what you're looking for here
  Thanks, Greg.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@313 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 21:12:05 +00:00
pefu 61c8b3d41f Hendrik Ruijter wrote:
> Note quite there yet.
>
> map_rev_href = "href=\"%m%F%7&rev=%R&content-type=text/vnd.viewcvs-markup\"";
>
> in cvsgraph.conf works. The content-type is *essential*.

I also added comments describing the difference between this and the
previous configuration setting and a comment to describe the new options
passed from ViewCVS to cvsgraph.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@308 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 17:08:23 +00:00
pefu 341525d3e4 Bugfix. Hendrik Ruijter wrote:
> When a repository root other than the default
> one is chosen, cvsgraph does not take the
> ?cvsroot=FOO into account. e.g.
>
> <area shape="rect" href="files.default#rev1.1"...
>
> The %c = cvsroot (with trailing '/') in cvsgraph.conf
> is the path, not what viewcvs.cgi wants. Thus,
> it seems that 'request.amp_query' or something similar
> has to be sent as a command-line argument to cvsgraph
> and weeded out as a %0..%9.
>
> e.g.
> map_rev_href
> = "href=\"%m%F#rev%R\"";
> should be
> map_rev_href
> = "href=\"%m%F#rev%R?cvsroot=%6\"";
> where %6 is 'Development' or something similar.

Not exactly but similar.  Please test.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@307 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-13 12:06:46 +00:00
pefu 808cf5265c Added comment advertising Tim Ceras alternative log_table.ezt template
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@306 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-09 22:44:12 +00:00
pefu 227fa91673 Change the default colors used for displaying colored diffs:
The new colors match the traffic light metapher:
1. red (stop) displays removed code no longer in use
2. yellow (attention) displays changed code
3. green (go) displays new added code.
Colors are always a matter of taste.
But I believe these colors make more sense and especially provide
more visual contrast than the previous colors copied from cvsweb.

I also modified some comments.

Please tell me, if you disagree.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@295 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-08 16:41:21 +00:00
gstein bff90274b1 First pass at converting the database query stuff over to use templates. The
new template is templates/query.ezt and is the "query" config option in the
[templates] section.

This converts about half the code. The database results come after the
footer, but that will be fixed in a (near) future revision.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@275 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-25 09:21:47 +00:00
pefu 89282b3125 * ATTENTION: I changed the meaning of the cvsgraph_path config option variable!
This is more consistent with the already existing enscript_path config option.

* Added a new subsection about enscript configuration to the INSTALL file
  similar to the subsection about cvsgraph.

* Updated the notes about cvsgraph to match the new situation. (make install
  in the cvsgraph source directory places itself into /usr/local/bin).

* Added a note about linking cvsgraph on Solaris.

* The value of the config option variable cvsgraph_conf needs to be an
  absolute path.  viewcvs-install now sets this path automatically
  to the viewcvs install directory.

Idea: Should viewcvs-install try to find cvsgraph and enscript binaries
on $PATH and enable the use*-config options automatically?


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@265 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-24 09:44:59 +00:00
pefu 10d0f30cfa * Replaced the os.system() calls inherited from cvsgraphwrapper.cgi and
cvsgraphmkimg.cgi with popen.popen().  Suggested by Greg Stein.

* Removed the cvsgraphwrapper.cgi and cvsgraphmkimg.cgi scripts.  They
  are no longer needed.  Suggested by Greg Stein.

* Fixed the viewcvs-install accordingly.

* Added some basic HTML files to the installer, so that they are available
  for access from an installed viewcvs locally.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@264 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-23 11:58:05 +00:00
pefu fdabbe7687 Moved cvsgraph interface into viewcvs.
This solved the apache ScriptAlias and URL problem.
The cgi/cvsgraph* scripts are no longer needed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@262 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-23 00:18:15 +00:00
pefu 132f7e2342 Greg pointed out to me:
"""The point is that we don't want somebody to install ViewCVS and have the
   group ML be on there. Otherwise, we will get stupid questions about the
   *contents* of the CVS repository. You should see my inbox... I get all kinds
   of questions about software. And I'm all, "what the hell? never heard of
   that. oh... you're probably looking at the software via ViewCVS. well... go
   away... go find the real admin" :-)
""".  This change should fix that problem.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@260 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-22 20:30:05 +00:00
gstein 621adf6b35 Remove two options which have become obsolete: input_text_size and
allow_version_select.

Document their removal and where their new counterparts are.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@257 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-21 11:27:04 +00:00
gstein d89a788783 Complete the rest of the log template.
CHANGE: the "Long colored diff" format option is now specified with "l"
  rather than "H". This may affect persistent URLs or existing .conf files.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@256 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-21 11:06:25 +00:00
gstein 9b25497fe9 Specify the template to use in the .conf file. This allows vhosts to select
different templates. (and simply provide flexibility to the user)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@251 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 23:54:21 +00:00
gstein e3a16b2481 *) Remove the logo from the config file (and config.py).
*) Update the upgrading.html document to note the logo removal. Add
   commentary about 0.8 not being released. Tweak the [text] options.

*) viewcvs.py: toss html_header() (and its logo usage). Change the exception
   handling to simply generate the header text rather than use
   html_header().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@249 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 23:24:59 +00:00
gstein 50e4520d0f Remove obsolete comments. Noted by Peter Funk.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@246 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-20 19:45:48 +00:00
pefu bf69d3d2aa Fix viewcvs-Bugs-472766. Sorry. I forgot to copy the file back into the working directory
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@242 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-19 14:05:40 +00:00
gstein c0859c9dd2 toss some obsolete options
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@239 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-19 07:02:16 +00:00
pefu 55052f1854 Improved error diagnostics. Allow empty module
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@234 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-16 16:41:19 +00:00
timcera e31eb7859e Removed the ',v' from the title and alt name.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@232 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-16 14:59:49 +00:00
timcera 0268b877e5 Added imagemap feature to CvsGraph. Now can click on the image to go to that
particular revision, tag, or diff.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@225 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-12 05:17:00 +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
timcera 56695b3f26 Added CvsGraph support including documentation and installation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@211 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-22 06:01:44 +00:00
timcera 350db5250c Added CvsGraph support including documentation and installation.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@209 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-09-22 05:38:32 +00:00
jpaint a64dc83028 big update of commit database; new CGI, better database cache; no more
html templates; better intigration with viewcvs.cgi's HTML settings


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@207 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-08-21 19:24:40 +00:00
gstein ba039d5a8f add a reference to Karl's book. delete a broken link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@194 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-30 08:54:12 +00:00
gstein 007ad51b2c change web site references from www.lyra.org/viewcvs/ to the new
viewcvs.sourceforge.net/ site.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@193 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-30 08:49:19 +00:00
gstein e3dbdb4fcc Update copyright years to include 2001.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@182 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 22:51:02 +00:00
gstein edf252fb2f Now, make the appropriate changes to get the split CGI script/library to
actually work: move imports, wrap run_cgi() around the logic in viewcvs.py,
shift around the CONF_PATHNAME stuff, etc.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@179 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 12:22:51 +00:00
gstein 6942dd6b4b Slice a big chunk out of viewcvs.cgi and move it to viewcvs.py.
Absolutely no other changes. No additions, no reformat, no nothing...


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@178 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 12:05:08 +00:00
gstein e243a0e1ad Record that we couldn't stat the file, or that it is unreadable. This allows
us to actually tell the user about it (and do so!).

Also removed a spurious try/except in generate_tarball; get_file_data()
shouldn't be raising one any more.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@176 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 11:34:17 +00:00
gstein 755e4e74c3 In directory views (and tarballs), don't include files or dirs that we
cannot read.

Reported by: Jaime E. Villate <villate@fe.up.pt>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@175 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 10:23:59 +00:00
gstein a46b9dd3ba The (colored) links need to specify the diff_format=h option. Also correct a
spelling/typo and add missing right parents.

Submitted by: Chris Tillman <tillman@azstarnet.com>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@174 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-12 09:25:53 +00:00
akr 03a5620947 (_re_rewrite_url): recognize fragment identifier.
http://sourceforge.net/tracker/?func=detail&atid=318760&aid=421284&group_id=18760


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@165 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-06 10:06:23 +00:00
akr 424521d40e (get_file_data): ignore files which causes failures on stat(2) such
as dangling symlinks.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@164 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-06 09:13:01 +00:00
akr 1eeb39f264 (html_time): Since very old timestamp (82 years, 6 months in this case)
causes overflow of plain integer, use long integer.

use `year' correctly for these old timestamps.

http://sourceforge.net/tracker/index.php?func=detail&aid=418428&group_id=1&atid=100001
http://sourceforge.net/tracker/index.php?func=detail&aid=421096&group_id=18760&atid=118760


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@163 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-05-05 19:52:42 +00:00
akr 4cb1282b70 change option name for tarball generation from `tarball' to `allow_tar'.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@158 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-28 10:38:16 +00:00
akr f34424ca20 make tarball generation configurable.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@157 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-28 08:50:28 +00:00
akr bc6851ea6f separate branch and non-branch tags in tag menu.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@156 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-04-27 09:56:18 +00:00