Commit Graph

1053 Commits (2c0181d6253def8584edbd7cbd04d5c3ec81e011)

Author SHA1 Message Date
cmpilato 2c0181d625 Merge in CHANGES from 0.9.3 release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1070 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 07:28:32 +00:00
cmpilato 2a75e75d23 Tweak website to point to new 0.9.3 release.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1069 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 07:12:53 +00:00
cmpilato 27ad9a4f9d * lib/viewcvs.py
(download_tarball): Throw a 403 Forbidden area if a tarball request
    is for a forbidden module.  Patch by Olaf Hering <olh@suse.de>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1065 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-17 05:30:27 +00:00
cmpilato 6eeaf2be2b * lib/vclib/svn/__init__.py
(SubversionRepository.__init__): Catch (and ignore) a ValueError
    exception thrown by signal.signal.  It's probably the situation
    described in this email:
    http://mailman.lyra.org/pipermail/viewcvs/2005q1/003357.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1064 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-08 04:46:58 +00:00
dionisos cefd17b78e Stricter input checking: throw an exception when not expecting EOF yet.
* tparse/tparse.h, tparse/tparse.cpp: Add 'allow_eof' parameter to
  TokenStream::get() and adjust callers.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1063 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-01 16:05:26 +00:00
dionisos c3a80705ba * tparse/tparse.cpp (parse_rcs_admin): Allow 'symbol<space>:<space>revnum'
as recently added to the python modules.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1062 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-01 15:00:26 +00:00
dionisos a9f8e7a802 * tparse/tparse.h: Fix 2 warnings revealed by gcc -Wall.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1061 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-01 13:58:06 +00:00
dionisos 55889fd691 Exception usage cleanup. Use exceptions to terminate the parser in all cases.
Also protect pointers with auto_ptr to ensure cleanup.

Note: Before this change exceptions *could* occur, but all pointer-referenced
memory would be leaked.

* tparse/tparse.h: Change #include-s to C++ names.
  (RCSParseError):  Change to be a public descendant of exception. Use
  string datatype to ensure automatic cleanup. Implement a destructor
  as required by exception.
  (RCSExpected):  Use string datatype to ensure automatic cleanup. Add
  constructor for expected characters.
  (Branche): Removed.  Replaced with std::list<>.
  (Sink): Change method definition to reflect switch to exceptions.
  (TokenParser::match):  Add method for matching characters.
  (TokenParser::semicol, TokenParser::matchsemicol): Removed.
  Obsolete because we're now able to match single characters.
  (tparseParser):  Change method definition to reflect the switch
  to exceptions.
  (tparseParser::parse):  Adapt to changed method definitions.

* tparse/tparse.cpp: Change #include-s to C++ names.
  (TokenParser::get): Space changes and conversion to auto_ptr.
  (tparseParser::parse_rcs_admin,
   tparseParser::parse_rcs_description,
   tparseParser::parse_rcs_deltatext): Conversion to auto_ptr and exceptions.
  (tparseParser::parse_rcs_tree): Conversion to auto_ptr and exceptions. Also
  adjust for removal of Branche class.

* tparse/tparsemodule.h:  Include Python.h, since
  we,re actually using python types.

* tparse/tparsemodule.cpp (pyobject, pystring):
  New classes.  Used to anchor python objects ensuring their refcounts
  are decremented.
  (chkpy):  New.  Function to check python return value and act appropriately.
  (initparse):  Correctly anchor python strings.
  (rcstoken_to_pystring):  Removed.  Now integrated into the pystring class.
  (PythonSink):  Claim ownership for the duration of the instance lifetime.
  Also adjust all methods for the switch to exceptions.
  (tparse):  Adapt to the switch to exceptions.  Also prevent memory leakage
  when an exception occurs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1060 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-05-01 13:56:23 +00:00
dionisos cab7c9ae04 Fix problems parsing files with 0 (nul) characters in them (typically
binary files).

At the same time reduce processing time by ~50% (in my measurements).


* tparse/tparse.h: Remove deprecated (and now unused) strstream header.
  (rcstoken): New class. Used to hold parser output.
  (Branche, Sink, TokenParser): Use rcstoken class whereever char* was
  used for holding parser output.

* tparse/tparse.cpp (rcstoken::init, rcstoken::append,
  rcstoken::grow,rcstoken::copy_begin_end, rcstoken::copy_begin_len): New.
  (TokenParser::get): Change return type to rcstoken and adapt accordingly.
  (TokenParser::unget): Change argument type.
  (tparseParser::parse_rcs_admin,tparseParser::parse_rcs_tree,
   tparseParser::parse_rcs_description,
   tparseParser::parse_rcs_deltatext): Adjust to use rcstoken class.

* tparse/tparsemodule.cpp (rcstoken_to_pystring): New. Helper function
  to do token to python string transformation.
  (PythonSink): Adjust all methods to use the rcstoken class.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1059 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-30 19:09:19 +00:00
dionisos 700b9eb7ad Use 'const char *' type for exception arguments.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1058 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-30 13:23:42 +00:00
dionisos 4038b9fe96 Eliminate compile warning.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1057 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-30 12:06:31 +00:00
cmpilato 543de7e0f7 Fix Bug #1181208.
* lib/viewcvs.py
  (raw_diff): Rootpath only shows up in Subversion diffs, not CVS.  So
    look for headers in a slightly less demanding way, replacing the
    rootpath if it appears, but certainly not caching the whole diff
    in memory if it doesn't.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1056 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-18 23:35:37 +00:00
cmpilato c6cef2c309 Remove this patch. mailer.py (in Subversion /trunk) can now do ViewCVS diff
URLs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1055 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-15 16:03:22 +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 2ab8c50dd7 Lose some duplicated code.
* lib/vclib/svn_ra/__init__.py
  (_datestr_to_date): Remove, and pull in the one from vclib.svn instead.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1053 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-12 02:43:34 +00:00
cmpilato 949c6a196d Some fixes to the 'diff' view.
While this would appear to fix the problems Aaron Craven
<viewcvs@vickerscraven.net> has been seeing with respect to HTML
escaping levels of diff output, this is a fluke.  A real problem (not
addressed here) is that raw_diff() is that basically, any time
raw_diff() is called with 'parseheader' set, it is treating the whole
diff output as headers (the early outs aren't firing).  This is
broken, and rather defeats the point of attempting streamy diffs since
we're collecting the whole thing into an array in memory.

* lib/viewcvs.py
  (raw_diff): Don't forget to htmlize() headers if so requested.
  (view_diff): Use 'unidiff' as the diff format choice if asked to
    make a patch for 'side-by-side' mode.  'Unidiff' and 'context
    diff' are the only valid patch formats, as far as we are
    concerned.  Also, fix a little comment typo.  Finally, revert my
    previous change, where I added an extra MarkupPipeWrapper around
    the file object returned from raw_diff() -- this was bogus, as
    raw_diff() should have been htmlifying stuff anyway.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1052 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-12 01:37:28 +00:00
cmpilato 5fb004046a Fix a bug which caused context and unidiff output to not be properly
htmlize()'d.  Reported (with patience, thankfully) by Aaron Craven
<viewcvs@vickerscraven.net>

* lib/viewcvs.py
  (view_diff): Wrap the raw diff FP object with an htmlize()ing class.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1051 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-04-11 04:57:37 +00:00
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 bbd4c762cb * templates/docroot/images/broken.png
* templates/docroot/images/cvsgraph_16x16.png
* templates/docroot/images/cvsgraph_32x32.png
  More PNG background fixes from Jordan Russell <jr-list-2005@quo.to>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1046 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-03-01 20:25:52 +00:00
cmpilato b1d10a7f96 Jordan Russell <jr-list-2005@quo.to> was kind enough to rework some of
PNG files to have white backgrounds so that wussie browsers that don't
support PNG transparency (like Internet Explorer) can deal with them.

* templates/docroot/images/back_small.png
* templates/docroot/images/logo.png
* templates/docroot/images/text.png
  Tweaked.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1045 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-28 15:54:15 +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 ad0bc5c421 * viewcvs/templates/markup.ezt
This template was on crack.  The absence of a revision log was
  enough to turn of the display of almost all of the other interesting
  data, and turn on the display of data that was in one half redundant,
  and in the other half non-existant.  Good Lord...


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1043 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-25 15:59:20 +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
dionisos 81aaaab615 * tparse/tparse.cpp (parse_rcs_tree): Don't special case non-special case.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1041 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-20 13:15:25 +00:00
dionisos ec41758e2e Stop passing ownership of parameters into the sink.
* tparse/tparsemodule.cpp: Stop freeing parameters passed into the sink.

* tparse/tparse.cpp: Dispose of allocated memory after use.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1040 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-20 13:03:02 +00:00
dionisos 0acab473b2 Add .cvsignore file to ignore 'build/' output directory.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1039 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-20 12:36:53 +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
maxb 08cf03dbd3 tparse: A few of the smaller changes from Erik's patch, slightly extended by me.
* tparse/tparse.h (tparseParser::tparseParser, tparseParser::parse):
    Split the actual parsing out of the constructor, into a parse() function.
* tparse/tparsemodule.cpp (PythonException): Move earlier in the file.
  (tparse): Call tparseParser::parse(). Do not INCREF and then DECREF the
    parameters - our caller must by definition be holding a reference in order
    to pass the objects in, and we are finished with them before we return.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1035 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-12 13:13:25 +00:00
maxb b7482f30f5 tparse: A few cleanups. Some whitespace adjustments extracted from Erik's
big std::string-izing patch, and also toss some code I noticed was unused.

* tparse/tparse.cpp
  (Whitespace, Token_term, TokenParser::unget, tparseParser::parse_rcs_tree):
    Whitespace adjustments.
* tparse/tparsemodule.cpp (tparse): Whitespace adjustments.

* tparse/tparse.h (RCSParseError.getvalue, RCSExpected.getvalue):
    Remove some unused code, which includes one use case of the deprecated
    ostrstream class.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1034 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-12 01:50:11 +00:00
maxb af6dbf5ecd tparse: Enable compilation on gcc 3.x, sacrificing compatibility with gcc 2.x.
* tparse/tparse.h: #include <strstream>, not <strstream.h>,
    and add "using namespace std;".

* tparse/tparsemodule.cpp: Do not #include <stdiostream.h>.
  If a version of GNU C++ with the stdio_filebuf extension to the STL is
  detected, then use it to allow the passing of a filehandle from Python
  to the parser. Otherwise, throw a NotImplementedError when a filehandle
  is passed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1033 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-11 23:53:52 +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 5020756254 Add notation about the new 'template_dir' directive.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1031 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-08 16:58:47 +00:00
cmpilato da38c84d9c Move the [options] section up to just below the [general] stuffs.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1030 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-08 02:48:14 +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 0b989145a7 Minor updates to documentation.
* INSTALL
    update cvsgraph revision number and cgi directory path

* CHANGES
    mention "root_as_url_component" and fix the way a date is formatted

* website/upgrading.html
    fix stutter


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1027 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-06 19:53:17 +00:00
rey4 605109cbfd Fix page title for repository listing page
* templates/include/header.ezt


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1026 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-06 19:49:30 +00:00
cmpilato 83af4b6b3d Move the magical 'Repository Listing' option to the top of the option set.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1025 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-05 16:52:12 +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 37a8e3ee3c Document removed template variables
* website/upgrading.html


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1020 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-04 18:26:54 +00:00
rey4 d9fd8ee727 Replace dodgy os.dup calls with calls to os.dup2
* standalone.py
  (ViewCVS_Handler.run_viewcvs):
    don't duplicate file descriptors inside an assert, asserts shouldn't
    be used to handle runtime errors, only to detect logic errors, and
    anyway, the code needs to run with asserts disabled

    call dup2() instead of dup() to explicitly set the standard out,
    instead of just hoping that the standard out is the first available
    descriptor


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1019 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-02-03 13:08:59 +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