C. Michael Pilato in dev-list discussion.
I wanted to knock this out this weekend, but didn't get too far. One
more weekend should be enough though, and I welcome any feedback, especially
ideas on how to organize it better.
* viewvc.org/url-reference.html
new
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1294 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewvc-install: Move introductory info printing after argument passing, so
that it is not shown if there is an argument parsing error.
Catch GetoptError, and report nicely.
Do not pass None to getopt where it wants a string.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1293 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* 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
individual modules or directories underneath a cvs root. It will
now crawl up the directory path looking for a CVSROOT directory
so it can use the right path for the "repositories" table and
allow results to show up in queries
* bin/cvsdbadmin
(RootPath): new
(__main__ section): use RootPath to find correct cvs roots
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1285 8cb11bc2-c004-0410-86c3-e597b4017df7
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
(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
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
* bin/cvsdbadmin
Minor spelling and whitespace fixes. Patch by David Martínez
Moreno <ender@debian.org>.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1281 8cb11bc2-c004-0410-86c3-e597b4017df7
(handle_revision): Add 'verbose' parameter, and use it.
(main): Add 'verbose' parameter, and pass it off to handle_revision().
(usage): Update the usage message (and make it a little more ... useful).
(__main__): Look for the -v (verbose) flag.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1279 8cb11bc2-c004-0410-86c3-e597b4017df7
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
Robert Spier <rspier@pobox.com> from the dev list.
* bin/mod_python/viewcvs.py
(index): load_config needs a sapi object to properly handle vhosts
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1272 8cb11bc2-c004-0410-86c3-e597b4017df7
Check for existence of date, ago, and author before displaying them or their
surrounding text. This is a follow-up to r1270.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1271 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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
<rooneg@electricjellyfish.net> pointed it out on the
dev list.
* bin/mod_python/viewcvs.py
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1269 8cb11bc2-c004-0410-86c3-e597b4017df7
Yahor Sinkevich (_tom) made me do it.
* viewcvs-install
(install_tree): dont copy "_svn" directories
* windows/README
say up front that binary subversion bindings may tie you to a
specific version of python. also make it clear that ViewVC
doesn't need CVSNT to browse Subversion repositories
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1268 8cb11bc2-c004-0410-86c3-e597b4017df7
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
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
<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
(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
repository when root_as_url_component is disabled.
* bin/standalone.py
(StandaloneServer.is_viewcvs): Allow '?' as a path terminating
character (just like '/') when checking to see if the input path is
under ViewVC's control.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1263 8cb11bc2-c004-0410-86c3-e597b4017df7
(InstallFile): Whitespace tweak.
(install_tree): Tweak text of installer prompts to assist folks with
the somewhat obscure idea of DESTDIR.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1262 8cb11bc2-c004-0410-86c3-e597b4017df7
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
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
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
* 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
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
(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
Andreas Amann (aamann) using patch he provided.
* templates/diff.ezt
* templates/annotate.ezt
put a letter in front of id tags that begin with numbers
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1248 8cb11bc2-c004-0410-86c3-e597b4017df7
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