viewvc-4intranet/templates/diff.ezt

235 lines
8.1 KiB
Plaintext
Raw Normal View History

[# setup page definitions]
[define page_title]Diff of /[where][end]
[define help_href][docroot]/help_rootview.html[end]
[# end]
[include "include/header.ezt" "diff"]
[include "include/file_header.ezt"]
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<h3 style="text-align:center;"></h3>
Instead of sending colored diffs to the diff.ezt template, and raw diffs to their own text/plain output, templatize all diffs. By default now, all diffs will go through diff.ezt (which has been updated to handle it). Only if the new 'makepatch' boolean CGI flag is set will diffs be sent directly as text/plain, non-templatized output. * viewcvs/lib/viewcvs.py (_legal_params): Add new 'makepatch' boolean parameter. (check_freshness): Fix a speeling eror. (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it. (human_readable_diff): Lose the 'request', 'sym1', and 'sym2' parameters. Now return the parsed dates and DiffSource object instead of populating a data dictionary and completely generating the page. (spaced_html_text): Use an intermediate variable for readability. (raw_diff): New. (view_diff): Honor the new 'makepatch'. Update calls to human_readable_diff(), and make use of raw_diff(). Do all page generation for diffs here now. Adds a new 'raw_diff' data dictionary item, useful for testing raw vs. colored, as well as for positioning that raw diff output in the template. * templates/diff.ezt Use the new 'raw_diff' data dictionary item to position raw diff output in the template. Update the diff form to allow for the generation of traditional "patch-ish" raw diff output. * templates/include/diff_form.ezt Allow for the generation of traditional "patch-ish" raw diff output. * website/styles.css (vc_raw_diff): New style class. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 18:37:11 +04:00
[if-any raw_diff]
<pre class="vc_raw_diff">[raw_diff]</pre>
[end]
[if-any changes]
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<table cellspacing="0" cellpadding="0">
<tr class="vc_diff_header">
<th style="width:6%;"></th>
<th style="width:47%; vertical-align:top;">
New URL scheme for Subversion. The problem with the old scheme is it doesn't have a concept of a "sticky" revision. So if you are looking at version 10 of a directory, and click to view a file inside which was last modified in version 6, the fact you were looking at version 10 of the parent directory is not recorded anywhere, and the "Parent Directory" links on the markup page will take you to a version 6 directory listing instead of the listing you came from. This problem exists all over ViewCVS, not just in directory listings, and the result of it is that when you browse a repository by following the provided links you get sent further and further back into the history, all the while seeing incomplete log pages and outdated directory listings which you never asked for. The new URL scheme works by introducing a new 'pathrev' sticky variable and is described in detail in a comment in the _orig_path function in lib/viewcvs.py. The scheme is not backwards compatabile with all (or maybe even most) old subversion URLs. Specifically, any old URL referring to a path that no longer exists in the HEAD will not work. Other subversion URLs will still work. It is still possible to add backwards compatibility. We'd have to rename the rev parameter to something else, so we could know that all URLs with 'rev' in them are old style URLs which need to be redirected. I don't know if it's worth doing this though. This is not an isolated change. I've tried to unite the Subversion "sticky revision" with the present "only_with_tag" logic for CVS. And since I had to go over viewcvs.py with a fine-toothed comb implementing these things, there are also some miscellaneous cleanups there. * lib/vclib/bincvs/__init__.py (_file_log): change filtering so when matching revisions to tag, includes all preceding revisions, not just tag revision itself * lib/viewcvs.py (_sticky_vars): 'only_with_tag' is gone, so change this back into a list with no span-roots values (request.run_viewcvs): read new 'pathrev' parameter and use it when calling repos.itemtype (request.get_link): add 'pathrev' parameter to urls, restore update _sticky_vars loop (_legal_params, prep_tags, build_commit): replace 'only_with_tag' with 'pathrev' (_orig_path): new function (nav_path, common_template_data): stop adding 'rev' parameters to links removed unused 'roots_href' template variable (nav_header_data): add new 'revision_href', 'orig_path', 'orig_href' template variables for use in markup and annotate views (view_markup, view_checkout, view_annotate, setup_diff, generate_tarball, download_tarball): use 'pathrev' when looking up file revision (view_directory): use 'pathrev' when looking up directory revisions instead of 'rev'. stop adding 'rev' to links. add template variables: pathrev, pathrev_action, pathrev_hidden_values. remove unused template variables: num_files, rev, view_tag, has_tags, main_href, jump_rev_action, jump_rev_hidden_values, row.show_log. (view_log): use 'pathrev' to retrieve log information instead of 'rev'. stop linking to original paths of copied files. add template variables: entry.orig_path, entry.orig_href, default_branch, pathrev, pathrev_action, pathrev_hidden_values, branch_tags, plain_tags. remove template variables: entry.filename, entry.prev_path, branch, path_selected, view_tag, branch_names, branch_select_action, branch_select_hidden_values. (view_cvsgraph): use common_template_data instead of nav_header_data, 'pathrev' instead of 'only_with tag' (view_diff): use common_template_data instead of nav_header_data add template variables: path_left, path_right (view_revision): use 'pathrev' instead of 'rev' in links * templates/include/dir_header.ezt rearrange header and add sticky tag/revision row * templates/include/dir_footer.ezt remove tag selector * templates/include/pathrev_form.ezt new, sticky tag/revision selector form based on code from dir_footer.ezt * templates/include/branch.ezt * templates/include/branch_form.ezt * templates/include/view_tag.ezt removed * templates/include/log_header.ezt new, based on branch.ezt and view_tag.ezt * templates/include/log_footer.ezt new * templates/include/log.ezt * templates/include/log_table.ezt include log_header.ezt and log_footer.ezt * templates/include/annotate.ezt * templates/include/diff.ezt * templates/include/markup.ezt show original paths and add view_revision links * cvsgraph.conf.dist replace only_with_tag parameter with pathrev * website/template-authoring-guide.html update template variable information git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1145 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-03 16:31:02 +03:00
[is path_left path_right][else][path_left][end]
revision [rev_left], [date_left]
[if-any tag_left]<br />Tag: [tag_left][end]
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
</th>
<th style="width:47%; vertical-align:top;">
New URL scheme for Subversion. The problem with the old scheme is it doesn't have a concept of a "sticky" revision. So if you are looking at version 10 of a directory, and click to view a file inside which was last modified in version 6, the fact you were looking at version 10 of the parent directory is not recorded anywhere, and the "Parent Directory" links on the markup page will take you to a version 6 directory listing instead of the listing you came from. This problem exists all over ViewCVS, not just in directory listings, and the result of it is that when you browse a repository by following the provided links you get sent further and further back into the history, all the while seeing incomplete log pages and outdated directory listings which you never asked for. The new URL scheme works by introducing a new 'pathrev' sticky variable and is described in detail in a comment in the _orig_path function in lib/viewcvs.py. The scheme is not backwards compatabile with all (or maybe even most) old subversion URLs. Specifically, any old URL referring to a path that no longer exists in the HEAD will not work. Other subversion URLs will still work. It is still possible to add backwards compatibility. We'd have to rename the rev parameter to something else, so we could know that all URLs with 'rev' in them are old style URLs which need to be redirected. I don't know if it's worth doing this though. This is not an isolated change. I've tried to unite the Subversion "sticky revision" with the present "only_with_tag" logic for CVS. And since I had to go over viewcvs.py with a fine-toothed comb implementing these things, there are also some miscellaneous cleanups there. * lib/vclib/bincvs/__init__.py (_file_log): change filtering so when matching revisions to tag, includes all preceding revisions, not just tag revision itself * lib/viewcvs.py (_sticky_vars): 'only_with_tag' is gone, so change this back into a list with no span-roots values (request.run_viewcvs): read new 'pathrev' parameter and use it when calling repos.itemtype (request.get_link): add 'pathrev' parameter to urls, restore update _sticky_vars loop (_legal_params, prep_tags, build_commit): replace 'only_with_tag' with 'pathrev' (_orig_path): new function (nav_path, common_template_data): stop adding 'rev' parameters to links removed unused 'roots_href' template variable (nav_header_data): add new 'revision_href', 'orig_path', 'orig_href' template variables for use in markup and annotate views (view_markup, view_checkout, view_annotate, setup_diff, generate_tarball, download_tarball): use 'pathrev' when looking up file revision (view_directory): use 'pathrev' when looking up directory revisions instead of 'rev'. stop adding 'rev' to links. add template variables: pathrev, pathrev_action, pathrev_hidden_values. remove unused template variables: num_files, rev, view_tag, has_tags, main_href, jump_rev_action, jump_rev_hidden_values, row.show_log. (view_log): use 'pathrev' to retrieve log information instead of 'rev'. stop linking to original paths of copied files. add template variables: entry.orig_path, entry.orig_href, default_branch, pathrev, pathrev_action, pathrev_hidden_values, branch_tags, plain_tags. remove template variables: entry.filename, entry.prev_path, branch, path_selected, view_tag, branch_names, branch_select_action, branch_select_hidden_values. (view_cvsgraph): use common_template_data instead of nav_header_data, 'pathrev' instead of 'only_with tag' (view_diff): use common_template_data instead of nav_header_data add template variables: path_left, path_right (view_revision): use 'pathrev' instead of 'rev' in links * templates/include/dir_header.ezt rearrange header and add sticky tag/revision row * templates/include/dir_footer.ezt remove tag selector * templates/include/pathrev_form.ezt new, sticky tag/revision selector form based on code from dir_footer.ezt * templates/include/branch.ezt * templates/include/branch_form.ezt * templates/include/view_tag.ezt removed * templates/include/log_header.ezt new, based on branch.ezt and view_tag.ezt * templates/include/log_footer.ezt new * templates/include/log.ezt * templates/include/log_table.ezt include log_header.ezt and log_footer.ezt * templates/include/annotate.ezt * templates/include/diff.ezt * templates/include/markup.ezt show original paths and add view_revision links * cvsgraph.conf.dist replace only_with_tag parameter with pathrev * website/template-authoring-guide.html update template variable information git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1145 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-11-03 16:31:02 +03:00
[is path_left path_right][else][path_right][end]
revision [rev_right], [date_right]
[if-any tag_right]<br />Tag: [tag_right][end]
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
</th>
</tr>
[for changes]
[is changes.type "header"]
<tr class="vc_diff_chunk_header" id="h[changes.line_info_right]">
<td style="width:6%;"><strong>#</strong></td>
<td style="width:47%;">
<strong>Line [changes.line_info_left]</strong>&nbsp;
<span class="vc_diff_chunk_extra">[changes.line_info_extra]</span>
</td>
<td style="width:47%;">
<strong>Line [changes.line_info_right]</strong>&nbsp;
<span class="vc_diff_chunk_extra">[changes.line_info_extra]</span>
</td>
</tr>
[else]
[is changes.type "add"]
<tr>
<td id="l[changes.line_number]">[if-any annotate_href]<a href="[annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_empty">&nbsp;</td>
<td class="vc_diff_add">&nbsp;[changes.right]</td>
</tr>
[else]
[is changes.type "remove"]
<tr>
<td></td>
<td class="vc_diff_remove">&nbsp;[changes.left]</td>
<td class="vc_diff_empty">&nbsp;</td>
</tr>
[else]
[is changes.type "change"]
<tr>
[if-any changes.have_right]
<td id="l[changes.line_number]">[if-any annotate_href]<a href="[annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
[else]
<td></td>
[end]
[if-any changes.have_left]
<td class="vc_diff_change">&nbsp;[changes.left]</td>
[else]
<td class="vc_diff_change_empty">&nbsp;</td>
[end]
[if-any changes.have_right]
<td class="vc_diff_change">&nbsp;[changes.right]</td>
[else]
<td class="vc_diff_change_empty">&nbsp;</td>
[end]
</tr>
[else]
[is changes.type "no-changes"]
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr class="vc_diff_empty">
<td colspan="3" style="text-align:center;"><br />
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<strong>- No changes -</strong><br />&nbsp; </td>
</tr>
[else]
[is changes.type "binary-diff"]
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr class="vc_diff_empty">
<td colspan="3" style="text-align:center;"><br />
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<strong>- Binary file revisions differ -</strong><br />&nbsp; </td>
</tr>
[else]
[is changes.type "error"]
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr class="vc_diff_empty">
<td colspan="3" style="text-align:center;"> <br />
Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to ViewCVS in comments, strings, and documentation. References to ViewCVS in filenames and urls still need to be fixed. Also, logo.png (the blimp) needs to be updated or replaced. This patch is by Gerard Gerritsen (sigcafe), the only change I've made is to restore a reference to ViewCVS in a comment about backwards compatibility. * windows/README * viewcvs-install * README * templates/include/footer.ezt * templates/include/header.ezt * templates/error.ezt * templates/query.ezt * templates/docroot/help.css * templates/docroot/help_query.html * templates/docroot/help_dirview.html * templates/docroot/help_rootview.html * templates/docroot/styles.css * templates/docroot/help_log.html * templates/diff.ezt * tools/make-release * lib/sapi.py * lib/dbi.py * lib/accept.py * lib/cvsdb.py * lib/config.py * lib/query.py * lib/vclib/bincvs/__init__.py * lib/vclib/svn/__init__.py * lib/vclib/__init__.py * lib/vclib/svn_ra/__init__.py * lib/vclib/ccvs/rcsparse/common.py * lib/vclib/ccvs/rcsparse/__init__.py * lib/vclib/ccvs/rcsparse/default.py * lib/vclib/ccvs/rcsparse/texttools.py * lib/vclib/ccvs/rcsparse/debug.py * lib/vclib/ccvs/__init__.py * lib/vclib/ccvs/blame.py * lib/blame.py * lib/popen.py * lib/compat.py * lib/viewcvs.py * lib/debug.py * INSTALL * bin/standalone.py * bin/make-database * bin/mod_python/query.py * bin/mod_python/viewcvs.py * bin/cgi/query.cgi * bin/cgi/viewcvs.cgi * bin/asp/query.asp * bin/asp/viewcvs.asp * bin/svndbadmin * bin/loginfo-handler * bin/cvsdbadmin * viewcvs.conf.dist git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 20:19:28 +03:00
<strong>- ViewVC depends on rcsdiff and GNU diff to create
this page. ViewVC cannot find GNU diff. Even if you
have GNU diff installed, the rcsdiff program must be
configured and compiled with the GNU diff location.
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
-</strong> <br />&nbsp; </td>
</tr>
[else]
<tr>
<td id="l[changes.line_number]">[if-any annotate_href]<a href="[annotate_href]#l[changes.line_number]">[changes.line_number]</a>[else][changes.line_number][end]</td>
<td class="vc_diff_nochange">&nbsp;[changes.left]</td>
<td class="vc_diff_nochange">&nbsp;[changes.right]</td>
</tr>
[end]
[end]
[end]
[end]
[end]
[end]
[end]
[end]
</table>
Instead of sending colored diffs to the diff.ezt template, and raw diffs to their own text/plain output, templatize all diffs. By default now, all diffs will go through diff.ezt (which has been updated to handle it). Only if the new 'makepatch' boolean CGI flag is set will diffs be sent directly as text/plain, non-templatized output. * viewcvs/lib/viewcvs.py (_legal_params): Add new 'makepatch' boolean parameter. (check_freshness): Fix a speeling eror. (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it. (human_readable_diff): Lose the 'request', 'sym1', and 'sym2' parameters. Now return the parsed dates and DiffSource object instead of populating a data dictionary and completely generating the page. (spaced_html_text): Use an intermediate variable for readability. (raw_diff): New. (view_diff): Honor the new 'makepatch'. Update calls to human_readable_diff(), and make use of raw_diff(). Do all page generation for diffs here now. Adds a new 'raw_diff' data dictionary item, useful for testing raw vs. colored, as well as for positioning that raw diff output in the template. * templates/diff.ezt Use the new 'raw_diff' data dictionary item to position raw diff output in the template. Update the diff form to allow for the generation of traditional "patch-ish" raw diff output. * templates/include/diff_form.ezt Allow for the generation of traditional "patch-ish" raw diff output. * website/styles.css (vc_raw_diff): New style class. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 18:37:11 +04:00
[end]
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
[if-any sidebyside]
<table class="vc_idiff">
<colgroup><col /><col class="content" /></colgroup>
<colgroup><col /><col class="content" /></colgroup>
<thead>
<tr>
<th colspan="2">
[is path_left path_right][else][path_left][end]
Revision [rev_left]
</th>
<th colspan="2">
[is path_left path_right][else][path_right][end]
Revision [rev_right]
</th>
</tr>
</thead>
<tbody>
[for sidebyside]
[if-any sidebyside.gap]
<tr>
<th>&hellip;</th><th></th>
<th>&hellip;</th><th></th>
</tr>
[end]
<tr>
[for sidebyside.columns]
<th>[sidebyside.columns.line_number]</th><td[if-any sidebyside.columns.line_number][else] class="vc_idiff_empty"[end]>[for sidebyside.columns.segments][if-any sidebyside.columns.segments.type]<span class="vc_idiff_[sidebyside.columns.segments.type]">[sidebyside.columns.segments.text]</span>[else][sidebyside.columns.segments.text][end][end]</td>
[end]
</tr>
[end]
</tbody>
</table>
[end]
[if-any unified]
<table class="vc_idiff">
<thead>
<tr>
<th>r[rev_left]</th>
<th>r[rev_right]</th>
<th></th>
</tr>
</thead>
<tbody>
[for unified]
[if-any unified.gap]
<tr>
<th>&hellip;</th>
<th>&hellip;</th>
<th></th>
</tr>
[end]
<tr>
<th>[unified.left_number]</th>
<th>[unified.right_number]</th>
<td[if-any unified.type] class="vc_idiff_[unified.type]"[end]>[for unified.segments][if-any unified.segments.type]<span class="vc_idiff_[unified.segments.type]">[unified.segments.text]</span>[else][unified.segments.text][end][end]</td>
</tr>
[end]
</tbody>
</table>
[end]
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<hr style="margin-top:1em;" />
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<table cellpadding="10" class="auto">
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
<tr>
Instead of sending colored diffs to the diff.ezt template, and raw diffs to their own text/plain output, templatize all diffs. By default now, all diffs will go through diff.ezt (which has been updated to handle it). Only if the new 'makepatch' boolean CGI flag is set will diffs be sent directly as text/plain, non-templatized output. * viewcvs/lib/viewcvs.py (_legal_params): Add new 'makepatch' boolean parameter. (check_freshness): Fix a speeling eror. (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it. (human_readable_diff): Lose the 'request', 'sym1', and 'sym2' parameters. Now return the parsed dates and DiffSource object instead of populating a data dictionary and completely generating the page. (spaced_html_text): Use an intermediate variable for readability. (raw_diff): New. (view_diff): Honor the new 'makepatch'. Update calls to human_readable_diff(), and make use of raw_diff(). Do all page generation for diffs here now. Adds a new 'raw_diff' data dictionary item, useful for testing raw vs. colored, as well as for positioning that raw diff output in the template. * templates/diff.ezt Use the new 'raw_diff' data dictionary item to position raw diff output in the template. Update the diff form to allow for the generation of traditional "patch-ish" raw diff output. * templates/include/diff_form.ezt Allow for the generation of traditional "patch-ish" raw diff output. * website/styles.css (vc_raw_diff): New style class. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 18:37:11 +04:00
<td>
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<form method="get" action="[diff_format_action]">
<div>
[diff_format_hidden_values]
<select name="diff_format" onchange="submit()">
<option value="h" [is diff_format "h"]selected="selected"[end]>Colored Diff</option>
<option value="l" [is diff_format "l"]selected="selected"[end]>Long Colored Diff</option>
<option value="u" [is diff_format "u"]selected="selected"[end]>Unidiff</option>
<option value="c" [is diff_format "c"]selected="selected"[end]>Context Diff</option>
<option value="s" [is diff_format "s"]selected="selected"[end]>Side by Side</option>
</select>
<input type="submit" value="Show" />
</div>
Instead of sending colored diffs to the diff.ezt template, and raw diffs to their own text/plain output, templatize all diffs. By default now, all diffs will go through diff.ezt (which has been updated to handle it). Only if the new 'makepatch' boolean CGI flag is set will diffs be sent directly as text/plain, non-templatized output. * viewcvs/lib/viewcvs.py (_legal_params): Add new 'makepatch' boolean parameter. (check_freshness): Fix a speeling eror. (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it. (human_readable_diff): Lose the 'request', 'sym1', and 'sym2' parameters. Now return the parsed dates and DiffSource object instead of populating a data dictionary and completely generating the page. (spaced_html_text): Use an intermediate variable for readability. (raw_diff): New. (view_diff): Honor the new 'makepatch'. Update calls to human_readable_diff(), and make use of raw_diff(). Do all page generation for diffs here now. Adds a new 'raw_diff' data dictionary item, useful for testing raw vs. colored, as well as for positioning that raw diff output in the template. * templates/diff.ezt Use the new 'raw_diff' data dictionary item to position raw diff output in the template. Update the diff form to allow for the generation of traditional "patch-ish" raw diff output. * templates/include/diff_form.ezt Allow for the generation of traditional "patch-ish" raw diff output. * website/styles.css (vc_raw_diff): New style class. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 18:37:11 +04:00
</form>
</td>
<td>
[if-any raw_diff]
&nbsp;
[else]
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<table style="border:solid gray 1px;" class="auto">
<tr>
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<td>Legend:<br />
<table cellspacing="0" cellpadding="1">
<tr>
<td style="text-align:center;" class="vc_diff_remove">Removed from v.[rev_left]</td>
<td class="vc_diff_empty">&nbsp;</td>
</tr>
<tr>
This patch (mostly by Marten Thavenius) upgrades ViewCVS to XHTML 1.0 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
2005-09-28 21:06:16 +04:00
<td style="text-align:center;" colspan="2" class="vc_diff_change">changed lines</td>
</tr>
<tr>
<td class="vc_diff_empty">&nbsp;</td>
<td style="text-align:center;" class="vc_diff_add">Added in v.[rev_right]</td>
</tr>
</table>
</td>
</tr>
</table>
Instead of sending colored diffs to the diff.ezt template, and raw diffs to their own text/plain output, templatize all diffs. By default now, all diffs will go through diff.ezt (which has been updated to handle it). Only if the new 'makepatch' boolean CGI flag is set will diffs be sent directly as text/plain, non-templatized output. * viewcvs/lib/viewcvs.py (_legal_params): Add new 'makepatch' boolean parameter. (check_freshness): Fix a speeling eror. (MarkupPipeWrapper.__init__): Add 'htmlize' parameter, and use it. (human_readable_diff): Lose the 'request', 'sym1', and 'sym2' parameters. Now return the parsed dates and DiffSource object instead of populating a data dictionary and completely generating the page. (spaced_html_text): Use an intermediate variable for readability. (raw_diff): New. (view_diff): Honor the new 'makepatch'. Update calls to human_readable_diff(), and make use of raw_diff(). Do all page generation for diffs here now. Adds a new 'raw_diff' data dictionary item, useful for testing raw vs. colored, as well as for positioning that raw diff output in the template. * templates/diff.ezt Use the new 'raw_diff' data dictionary item to position raw diff output in the template. Update the diff form to allow for the generation of traditional "patch-ish" raw diff output. * templates/include/diff_form.ezt Allow for the generation of traditional "patch-ish" raw diff output. * website/styles.css (vc_raw_diff): New style class. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@864 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-06-22 18:37:11 +04:00
[end]
</td>
</tr>
Big update! Convert the rest of the pages to use templates. * annotation, human readable diff, CvsGraph, and a marked-up file all use a template to generate the basic parts of the page. In many cases (annotate, graph, markup), the content is still rendered by other code. * for the diff support, we take advantage of the new list iteration support in EZT to "iterate on" a DiffSource object, which parses a diff stream into structured object for the template to display. * for the CvsGraph page, we make use of EZT's new stream support to stream in an imagemap from the CvsGraph executable. the graph page includes a navigation header now. * updated the upgrading.html page with some items missing from the 0.7 instructions, plus new instructions. * because of the complete conversion, the configuration file no longer specifies colors or images -- these are all in the templates now. Removed the relevant material from config.py and viewcvs.conf.dist. * converted html_footer() to use the new footer.ezt template because we still have to call that manually in the markup and annotate cases. * add the templates to viewcvs.conf.dist and config.py * added a handy generate_page() utility for generating pages from a template and its input data. * removed download_link, html_icon, html_option, print_diff_select, and navigate_header utility functions. These all printed HTML to the output, but are obsolete due to the new templates. * the new nav_header_data() utility function fills in data used by the "header.ezt" template, which replaces the navigate_header() func. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@395 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 03:22:14 +03:00
</table>
[include "include/footer.ezt"]