Commit Graph

764 Commits (5d0109e3254d2f981d22ebf9d5443e86190498b1)

Author SHA1 Message Date
rey4 fe995627d3 Get rid of Highlight line number workaround. Highlight 2.4.5 came out
yesterday and fixes all the issues we had with line numbering. This change
also allows ViewVC to work with old versions of Highlight all the way back
to 2.2.10.

Also, remove "highlight_style" configuration option as suggested by
Andreas Amann (aamann) in issue 126.

* INSTALL
    document new version requirements
    
* lib/viewvc.py
  (MarkupHighlight.__init__):
    stop passing --style and --line-number-start options to highlight

* lib/config.py
* viewvc.conf.dist
* viewvc.org/upgrading.html
    remove "highlight_style" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1292 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-21 22:47:11 +00:00
rey4 176ede2fef Get rid of the "derived from cvsweb" notice at the top of viewvc.py
as Greg Stein suggested in issue 167.

* lib/viewvc.py


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1291 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-20 03:39:54 +00:00
rey4 72459917f7 Restore copyright statements for Curt Hagenlocher accidentally
deleted in r1288

* lib/blame.py
* lib/vclib/ccvs/blame.py


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1290 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-20 03:27:02 +00:00
rey4 3efd3fa040 Clean for file headers and copyright notices for issue 167
* bin/asp/query.asp
* bin/asp/viewvc.asp
* bin/cgi/query.cgi
* bin/cgi/viewvc.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/make-database
* bin/mod_python/handler.py
* bin/mod_python/query.py
* bin/mod_python/viewvc.py
* bin/standalone.py
* bin/svndbadmin
* lib/accept.py
* lib/blame.py
* lib/compat.py
* lib/config.py
* lib/cvsdb.py
* lib/dbi.py
* lib/debug.py
* lib/idiff.py
* lib/popen.py
* lib/query.py
* lib/sapi.py
* lib/vclib/__init__.py
* lib/vclib/bincvs/__init__.py
* lib/vclib/ccvs/__init__.py
* lib/vclib/ccvs/blame.py
* lib/vclib/ccvs/rcsparse/__init__.py
* lib/vclib/ccvs/rcsparse/common.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/ccvs/rcsparse/default.py
* lib/vclib/ccvs/rcsparse/texttools.py
* lib/vclib/svn/__init__.py
* lib/vclib/svn_ra/__init__.py
* lib/viewvc.py
* lib/win32popen.py
* tools/make-release
* tparse/tparse.cpp
* tparse/tparse.h
* tparse/tparsemodule.cpp
* tparse/tparsemodule.h
* viewcvs-install


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1288 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 02:07:36 +00:00
rey4 f74711446f Finish issue 168, the project rename. Change is mostly based on the patch
from Gerard Gerritsen (sigcafe), with some other stuff thrown in.

* bin/asp/viewcvs.asp
* bin/asp/viewvc.asp
* bin/cgi/viewcvs-strace.sh
* bin/cgi/viewvc-strace.sh
* bin/cgi/viewcvs.cgi
* bin/cgi/viewvc.cgi
* bin/mod_python/viewcvs.py
* bin/mod_python/viewvc.py
* lib/viewcvs.py
* lib/viewvc.py
* viewcvs.conf.dist
* viewvc.conf.dist
    the file renames

* bin/cvsdbadmin
* bin/loginfo-handler
* bin/svndbadmin
* bin/asp/query.asp
* bin/cgi/query.cgi
* bin/mod_python/query.py
* bin/make-database
* bin/standalone.py
* lib/debug.py
* lib/compat.py
* lib/blame.py
* lib/vclib/ccvs/rcsparse/debug.py
* lib/vclib/bincvs/__init__.py
* lib/query.py
* lib/config.py
* lib/dbi.py
* lib/sapi.py
* INSTALL
* TODO
* cvsgraph.conf.dist
* tests/timelog.py
* tools/make-release
* tparse/tparsemodule.h
* tparse/Setup.py
* tparse/INSTALL
* tparse/tparsemodule.cpp
* tparse/tparse.h
* tparse/tparse.cpp
* windows/README
* viewcvs-install
* viewvc.org/index.html
* viewvc.org/contributing.html
* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* viewvc.org/license-1.html
    the other changes



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1287 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-18 00:33:54 +00:00
rey4 41296bf318 Avoid potential problem with pipe_cmds
* lib/popen.py
  (_pipe.close): use os.waitpid instead of os.wait to avoid messing with
    processes that dont belong us


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1286 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 20:25:34 +00:00
rey4 49d332a996 Fix error messages when a path string is passed to vclib.ItemNotFound
instead of a list of path parts. We seem to do that a few places in
the svn module.

* vclib/__init__.py
  (ItemNotFound.__init__): accept path strings as arguments


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1284 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-17 16:39:17 +00:00
cmpilato 66923a4982 * lib/viewcvs.py
(MarkupEnscript.__init__): Revert a change made in r1255 which
    tweaked the sed expression.  The goal was to try to also strip out
    the <PRE> and </PRE> tags from the output, but the expression I
    used also had the undesired effect of dropping the whole last line
    of a non-newline-terminated file.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1283 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-16 04:13:19 +00:00
cmpilato 34d32b394e Some improvements to the py2html integration. Thanks (I think...) to
David Martínez Moreno (Ender) for sending me down this path.

* lib/py2html.py
  Update to version 0.8.  Patch by David Martínez Moreno <ender@debian.org>.

* lib/viewcvs.py
  (markup_stream_python):  Call PrettyPrint.set_mode_rawhtml_color().

* lib/PyFontify.py
  Rework this file to use spaces instead of tabs.  Use the 're' module
  instead of 'regex'.  Fix a bug which caused "raise" to not be
  noticed as a keyword (though "rais" would be).  Add "assert" and
  "exec" to the keywords list.

* templates/docroot/styles.css
  Reformat the highlight styles, and made the .kwd style have a little color.
  Also, add the styles that py2html uses.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1282 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-13 19:56:31 +00:00
cmpilato 5912f400e6 Make py2html.py executable (it has a shell script mode).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1280 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-13 15:31:48 +00:00
cmpilato a2db8718cf Make some fixes to the pipe handling code to avoid zombie processes.
Patch by Paul Sokolovsky <psokolovsky@vasoftware.com>.

* lib/popen.py
  (pipe_cmds): Instead of storing only the process ID of the last
    child process in a multi-process pipe, keep them all, and wait on
    them all to finish.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1278 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-03-07 14:57:27 +00:00
cmpilato 7aaf4dc8b7 Finish issue #215.
* lib/viewcvs.py
  (view_markup): Ensure initialization of variables when show_log_in_markup
    is disabled.

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1270 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-27 14:07:07 +00:00
rey4 10ff60245b Fix bug from r1266 in integrated query view reported by
Larry Silverman <cerulean47@gmail.com> on the users
list.

* lib/viewcvs.py
  (build_commit): handle the case where dir_strip is ""


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1267 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-25 16:52:24 +00:00
rey4 d8224da3c4 Make the integrated query page work when the repository directory
entered in cvs_roots is a subdirectory of a cvs root rather than a
top-level root directory.

Also, raise an exception when a repository being queried doesn't
exist in the database instead of returning 0 matches.

* lib/cvsdb.py
  (FindRepository): new
  (CleanRepository): add docstring

* lib/viewcvs.py
  (build_commit): strip off top-level directory paths from query results
    when the configured root is a subdirectory of the database root
  (view_query): call cvsdb.FindRepository and use information returned
    to convert paths relative to configured root to database paths



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1266 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-22 04:26:54 +00:00
rey4 f062872f9a Fix crippling bug in query.cgi reported by John L. Villalovos
<john@linux.intel.com> on the users list.

* lib/query.py
  (build_commit): set 'commits.log' template var instead of 'commits.desc'


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1265 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-18 15:38:28 +00:00
rey4 757e115829 Restore highlight "line-number-start" option. Quoth Andreas Amann
(aamann) in issue 126:

  "the --line-number-start is needed as of 2.4.2 (latest is 2.4.3)
  otherwise line numbers will start at 0 instead of 1"

* lib/viewcvs.py
  (MarkupHighlight.__init__):
    update highlight command line


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1264 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-16 18:24:11 +00:00
cmpilato 9803cd5958 Finish issue #178 -- remove references to symbolic revisions in
instructions for Subversion diffs.

* lib/viewcvs.py
  (setup_diff): Call repos._getrev() on the diff input revisions so
    'HEAD' gets resolved to a number.

* templates/include/diff_form.ezt
  Use tag-existence-aware instructions on the diff-form.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1260 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 22:09:54 +00:00
cmpilato 2134d1f657 Finish issue #174 -- markup view of HEAD shows HEAD metadata, but
uses last-changed-rev for other display markings.

* lib/viewcvs.py
  (view_markup): Use the resolved revision instead of the input
    revision when fetching metadata.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1257 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 21:28:34 +00:00
cmpilato c2434be105 Finish issue #210. Patch by Gerard Gerritsen <sigcafe@tigris.org>,
tweaked by me.

* lib/viewcvs.py
  (Request.run_viewcvs): Handle requests for [rootname]-root.tar.gz
    specially as tarball download views of the root of the repository.
  (Request.get_link): If we are prepping a URL for tarball generation
    on the root of a repository, use the filename [rootname]-root.tar.gz
    instead of just root.tar.gz.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1256 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 20:39:15 +00:00
cmpilato 59d97089e1 Finish issue #212 -- XHTMLify the highlight integration.
* lib/viewcvs.py
  (MarkupEnscript.__init__): Have sed strip the <PRE> wrappers around
    enscript output, too.
  (MarkupHighlight.__init__): Drop the --line-number-start and
    --include-style options to highlight; add --xhtml and --fragment.
    Lose the 'sed' invocation too, as it is no longer necessary.
  (view_markup): No longer pass '<pre>' and '</pre>' to the
    MarkupPipeWrapper() call -- the template will handle that.

* templates/markup.ezt
  Add <pre>...</pre> wrappers around the markup stream.  Also, name
  that whole <div> "vc_markup".

* template/docroot/styles.css
  Embed the highlight stylesheet.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1255 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-14 20:13:00 +00:00
cmpilato 09bddb189a Require Subversion 1.2.0 or better for the 'svn' module.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1253 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-13 22:26:39 +00:00
rey4 1f416a919f Fix EZT callback implementation so along with being able to write raw data
to the output, callbacks can also write formatted output (controlled by
[format] directives.) EZT now passes Context object arguments to callbacks
instead of file pointers, so more functionality can be exposed to Callbacks
in the future without loss of backwards compatibility.

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

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

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


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1252 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-10 04:24:12 +00:00
cmpilato 4a85813c24 * viewvc/lib/vclib/svn/__init__.py
(BlameSourceKludge): Remove.
  (SubversionRepository.annotate): Go back to using BlameSource --
    Russell fixed it in r1236.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1251 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-09 18:41:34 +00:00
cmpilato d28ec94d3c * viewvc/lib/idiff.py
(_item.__init__): Call update() with the proper argument.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1249 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-06 18:30:10 +00:00
rey4 a6391ce319 Fix HTML escaping in new unified diff view
* lib/idiff.py (_differ_split)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1247 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-05 18:26:46 +00:00
rey4 1700dcd3c8 Implement trac-style unified diffs (with line numbers along the side
and intraline changes highlighted). This feature requires Python 2.2
and is disabled by default.

* templates/diff.ezt
    add table for highlighted unified diffs

* lib/idiff.py
  (unified, _trim_context, _differ_split): new

* lib/viewcvs.py
  (view_diffs): set new "unified" template var on diff page


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1246 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-05 17:32:44 +00:00
rey4 52b8b89883 Add rudimentary support for intraline diffs. Implementation is pretty
clean, but it doesn't provide all the bells and whistles of our normal
diff interface. It's disabled by default and requires python 2.4 to
run.

* templates/docroot/styles.css: 
    add new styles

* templates/diff.ezt:
    add table for intraline diffs

* lib/config.py:
* viewcvs.conf.dist
    add new "hr_intraline" option

* lib/vclib/svn/__init__.py
  (FileContentsPipe.readline): prevent from returning "" before eof and
    from stripping out newlines
  (FileContentsPipe.readlines): new
  
* lib/idiff.py
    new

* lib/viewcvs.py
  (view_diff): set new "sidebyside" template variable



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

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


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1243 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 22:21:47 +00:00
rey4 f24f6e5119 Fix issue 204, 'Invalid "Repository Listing" location' reported by
Erik C. Thauvin (ethauvin)

* lib/viewcvs.py
  (Request.get_link):
    return "/" instead of "" when generating top level links


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1242 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-04 19:54:34 +00:00
rey4 c4edb250aa Rename ndiff.py and difflib.py modules, which are only provided for
python 1.5 compatibility.

* lib/difflib.py
* lib/ndiff.py
* lib/compat_ndiff.py
* lib/compat_difflib.py
    rename 

* viewcvs-install
    update ndiff invocation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1241 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-03 05:16:29 +00:00
rey4 68673daba3 Allow CVS roots to be specified as root_parent directories, that way
ViewVC can list CVS modules alongside Subversion repositories.

* lib/viewcvs.py
  (load_config): include modules in CVS root_parent directories (not just
    roots) in repository list


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1239 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-02-01 00:34:24 +00:00
rey4 8afaca5f75 Fix mismatch between config.py and config file
* lib/config.py
  (Config.set_defaults): set "php_exe_path" instead of "php_path"


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1238 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-31 19:15:52 +00:00
rey4 42b55eb5f9 Improve error reporting when svn blame fails. Also fix some bugs in
BlameSource. Maybe now we don't need BlameSourceKludge anymore...

* lib/vclib/svn/__init__.py
  (BlameSource.__init__): add missing first_rev parameter
  (BlameSource.__getitem__): remove check for fp.eof() which may
    return true when the process has finished executing but data
    can still be read from the pipe
  (BlameSource.__getitem__, BlameSourceKludge.__getitem__):
    use regex to parse blame info so we can show a detailed error
    message instead of just an exception when split() or int() fail

* lib/popen.py
  (_pipe.eof): add note about implementation problem


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1236 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-22 17:01:02 +00:00
cmpilato f88451caaa Finish issue #34 by making annotation lines bookmarkable, and linking
to them from the diff page.

* viewvc/templates/annotate.ezt
  Make each row bookmarkable.

* viewvc/templates/diff.ezt
  Make line numbers into links to the annotate page.

* viewvc/lib/viewcvs.py
  (view_diff): Add an annotate_href to the data dictionary.

* viewvc/viewvc.org/template-authoring-guide.html
  (variables-diff): Document new annotate_href and changes.line_number
    variables.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1235 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 13:08:54 +00:00
cmpilato 695dd93b47 Implement support for line numbers in the diff view.
* viewvc/lib/viewcvs.py
  (DiffSource.__init__): Initialize a new line_number member.
  (DiffSource._get_row, DiffSource._flush_row): Calculate line number
    information from the diff output.

* viewvc/templates/diff.ezt
  Show line numbers with the diff, and make those line numbers
  bookmarkable (for sub-page granularity).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1234 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 12:44:34 +00:00
cmpilato d3358ad705 Really finish issue #177. Fix a little bug with the bugfix done in r1232.
* viewvc/lib/vclib/svn/__init__.py
  (SubversionRepository.annotate): Always cross copies when looking
    for the first and last revisions in the file's history.  Duh.  



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1233 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 09:26:19 +00:00
cmpilato d1d1b73cde Finish issue #177.
Fix a bug with Subversion annotate views which allowed the first
revision of a file's life to be a link to a diff against a
non-existent path/rev location.

NOTE: This doesn't fix the problem for remote repositories (accessed
      via the svn_ra module).

* viewvc/lib/vclib/svn/__init__.py
  (_get_history):  Make 'options' optional.
  (BlameSource.__init__, BlameSourceKludge.__init__):  Accept new
    first_rev parameter which is the first revision in the history of
    the file.
  (BlameSource.__getitem__, BlameSourceKludge.__getitem__):  Don't
    store a 'prev' revision that's older than the first revision of
    the file.
  (SubversionRepository.annotate): Instead of using _get_last_history_rev(), 
    call_get_history() to find both the first and the last revision in
    the file's history.  Update call to BlameSourceKludge().



git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1232 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-21 06:54:04 +00:00
rey4 11174518d5 Fix mod_python issue, #188 reported by Andreas Amann (aamann).
* lib/viewcvs.py
  (generate_page): pass file object associated with current request
   to EZT instead of sys.stdout, which under mod_python is a proxy
   that tries to figure out the current request based on the current
   thread id. It can't be used in worker threads spawned by
   popen.pipe_cmds


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1229 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-18 01:34:11 +00:00
cmpilato 1f40fe9094 * viewvc/viewcvs.conf.dist (enscript_path),
* viewvc/lib/config.py (Config.set_defaults)
  Set use_highlight to 0 by default, so that the default configuration
  has a mildly higher chance of not being broken out of the box.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1228 8cb11bc2-c004-0410-86c3-e597b4017df7
2006-01-17 01:43:12 +00:00
rey4 ed6a269934 Resolve issue 147 "patch for aix co." Patch by sourceforge user
coshx.

* lib/vclib/bincvs/__init__.py
  (_re_co_filename): broaden regex


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1225 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-30 07:30:45 +00:00
rey4 0a889562f3 Use built in enscript file detection. This is an updated implementation
of an patch from Andreas Amann (sf user ahndee) in issue 156.

* lib/viewcvs.py
  (MarkupShell.__call__): make input file pointer optional
  (MarkupEnscript.__init__, MarkupEnscript.__call__): write input to
    temporary file so enscript can decide what kind of highlighting to do
    based on the file name
  (enscript_extensions, enscript_filenames): removed
  (view_markup): update call to MarkupEnscript

* lib/compat.py
  (mkdtemp): new function

* lib/config.py
* viewcvs.conf.dist
* viewvc.org/upgrading.html
    remove "disable_enscript_lang" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1224 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-30 07:29:22 +00:00
rey4 0467a8e1d1 Fix exception in tarball view for CVS repositories when
use_rcsparse is enabled.

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs): set DirEntry.path member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1221 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 15:08:27 +00:00
rey4 360c5d9e66 Make popen.pipe_cmds() accept an "out" argument that controls where
output from last command goes. For now only the unix implementation
respects it, windows implementation always writes to standard output
as before.

* lib/popen.py
  (pipe_cmds): add "out" argument

* lib/viewcvs.py
  (MarkupShell.__call__): update call to pipe_cmds()


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1220 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-29 14:49:42 +00:00
rey4 2d808ae415 Add limit_changes configuration option to limit the number of changed
paths shown in the subversion revision view and in query results.

* lib/config.py
* viewcvs.conf.dist
    add "limit_changes" option

* lib/cvsdb.py
  (LazyCommit): new class
  (CheckinDatabase.LazyCommit): return LazyCommit objects instead of
    fetching all properties of all commits

* lib/viewcvs.py
  (_sticky_vars, _legal_params): add "limit_changes" query parameter
  (view_revision): handle "limit_changes" and add links to manipulate it
  (view_queryform, build_commit, view_query): same

* templates/query_form.ezt
    add field to set "limit_changes"

* templates/query_results.ezt
    wherever changed files are being hidden, add link to show all files

* templates/revision.ezt
    same, and if that link is clicked, show another link to restore
    the default limit_changes so you can toggle back and forth

* viewvc.org/template-authoring-guide.html
* upgrading.html
    document new template variables and configuration option
  


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1218 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-23 13:24:26 +00:00
rey4 1c87fc7fa7 Fix issue 104 "ViewCVS Broken on WinNT" with patch provided by
sourceforge user "tomy"

* lib/win32popen.py
    don't import win32security, not needed and doesn't work on NT4


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1215 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 17:04:44 +00:00
rey4 5e595215ec Documentation updates & template cleanups for recent changes.
* lib/viewcvs.py
  (common_template_date):
    only set "rss_href" when it will be valid URL

  (build_commit):
    only set commits.rev for subversion queries

    rename some of the new RSS template variables
      commits.title -> commits.short_log
      commits.url -> commits.rss_url
      commits.date -> commits.rss_date
  
* templates/include/header.ezt
* templates/rss.ezt
    update for changed template variables

* viewvc.org/template-authoring-guide.html
* viewvc.org/upgrading.html
* CHANGES
    update documentation


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1214 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 16:55:26 +00:00
rey4 dabb055603 Add RSS capability to ViewVC using patch from Paul Koning (pkoning)
in issue 179. (All changes are his except for a fix in standalone.py,
and a line initializing "commits.url" template variable to None
in build_commit).

* lib/config.py
* viewcvs.conf.dist
    add [cvsdb] rss_row_limit config option

* lib/cvsdb.py:
  (CheckinDatabase.CreateSQLQueryString): make "LIMIT" value customizable
  (CheckinDatabaseQuery.__init__): set new "limit" member
  (CheckinDatabaseQuery.SetLimit): new

* lib/viewcvs.py:
  (_legal_params): add "limit" parameter
  (common_template_data): add "rss_href" variable
  (make_rss_time_string): new
  (build_commit): add commits.title, commits.rev, commits.author,
    commits.date, commits.url template variables
  (view_query): handle "limit" parameter and new "rss" format

* templates/include/header.ezt
    use new rss_href variable

* templates/rss.ezt
    new

* bin/standalone.py
  (run_viewcvs): set HTTP_HOST environment variable
 


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1212 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 05:16:23 +00:00
rey4 9aef5f5ad6 Add "port" option to connect to specified mysql port.
Patch written by sunjammerx in issue 106.

* lib/config.py
  (Config.set_defaults):
    set default port

* lib/cvsdb.py
  (CheckinDatabase.__init__, ConnectDatabaseReadOnly, ConnectDatabase):
     handle port value

* lib/dbi.py
  (connect):
    same

* INSTALL
* viewcvs.conf.dist
    update


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1211 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-22 03:07:31 +00:00
rey4 053658384c Make "Revision Log" links on markup, annotate and diff pages
jump to the current revision on the log page, like they used
to in 0.9.x. This patch by Jordan Russell <jr-list-2005@quo.to>
from issue 109.

* lib/viewcvs.py
  (common_template_data):
    set "log_rev_href" template variable

* templates/include/file_header.ezt
    use "log_rev_href" template variable

* viewvc.org/template-authoring-guide.html
    update


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1210 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-21 20:45:11 +00:00
rey4 93c239a2af Fix issue 181, query results groups subversion commits from different
revision numbers. Patch by Paul Koning (pkoning)

* lib/viewcvs.py
  (view_query):
    when roottype != cvs, only group commits from same revision


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1209 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-21 15:18:45 +00:00