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
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
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
* 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
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
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
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
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
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
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
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
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
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
* 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
* 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
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
* 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
* 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
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
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
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
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
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
* 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
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
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
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
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