### "annotate view without syntax coloration" codepath. ###
On the 'issue-495-dev' branch: Let vclib API consumers request that
annotation data come with or without the associated text.
* lib/vclib/__init__.py
(Repository.annotate): Add optional 'include_text' parameter.
* lib/vclib/svn/svn_ra.py
(RemoteSubversionRepository.annotate): Add 'include_text' parameter
and, if False, have the annotation callback drop the text on the floor.
* lib/vclib/svn/svn_repos.py
(BlameSource.__init__): Add 'include_text' param; squirrel away the value.
(BlameSource._blame_cb): Don't keep text we're asked not to keep.
(LocalSubversionRepository.annotate): Add 'include_text' parameter,
passed to BlameSource.__init__.
* lib/vclib/ccvs/bincvs.py
(BinCVSRepository.annotate): Add 'include_text' parameter, passed to
blame.BlameSource().
* lib/vclib/ccvs/ccvs.py
(CCVSRepository.annotate): Add 'include_text' parameter, passed to
blame.BlameSource().
* lib/vclib/ccvs/blame.py
(BlameSource.__init__): Add 'include_text' param; squirrel away the value.
(BlameSource.__getitem__): Don't keep text we're asked not to keep.
* lib/blame.py
(HTMLBlameSource.__init__): Update call to repos.annotate().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/issue-495-dev@2696 8cb11bc2-c004-0410-86c3-e597b4017df7
New file to house common definitions; _item and _RCSDIFF_*
for now. Remove local definitions in the rest of modules.
* idiff.py
(sidebyside, unified): Return _RCSDIFF_NO_CHANGES type if
the generator failed to yield anything else.
(sidebyside): Add type attribute to the returned tuple so
that template can check the type.
* diff_display.ezt
(top-level): Define messages to be used if diffs cannot be
displayed. Use the definitions in all non-raw displays.
(sidebyside,unified): Handle _RCSDIFF_IS_BINARY and
_RCSDIFF_NO_CHANGES; the former is not returned yet - will
be passed to the template once properties are diffed.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2605 8cb11bc2-c004-0410-86c3-e597b4017df7
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.
* lib/compat.py
Remove as unused.
* bin/cvsdbadmin,
* bin/loginfo-handler,
* bin/make-database,
* bin/svndbadmin,
* lib/accept.py,
* lib/blame.py,
* lib/cvsdb.py,
* lib/popen.py,
* lib/query.py,
* lib/sapi.py,
* lib/vcauth/forbidden/__init__.py
* lib/vcauth/forbiddenre/__init__.py,
* lib/vcauth/svnauthz/__init__.py,
* lib/vclib/__init__.py,
* lib/vclib/ccvs/blame.py,
* lib/win32popen.py,
* tests/timelog.py
Replace explicit import and use of the 'string' module with newer constructs.
* bin/standalone.py,
* lib/viewvc.py
No longer use 'compat' module. Replace explicit import and use of
the 'string' module with newer constructs.
* lib/dbi.py
Use calender.timegm() instead of compat.timegm().
* lib/vcauth/__init__.py
Lose unused module imports.
* lib/config.py,
Replace explicit import and use of the 'string' module with newer
constructs where possible. Lose old ConfigParser patch-up code for
Python 1.5.1.
* lib/vclib/ccvs/ccvs.py
Replace explicit import and use of the 'string' module with newer
constructs where possible. Import _path_join() from bincvs, and use
it instead of a bunch of copy-and-pasted string join() statements
throughout.
* lib/vclib/ccvs/__init__.py
(cvs_strptime): Moved here from the 'compat' module.
* lib/vclib/ccvs/bincvs.py
(): No longer use 'compat' module. Replace explicit import and use
of the 'string' module with newer constructs.
(_path_join): New, used now instead of a bunch of copy-and-pasted
string join() statements throughout.
* viewvc-install
Don't use the 'compat' module any more.
Also, so some rearranging of non-critical bits.
* misc/: New directory.
* misc/py2html.py: Moved from 'lib/py2html.py'.
* misc/PyFontify.py: Moved from 'lib/PyFontify.py'.
* misc/elemx/: Moved from 'elemx/'.
* misc/tparse/: Moved from 'tparse/'.
* tools/make-release
Omit 'misc' directory from releases, too.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
the ViewVC codebase. Simplify, conjoin, remove, etc.
* lib/sapi.py
(escape): New function. *The* preferred HTML-escaping mechanism.
(Server.escape): New common Server object escape mechanism (which
uses the aforementioned escape(), of course).
(CgiServer.escape, WsgiServer.escape, AspServer.escape,
ModPythonServer.escape): Lose as unnecessary.
* lib/viewvc.py
(Request.get_form): Escape hidden form variable names and values.
(htmlify): Remove.
(): Replace all uses of cgi.escape() and htmlify() with (directly or
indirectly) sapi.escape().
* lib/query.py
(main): Use server.escape() instead of cgi.escape().
* lib/blame.py
(HTMLBlameSource.__getitem__): Use sapi.escape() instead of
cgi.escape().
* lib/idiff.py
(_mdiff_split, _differ_split): Use sapi.escape() instead of
cgi.escape().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2344 8cb11bc2-c004-0410-86c3-e597b4017df7
(make_html): Not that I think anybody actually cares, but fix this
function to generate HTML properly.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1617 8cb11bc2-c004-0410-86c3-e597b4017df7
more or less by Russell Yanofsky.
* lib/blame.py
(link_includes): Calculate include paths in such a way that '.' is
dropped and '..' is normalized. This should prevent us from
sending paths through Subversion's APIs that aren't legal (and
cause assertions to fire).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1414 8cb11bc2-c004-0410-86c3-e597b4017df7
path parameters so it is possible to use a single Repository object
to request information about any path at any revision.
Note: I wasn't able to test the svn_ra.get_location function because
I only have subversion 1.2.3.
* lib/vclib/__init__.py
(Repository.itemtype, Repository.openfile, Repository.listdir,
Repository.dirlogs, Repository.itemlog, Repository.annotate):
add rev arguments, update docstrings
* lib/vclib/bincvs/__init__.py
(CVSRepository.itemtype, CVSRepository.listdir, BinCVSRepository.openfile,
BinCVSRepository.dirlogs, BinCVSRepository.itemlog):
same
* lib/vclib/ccvs/__init__.py
(CCVSRepository.dirlogs, CCVSRepository.itemlog):
same
* lib/vclib/svn/__init__.py
(SubversionRepository.__init__):
remove rev argument
(get_location, created_rev, _get_history, get_revision_info, _fetch_log,
_get_last_history_rev, get_logs, do_diff,
SubversionRepository.itemtype, SubversionRepository.openfile,
SubversionRepository.listdir, SubversionRepository.dirlogs,
SubversionRepository.itemlog, SubversionRepository.annotate):
add rev arguments, use new _getrev and _getroot functions to handle
all revision string parsing and revision_root creation
(SubversionRepository._getrev, SubversionRepository._getroot):
new functions
* lib/vclib/svn_ra/__init__.py
(_rev2optrev):
accept integers instead of strings, and eliminate head/unspecified
revision handling which is already taken care of by _getrev
(SubversionRepository.__init__):
remove rev argument
(get_location, created_rev, get_revision_info, get_logs,
SubversionRepository.itemtype, SubversionRepository.openfile,
SubversionRepository.listdir, SubversionRepository.dirlogs,
SubversionRepository.itemlog, SubversionRepository.annotate,
SubversionRepository.rawdiff, SubversionRepository._get_dirents):
add rev arguments, use new _getrev function to handle all revision
string parsing
(SubversionRepository._getrev):
new function
* lib/blame.py
(link_includes):
update call to repos.itemtype
* tools/cvsdbadmin
(RecurseUpdate):
update call to repos.listdir
* lib/viewcvs.py
(Request.run_viewcvs):
update calls to SubversionRepository constructors and _strip_suffix
(_strip_suffix):
add rev parameter, remove redundant where parameter
(_repos_pathtype, view_markup, search_files, _get_diff_path_parts,
generate_tarball):
update calls to vclib methods
(nav_path, view_directory, view_log, setup_diff, download_tarball,
view_revision):
explicitly read 'rev' query param instead of relying on
SubversionRepository.rev, and update vclib calls
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1144 8cb11bc2-c004-0410-86c3-e597b4017df7
Strict. Changes have been made in the EZT templates, the CSS files,
HTML code embedded in the Python files as well as in the help
files. The original code structure and design is the very same. No
other improvements have been made to the browser code and it still
uses the old layout tables to create the page grid.
Apart from the XHTML/CSS code changes, the patch adds an argument (-x
x) for CVSGraph in viewcvs.py in the view_cvsgraph function to tell
CVSGraph to generate XHTML code. For Mozilla/Firefox to recognize the
id attribute in the image map generated, the content-type must be set
to application/xhtml+xml (see
https://bugzilla.mozilla.org/show_bug.cgi?id=109445). This patch does
however not change the content-type, but uses an ugly hack to make the
CVSGraph output work in Mozilla with the current text/html
content-type: a name attribute is merged into the id attribute in the
map_name defined in the cvsgraph.conf.dist file.
The XHTML code does not contain the standard XML declaration, just the
XHTML 1.0 Strict Doctype. This is to keep ViewCVS as encoding agnostic
as before and let the browser decide which encoding to use. An XML
file without the encoding declared must be interpreted as UTF-8 (or
UTF-16 if the byte order mark is included).
* viewcvs/cvsgraph.conf.dist
Add name="" hack to the 'map_name' variable so Mozilla/Firefox will work.
* viewcvs/lib/ezt.py
XHTML-ize sample output.
* viewcvs/lib/viewcvs.py
XHTML-ize hard-coded output.
(view_cvsgraph): Pass "-x x" to cvsgraph to force XHTML production.
* viewcvs/lib/blame.py
* viewcvs/lib/debug.py
* viewcvs/lib/py2html.py
* viewcvs/lib/query.py
* viewcvs/lib/vclib/bincvs/__init__.py
* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/error.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/query_form.ezt
* viewcvs/templates/query_results.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/roots.ezt
* viewcvs/templates/docroot/help_dirview.html
* viewcvs/templates/docroot/help_log.html
* viewcvs/templates/docroot/help_logtable.html
* viewcvs/templates/docroot/help_query.html
* viewcvs/templates/docroot/help_rootview.html
* viewcvs/templates/docroot/styles.css
* viewcvs/templates/include/branch.ezt
* viewcvs/templates/include/branch_form.ezt
* viewcvs/templates/include/diff_form.ezt
* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/file_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
* viewcvs/templates/include/paging.ezt
* viewcvs/templates/include/sort.ezt
* viewcvs/templates/include/view_tag.ezt
XHTML-ize hard-coded output and templatized data.
* viewcvs/CHANGES
Note this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1109 8cb11bc2-c004-0410-86c3-e597b4017df7
(link_includes): Use the more generic itemtype() interface instead of
the rcsfile() one.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1099 8cb11bc2-c004-0410-86c3-e597b4017df7
into the vclib providers.
* viewcvs/lib/vclib/__init__.py
(Repository.annotate): New interface.
* viewcvs/lib/vclib/ccvs/blame.py
New file, with contents cored from viewcvs/lib/blame.py, and
reworked a little bit to avoid data tainting, and to be independent
of the vclib implementation.
* viewcvs/lib/vclib/ccvs/__init__.py
(CCVSRepository.annotate): Implement Repository.annotate() by returning
a blame.BlameSource object.
* viewcvs/lib/vclib/bincvs/__init__.py
(BinCVSRepository.annotate) Implement by returning a
vclib.ccvs.blame.BlameSource object.
* viewcvs/lib/vclib/svn/__init__.py
* viewcvs/lib/vclib/svn_ra/__init__.py
(SubversionRepository.annotate): New. Return NotImplementedError.
* viewcvs/lib/viewcvs.py
(view_annotate): Use new blame.blame() function.
* viewcvs/lib/blame.py
Gut this sucker, moving most of the heavy lifting into the ccvs module.
(HTMLBlameSource): New wrapper for BlameSource objects to handle
HTML-izing and such.
(blame): New function, thin wrapper around
(make_html): Remove unused 'sticky' param. Tweak to use new
abstracted interface, but at the cost of diff_url support. I'll
probably come back to this (by adding a --diff-url option), but
does anyone really care?
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1098 8cb11bc2-c004-0410-86c3-e597b4017df7
* 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
* 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
* lib/viewcvs.py: add an optional escape parameter to the get_url()
method, that will entity escape the URL.
Pass escape=1 to each call to get_url() that is used to construct a
URL for display in a template.
* lib/blame.py: fix up a small entity escaping problem here too.
* templates/revision.ezt: fix up a few HTML validity errors in this
template that were a lot more obvious after clearing up the other
errors.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@918 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(view_annotate): Now use blame.BlameSource() class for doing annotations.
* viewcvs/lib/blame.py
(BlameSource, BlameSequencingError): New classes.
(make_html): Re-work to use the use BlameSource code.
* viewcvs/lib/config.py
(Config.set_defaults): No longer set self.templates.footer.
* viewcvs/viewcvs.conf.dist
(templates.footer): Removed.
* viewcvs/templates/annotate.ezt
Re-work this template to make use of the newly exposed blame data,
and the fabulous new EZT assignment commands!
* viewcvs/website/upgrading.html
Document this change.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@833 8cb11bc2-c004-0410-86c3-e597b4017df7
- remove the revision_symbolic_name since it was bogus and unused
- quote the outer table attributes for xhtml compat
- remove the unused usedlog
- change the line number formatting to simplify the width usage
(through the '*' format character) and to make the name= anchor
surround the actual number rather than empty space.
- use '*' for author formatting, too
- remove the '.diff' from the URLs
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@567 8cb11bc2-c004-0410-86c3-e597b4017df7
* Multiple imports of the same module.
* Module imported but never used.
* Variables only used once.
* Corrected deprecated modules.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@462 8cb11bc2-c004-0410-86c3-e597b4017df7
model, sending events/info to the blame script.
(this allows the RCS parser to be used in numerous contexts by simply
switching the Sink that is used)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@166 8cb11bc2-c004-0410-86c3-e597b4017df7
the "primordial" revision no longer links to the directory. the user can do
that from the navbar at the top of the page (a bit more intuitive).
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@117 8cb11bc2-c004-0410-86c3-e597b4017df7
slight change to use math.log10()
fix problem with finding the end of a @-delimited token. It didn't work
when the terminating @ was at the end of a line.
remove the CGI script stuff, but leave a direct-invocation for testing
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@103 8cb11bc2-c004-0410-86c3-e597b4017df7
despite the size of this diff, there were NO code changes. "cvs diff -b"
to see that the change was whitespace only.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@98 8cb11bc2-c004-0410-86c3-e597b4017df7
this currently operates as a CGI, but we will be integrating it as a part
of viewcvs.cgi; therefore, it is going into lib/ to become a module.
this file is "pure" Curt except for the license in the header (changed per
Curt's email to the viewcvs-dev list), and some comments about it
being maintained as part of the ViewCVS project.
[ change will progress from this snapshot ]
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@86 8cb11bc2-c004-0410-86c3-e597b4017df7