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
links between ViewCVS pages are now constructed by a new Request
method called "get_link," and all URL parsing happens in another new
Request method called "run_viewcvs."
I also added support for a new optional parameter called "view." It
provides a more uniform way of linking to ViewCVS pages, so you can
say
/viewcvs/dir/file.txt?view=log
/viewcvs/dir/file.txt?view=co
/viewcvs/dir/file.txt?view=annotate
/viewcvs/dir/file.txt?view=markup
instead of
/viewcvs/dir/file.txt
/viewcvs/*checkout*/dir/file.txt
/viewcvs/dir/file.txt?annotate=head
/viewcvs/dir/file.txt?rev=HEAD&content-type=text/vnd.viewcvs-markup
Changes which are not backwards compatible had to be made to some
template files. Old templates will not work with the new code.
* templates/include/branch_form.ezt:
* templates/include/diff_form.ezt:
* templates/include/paging.ezt:
* templates/include/sort.ezt:
* templates/diff.ezt:
changed to use form action and hidden fields provided by the script
* templates/directory.ezt: got rid of relative urls, changed to use
form action and hidden fields provided by the script
* templates/graph.ezt: changed to take image path from the script
* templates/header.ezt: got rid of "qquery" variable
* templates/log.ezt: changed the way diff and annotate links get
constructed
* lib/viewcvs.py (Request.__init__): moved out url parsing stuff into
new "run_viewcvs" method.
(Request.run_viewcvs): new Request method to hold all url parsing
code and replace the global function with the same name.
(Request.get_url, Request.get_link): new methods to construct urls
for ViewCVS pages. Most of the hyperlinks that appear in generated
pages are now made by these functions.
(get_up_path): turned off special handling of attic directory for
subversion, switched names of regular expressions
(_legal_params, _validate_param, _validate_root): added new 'view'
parameter, turned off separate validation for root parameter
(_re_validate_revnum): allow empty string to be specified as a
revision number. needed to prevent validation error when doing a
regular expression search on the cvs trunk (which sets
only_with_tag to "")
(_strip_suffix, _repos_pathtype): added some new helper functions
(sticky_query, toggle_query, download_url): removed these functions,
Request.get_url() is now used instead.
(clickable_path, prep_tags, augment_entry): changed signatures and
implementations to use Request.get_url
(is_viewable, is_viewable_image): changed is_viewable() to
is_viewable_image() to avoid overlap in functionality with is_text()
(nav_header_data): got rid of 'qquery' template parameter, changed
'file_url' to use an absolute pathname instead of a relative one
(view_auto): new function that marks up the current file if it is
viewable, otherwise downloads it. called when a user clicks on the
revision numbers in directory listings.
(view_markup, markup_stream): renamed markup_stream to view_markup
and changed signature
(get_file_data_svn): no longer tries to generate physical pathnames
for subversion files since the values it did generate were
meaningless and were ignored anyway.
(get_file_data): changed docstring
(prepare_hidden_values): changed signature
(view_directory, view_directory_cvs, view_directory_svn): factored
out some of the common parts of view_directory_cvs and
view_directory_svn functions into a new function called
view_directory. implementations were also changed to use new get_url
and get_link functions
(view_log, view_log_cvs, view_log_svn): ditto
(process_checkout): changed signature and moved in support for
subversion
(view_checkout, search_files): changed implementations to deal with
new url handling, and the changes to process_checkout.
(view_annotate, human_readable_diff, download_tarball): changed to
use new url methods
(view_cvsgraph): changed signature to be consistent with
view_checkout, view_annotate, view_markup, etc. Added new template
parameter 'imagesrc' so the graph url doesn't have to
be hardcoded in the template.
(cvsgraph_image, view_cvsgraph_image): renamed cvsgraph_image to
view_cvsgraph_image and changed its signature (also for consistency
with the other view_* functions).
(_views, _view_codes): new dictionary objects mapping "view"
parameter values to functions that produce various viewcvs pages.
(handle_config): got rid of global "default_settings" dictionary
(run_viewcvs): replaced by Request.run_viewcvs
(main): now calls Request.run_viewcvs()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@667 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/include/branch_form.ezt
* templates/include/diff_form.ezt
* templates/include/sort.ezt
Use an action="" value in these forms that can deal with both states
of the root_as_url_component option.
* lib/viewcvs.py
(view_log_cvs, view_log_svn): Add 'current_root' to the data
dictionary. This is "just because", not really related to the bugfix.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@662 8cb11bc2-c004-0410-86c3-e597b4017df7