Commit Graph

623 Commits (4bfb7f1354a4e9c412638b139322802d2b513be0)

Author SHA1 Message Date
cmpilato 4bfb7f1354 Rename Repository.filelog() to Repository.itemlog() (Subversion
supports logs on directories, too, ya know).  And make some other
little documentation changes.

* viewcvs/lib/vclib/__init__.py
  (Repository.itemlog): Was Repository.filelog().
  (Revision.__init__): Document the input parameters.

* viewcvs/lib/vclib/bincvs/__init__.py
  (BinCVSRepository.itemlog): Was BinCVSRepository.filelog().

* viewcvs/lib/vclib/ccvs/__init__.py
  (CCVSRepository.itemlog): Was CCVSRepository.filelog().

* viewcvs/lib/vclib/svn/__init__.py
  (SubversionRepository.itemlog): Was SubversionRepository.filelog().

* viewcvs/lib/vclib/svn_ra/__init__.py
  (SubversionRepository.itemlog): Was SubversionRepository.filelog().

* viewcvs/lib/viewcvs.py
  (view_markup, view_log): Update calls to Repository.itemlog() (from
    Repository.filelog()).

* viewcvs/lib/cvsdb.py
  (GetCommitListFromRCSFile): Update calls to Repository.itemlog()
    (from Repository.filelog()).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1050 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-08 22:57:02 +00:00
cmpilato 0738697d61 Fix an annotate bug reported by Amy Langenhorst <Amy.Langenhorst@noaa.gov>.
* lib/blame.py
  (CVSParser.is_branch): Tighten up regular expression with '^'/'$'.
    Revisions like "11.0.2.2.0.1" were matching not with groups
    "11.0.2.2" and "1", but with "11" and "2.2.0.1".


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1049 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-08 22:55:58 +00:00
cmpilato f7e15a4b8e * lib/viewcvs.py
(view_log): Fix a bug where use of the diff form via branch
    selection resulted in a log view instead of a diff view.  Reported
    by Amy Langenhorst <arl@noaa.gov>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1048 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-04 19:02:23 +00:00
cmpilato 874e0be23b Sorta kinda revert my changes from Feb. 1 2005, wherein I stopped
grouping directories in the directory view.  Now, make that behavior
optional (though, the default), but also fix it so that the directory
group itself is internally sorted by the current sort key.  This more
accurately mimics the likes of the Windows Explorer.

* viewcvs/viewcvs.conf.dist
  (sort_group_dirs): New option.

* viewcvs/lib/config.py
  (Config.set_defaults): Set default value for sort_group_dirs.

* viewcvs/lib/viewcvs.py
  (file_sort_cmp): If grouping directories, sorts dirs higher than
    files.  Otherwise, use normal sorting rules.

* viewcvs/website/upgrading.html
  Note the new option.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1047 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-03-07 15:13:23 +00:00
cmpilato 6355639d08 Provide the Subversion youngest revision, and a link to it, to the
directory view.  This is pretty common request, the most recent by
Sergio Rua <srua@plus.net>.

* viewcvs/lib/vclib/svn_ra/__init__.py
  (get_youngest_revision): New.

* viewcvs/lib/vclib/svn/__init__.py
  (get_youngest_revision): New.

* viewcvs/lib/viewcvs.py
  (view_directory): Re-organize some data dictionary stuffing (I
    really wish that *all* data dictionary parameters were initialized
    at the head of each view function so we can see a canonical list
    of those params, but maybe another day...).  Also, for 'svn'
    roottypes, populate a new 'youngest_rev' and 'youngest_rev_href'
    dictionary items.

* viewcvs/website/upgrading.html
  Document the new 'youngest_rev' and 'youngest_rev_href' template keys.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1044 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-28 15:40:08 +00:00
cmpilato 329a9edab4 * viewcvs/lib/viewcvs.py
(enscript_extensions): Add '.cs', '.bas', and '.cls' extensions,
    mapping to 'csharp', 'vba', and 'vba', respectivelyly, at the
    request of Bo Berglund <bo.berglund@telia.com> and Hern��n Mart��nez
    Foffani <hernan@orgmf.com.ar>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1042 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-22 15:09:09 +00:00
cmpilato f723597546 Now that Subversion's RA layer has a pleasant API (instead of a nasty
vtable structure), update the ViewCVS 'svn_ra' module to use it.  This
module now almost has total functional parity with the 'svn' module.

* viewcvs/lib/vclib/svn_ra/__init__.py
  Import the svn.ra module.
  (date_from_rev, created_rev): Actually flesh out these functions
    using the new RA capabilities.
  (LastHistoryCollector.add_history): Remove leading slashes from
    paths used to make ChangedPath items.
  (either_binary): Leave a TODO, with some optimization ideas.
  (SubversionRepository.__init__): Use the RA interface to fetch the
    youngest revision instead of a really kludgy (and more expensive)
    algorithm based on dirents.
  (FileDiff.get_files, SubversionRepository.openfile): Fixup the use
    of streams.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1038 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-17 19:01:46 +00:00
rey4 66cdbe31e7 Support relative images and links in checked out HTML pages when
checkout_magic is disabled by changing the default view for file URLs from
"log" to "checkout"

This causes some URL compatibility to be lost when checkout_magic is disabled.
Bookmarks which pointed to log pages but don't have explicit view=log
parameters will point to checkout pages instead.

* lib/viewcvs.py
  (Request.run_viewcvs):
    change default view for files from "log" to "checkout" when checkout_magic
    is disabled

  (Request.get_link):
    don't add explicit view=checkout parameters for checkout links when
    checkout_magic is disabled

    don't drop explicit view=log parameters for log links

* website/upgrading.html
    add note about URL compatibility

* INSTALL
    update section on access control

* viewcvs.conf.dist
    update documentation for "root_as_url_component" and "checkout_magic"

    move "checkout_magic" option directly underneath "root_as_url" component
    because the two options are related


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1037 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-13 16:48:12 +00:00
rey4 6b9207ab39 Add title attributes to directory links
* lib/viewcvs.py
  (view_directory):
    add new row.viewable attribute so it is possible to tell whether a file
    link goes to a checkout or markup page

* templates/directory.ezt:
    add title attributes


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1036 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-13 16:46:56 +00:00
cmpilato fd5acb4930 * viewcvs/lib/viewcvs.py
(enscript_extensions): Add '.f90' as an extension mapping to
    'fortran'.  Suggestion by Ed Zaron <ezaron@coas.oregonstate.edu>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1032 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-10 23:37:11 +00:00
cmpilato 50508ebcc7 In short, facilitate the creation, testing, installation, and sharing
of "template sets."

I'm introducing a new configuration variable ('template_dir') which is
the parent directory of all ViewCVS templates.  Those templates have
names which match the views they describe (directory.ezt,
revision.ezt, graph.ezt, etc.).  The 'docroot' variable will now
default to "<template_dir>/docroot".  Finally, the [templates] section
will continue to work as before, save that all configuration therein
(and templates not configured will fallback to
"<template_dir>/<view_name>.ezt").

The beauty of this is that folks can start whipping up (and
maintaining themselves) ViewCVS template sets which can be traded and
shared, like themes for Mozilla or Windows XP.  EZT is super-powerful,
and there are some really fun things you can do with it to serve up
interesting and unique ViewCVS views.  But while we want to encourage
creativity and innovation, we don't want the ViewCVS project itself
having to maintain everyone's fun little themes.  Anyway, so now
installing a new template set is just a matter of dropping that set
directory somewhere (anywhere, really) on your system and pointing
'template_dir' to that directory tree.  No (very annoying) template
modification conflicts to deal with every time you update ViewCVS on
your system.

And the best part is that existing ViewCVS configurations should all
continue to work compatibly.

* viewcvs/viewcvs.conf.dist
  Add a new option, "template_dir".  Tweak documentation on the
  "docroot" option.  And make the whole [templates] section work a
  little differently.

* viewcvs/lib/config.py
  (Config.set_defaults): Use 'None' as the default value for the
    self.templates.directory, self.templates.log,
    self.templates.query, self.templates.diff, self.templates.graph,
    self.templates.annotate, self.templates.markup,
    self.templates.error, self.templates.query_form,
    self.templates.query_results, and self.templates.roots options.
    Add a new default value for self.options.template_dir.

* viewcvs/lib/viewcvs.py
  (get_view_template): New.
  (generate_page): Instead of taking a template name, take a view
    name.  Also, call get_view_template() to generate the full
    template path.
  (view_markup, view_roots, view_directory, view_log, view_annotate,
    view_cvsgraph, view_diff, view_revision_svn, view_queryform,
    view_queryform, view_error): Update calls to generate_page().

* viewcvs/lib/query.py
  (main): Use viewcvs.get_view_template().


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1029 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-08 02:46:20 +00:00
rey4 12d47495c3 Reorganize URL handling functions for clarity and to make it
easier to change the default view.

* lib/viewcvs.py
  (Request.run_viewcvs):
    move code that handles the magic markup mimetype.

    remove unneccessary special case code for log pages with revisions
    selected for diffs

  (Request.get_link):
    consolidate code that determines whether to skip sticky variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1028 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-06 19:55:49 +00:00
rey4 86a7feb403 Add unobtrusive link to repository listing view on the common page
headers.

* templates/include/header.ezt
    add "Repository Listing" option to the roots select box

* lib/viewcvs.py
  (Request.run_viewcvs):
    handle magic "roots" value submitted by the roots select box

  (common_template_data):
    add "view" template parameter


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1024 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:33:20 +00:00
rey4 56e7993f12 Add repository listing view. This change doesn't any links to the new
view because I'm not really sure where they would fit best in the UI.
So for now, the view is only visible when viewcvs.cgi is loaded
with no trailing path in the URL and either root_as_url mode is
enabled or default_root is not set.

* lib/viewcvs.py
  (Request.run_viewcvs, Request.get_link, nav_path, common_template_data,
   _views):
    add support for new view

  (view_roots):
    new function

* lib/config.py
  (Config.set_defaults):
    set default templates.roots option

* templates/roots.ezt
    new template

* viewcvs.conf.dist
  (templates/roots):
    new option

  (general/default_root, options/root_as_url_component):
    update documentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1023 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:32:32 +00:00
rey4 5d572bef92 Remove duplicate code
* lib/viewcvs.py
  (nav_header_data):
    get rid of duplicate template assignments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1022 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:29:09 +00:00
rey4 21f89e87d5 Get revision numbers to display on annotate pages when viewing HEAD.
* lib/blame.py
  (BlameSource.__init__):
    set "revision" member to revision being annotated

* lib/viewcvs.py
  (view_annotate):
    use "revision" member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1021 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:28:22 +00:00
rey4 4504b5fc3d Make redirects work better with the standalone server
* lib/sapi.py
  (CgiServer.redirect):
    use addheader() method instead of printing headers literally


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1018 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:07:16 +00:00
rey4 72dbcf1fb7 Fix bug in copy_stream which broke docroot requests with the standalone
server on linux.

* lib/viewcvs.py
  (copy_stream):
    when copying to the sys.stdout, make sure to use the current
    sys.stdout file object instead of the file object cached by
    python as a default argument


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1017 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:05:40 +00:00
rey4 33e9c1db0c Make the blame module use get_url links
* lib/viewcvs.py
  (sticky_vars):
    removed

  (view_annotate):
    pass partial get_url links to blame module

* lib/blame.py
  (link_includes, BlameSource.__init__, BlameSource.__getitem__):
    use get_url links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1016 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:04:03 +00:00
rey4 d0029c46d3 Add revision links to annotate view
* lib/viewcvs.py
  (view_markup, nav_header_data)
    move "view_href," "download_href," "annotate_href" assignments
    into nav_header_data

* templates/annotate.ezt
    add revision links here


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1015 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:03:19 +00:00
rey4 dc76b574a9 Clean up path handling in viewcvs views, eliminate unused template variables.
* lib/viewcvs.py
  (_path_join):
    new function

  (Request.run_viewcvs, nav_path, common_template_data, view_markup,
   view_log, view_cvsgraph, generate_tarball, view_query):
    use _path_join

  (nav_header_data):
    remove unused variables

* templates/graph.ezt
    don't use "path" variable


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1014 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 12:58:14 +00:00
cmpilato 4d1a7b09b3 Fix tarball generation bug noticed by Nicolas Benoit <nbenoit@tuxfamily.org>.
* viewcvs/lib/viewcvs.py
  (generate_tarball): rep_top is a list, so stop testing it against strings.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1013 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-02 15:07:29 +00:00
cmpilato e58df06c55 * viewcvs/lib/vclib/svn/__init__.py
(_sigterm_handler): Make self available for compatibility with older
    Python versions.  (Thanks for catching this, Greg Stein.)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1012 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-02 15:02:55 +00:00
cmpilato 5ad97c13bb Ensure that Subversion repositories get a clean disconnect when
SIGTERM is sent to the process by registering a handler for that
signal which gracefully shuts down APR.

* viewcvs/lib/vclib/svn/__init__.py
  (SubversionRepository.__init__): Register a handler for SIGTERM that
    cleanly closes up shop.
  (SubversionRepository._close): New (with code copied and modified
    from __del__).
  (SubversionRepository.__del__): Cored out (see _close).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1011 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-01 20:37:00 +00:00
cmpilato b5cf642f0e * viewcvs/lib/viewcvs.py
(file_sort_cmp): Only treat directories as special when sorting by name.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1010 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-01 16:40:15 +00:00
cmpilato f85b7bb67e * viewcvs/lib/popen.py
(popen): Removed commented-out code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1009 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-31 21:14:04 +00:00
cmpilato e8fa0f0186 * viewcvs/lib/debug.py
(PrintStackTrace): Remove unused function.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1008 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-31 21:12:13 +00:00
cmpilato 27c4c62394 * viewcvs/lib/viewcvs.py
(_sticky_vars): Remove 'dir_pagestart' and 'log_pagestart' from the
    set of sticky parameters.  I simply can't see any utility in
    keeping those things around, as they muck up more URLs than they help.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1007 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-29 03:55:24 +00:00
rey4 ff5aa6d251 Fix handling of "tarball" parameter (for backwards compatibility
with ViewCVS 0.9.2

* lib/viewcvs.py
  (Request.run_viewcvs)
    look for tarball parameter on directory paths, not file paths
----------------------------------------------------------------------


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1006 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 19:35:14 +00:00
rey4 83d2817867 Fix subversion markup view
* lib/viewcvs.py
  (view_markup):
    set annotate_href value

----------------------------------------------------------------------


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1005 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 06:38:20 +00:00
rey4 c9ca3313c6 Remove "auto" view replacing auto links with direct checkout or
markup links.

* lib/viewcvs.py
  (is_viewable):
    new function

  (view_auto):
    removed

  (view_directory, view_cvsgraph, build_commit):
    change auto links into direct links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1004 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 06:08:08 +00:00
rey4 99818c7cf0 Add a bunch of links between different views. Some of these links
were present in ViewCVS 0.9.2, but seem to have been inadvertently
removed since then.

* lib/viewcvs.py
  (common_template_data):
    set "up_href, "log_href," and "graph_href" template variables
    for files

  (view_markup):
    set "annotate_href"

  (view_directory):
    stop setting "up_href" here

  (view_log):
    stop setting "graph_href" and "back_url" here
    set "annotate_href" here

  (view_queryform):
    set "dir_href" here

* templates/annotate.ezt
* templates/diff.ezt
* templates/graph.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
* templates/query_form.ezt
* templates/include/branch.ezt
    add links

* website/upgrading.html
    document changed variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1003 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 05:20:46 +00:00
rey4 c0110cacae Simplify page titles. Someone was getting a little - too crazy - with -
the: punctuation ;)

* templates/annotate.ezt
* templates/diff.ezt
* templates/graph.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
* templates/query.ezt
* templates/query_form.ezt
* templates/query_results.ezt
* templates/revision.ezt
* templates/include/dir_header.ezt
* templates/include/header.ezt
  change titles

* lib/config.py
  (Config.set_defaults):
    remove "main_title" option

* viewcvs.dist.conf
    remove "main_title" option

* website/upgrading.html
    document removal of "main_title" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1000 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 03:40:55 +00:00
rey4 cbac6b920c Fix infinite redirect problem for tarball download links, and remove
trailing slashes on revision view links.

* lib/viewcvs.py
  (Request.run_viewcvs):
    don't require trailing slashes on tarball download or revision
    view URLs

  (Request.get_link):
    remove trailing slashes on revision view links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@999 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 19:04:13 +00:00
rey4 aedd660e9a Fix infinite redirect problem for revision URLs.
C. Michael Pilato <cmpilato@collab.net> first reported this bug
on the dev list.

* lib/viewcvs.py
  (Request.get_link):
    add trailing slashes on revision view links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@998 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 18:31:10 +00:00
cmpilato d34e4f0594 * viewcvs/lib/viewcvs.py
(nav_path): Escape the root name.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@997 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 18:11:57 +00:00
cmpilato 9fdb38c5e5 * viewcvs/lib/viewcvs.py
(Request.run_viewcvs): If there is no rootname, set a default one so
    that further attempts to use it don't choke.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@996 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 17:37:59 +00:00
rey4 fdb5ced659 Templatize the clickable path in header.ezt.
* lib/viewcvs.py
  (clickable_path, _dir_url):
    removed

  (nav_path):
    new function, replaces clickable_path

  (common_template_data):
    set "nav_path" template variable with nav_path() instead of
    clickable_path()

  (view_directory, view_log, view_queryform, view_query):
    don't override 'nav_path' variable

* templates/include/header.ezt
    use changed 'nav_path' variable

* website/upgrading.html
    document changed 'nav_path' variable


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@995 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 17:30:45 +00:00
rey4 3d3554b07e Remove extra clickable paths from directory and markup pages.
* lib/viewcvs.py
  (view_markup):
    don't set 'nav_file' template variable

* templates/markup.ezt
    remove the clickable path right before the revision information

* templates/include/dir_header.ezt
    remove clickable path in "Current Directory" row of summary table

* website/upgrading.html
    add documentation on 'nav_file' template variable


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@994 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 16:55:48 +00:00
rey4 df3d83f843 Fix bug that prevented magic checkout URLs from working.
* lib/viewcvs.py
  (Request.run_viewcvs):
    fix use of nonexistent variable


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@993 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 16:17:53 +00:00
rey4 8a6ffa0257 Fix a bug in redirection logic
* lib/viewcvs.py
  (Request.run_viewcvs):
    add trailing slash to all directory paths, not just paths
    for directory listing pages


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@991 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 07:20:33 +00:00
rey4 77e0fd633a Add "Parent Directory" link in directory listings
* templates/directory.ezt
* templates/dir_alternate.ezt
    add "Parent Directory" rows

* lib/viewcvs.py
  (view_directory):
    set "up_href" template value

* website/upgrading.html
    document "up_href" variable


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@990 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 05:57:01 +00:00
rey4 5c42382511 Redirect on irregular URLs so it is easier to limit viewing parts of
the repository in apache based on the URL.

Thanks to Jonathan <voigtjr@gmail.com> for bringing this issue to my
attention on the users' list.

* lib/viewcvs.py
  (Request.run_viewcvs):
    add redirects for weird urls

  (view_directory):
    don't redirect here when there's no trailing slash; it's taken
    care of in run_viewcvs


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@988 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 02:16:09 +00:00
rey4 0b7be07a67 Fix cvs log view
* lib/viewcvs.py
  (view_log):
    set default value for entry.copy_path


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@987 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-13 01:34:20 +00:00
cmpilato c15cc3bb33 * viewcvs/lib/debug.py
(PrintException): Escape the error message so it doesn't goof up
    HTML display.

* viewcvs/lib/viewcvs.py
  (Request.run_viewcvs, _validate_param): Don't escape params in
    strings of raised exceptions, as that's the exception-handling
    code's job.
  (nav_header_data, common_template_data, clickable_path, view_log,
    view_directory): Escape template data that needs escapin'.
  (view_markup): Use un-escaped filename instead of the one in the
    data dictionary.
  (view_checkout): Re-org a little bit so that fp is always explicitly
    closed.
  (copy_stream): Instead of defaulting the output stream to None, and
    letting None mean "gimme sys.stdout", just make the default output
    sys.stdout.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@986 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-06 20:40:09 +00:00
cmpilato 167311b79b * viewcvs/lib/viewcvs.py
(view_doc): Refer to "static files" instead of "help files", and to
    try to get all the exceptionful states to occur before we fire up
    the output process.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@985 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-06 20:38:47 +00:00
cmpilato 39d2eedd10 Fix Bugs item #1090934, reported by ahndee.
* lib/viewcvs.py
  (view_revision_svn): Convert 'text_mods' and 'prop_mods' members of
    each changed path item into EZT booleans.

* templates/revision.ezt
  Use if-any tests, instead of comparisons with "1", to determine if
  each changed path item has text or property mods.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@984 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-06 20:27:27 +00:00
rey4 1c703900bb Generate CvsGraph image map links with get_url function just like other
links instead of cobbling them together in cvsgraph.conf. This way
cvsgraph.conf doesn't have to change if we add new url schemes and we can
handle sticky variables and root parameters without special case code.

* lib/viewcvs.py
  (Request.get_url):
    accept new "partial" argument to append trailing ? or & to generated
    url

  (view_cvsgraph):
    pass get_url generated links to cvsgraph instead of url fragments

* cvsgraph.conf.dist
    use the new links passed by ViewCVS


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@981 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-12-10 02:09:46 +00:00
rey4 518573a350 Minor cleanups.
* lib/vclib/bincvs/__init__.py
  (_log_path):
    remove initialization of unused variable

  (_check_path):
    distinguish error messages that come from os.stat()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@979 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-12-04 01:57:13 +00:00
rey4 2529196782 Improve error messages in directory view for inaccessible CVS files.
* lib/vclib/__init__.py
  (DirEntry.__init__):
    set "errors" member instead of "verboten"

* lib/vclib/bincvs/__init__.py
  (CVSRepository.listdir):
    don't skip "Attic" and "CVS" entries if we're not sure if they are
    directories

    don't skip entries in Attic/ when we can't tell if they are files or
    directories

  (CVSDirEntry.__init__):
    use "errors" argument instead of "verboten"

  (_get_logs):
    don't set "DirEntry.log_errors" member, use "errors"

  (_log_path):
    don't return file access errors here, they are returned by _check_path

  (_check_path):
    return error strings on file access errors instead of simple booleans

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs):
    don't set "DirEntry.log_errors" member, use "errors"

* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
  (get_logs):
    don't set "DirEntry.log_errors" member

* lib/viewcvs.py
  (view_directory):
    use "DirEntry.errors" member instead of "log_errors"

  (generate_tarball):
    use "DirEntry.errors" member instead of "verboten"

* tools/cvsdbadmin
  (RecurseUpdate):
    use "DirEntry.errors" member instead of "verboten"


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@978 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-12-03 20:44:56 +00:00