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
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
default templates. We already say "CVS Repositories" and
"SVN Repositories" inside the drop down box, so we might as well
use same term outside. Also, "Root" has a specific meaning in CVS
(a top level directory containing a CVSROOT folder, a bunch of
modules, and no files) and CVS repositories in the drop down box
are not necessarily CVS roots.
* templates/include/header.ezt
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1240 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
* viewvc.org/contributing.html
Update the downloading and Subversion checkout instructions. Also, provide
a link to the nightly builds.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1237 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
hiding the project info box on the webpage which doesn't also have the
unfortunate side effect of losing the links for project editing,
requesting membership, and other such useful things.
* index.html
Lose a JavaScript redirect hack for a style override hack.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1230 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
dynamically fake a non-root location for a running ViewVC process.
Reasoning? It offends me that "viewcvs" was hardcoded in ... just
seems wrong.
* bin/standalone.py
(Options): Populate a new script_alias member.
(StandaloneServer.do_POST, StandaloneServer.is_viewcvs,
StandaloneServer.redirect, StandaloneServer.run_viewcvs): Use
options.script_alias instead of a hardcoded "viewcvs".
(cli): Parse new --script-alias/-s option for dynamically defining
the ScriptAlias. Rework the usage message for my own pleasure.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1227 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
and bug report by Gerard Gerritsen (sigcafe).
* viewcvs.conf.dist
fix typos and old reference to dir_alternate in comments
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1222 8cb11bc2-c004-0410-86c3-e597b4017df7