* lib/vclib/__init__.py
(Repository.dirlogs): Update comment.
(Revision.__init__): Add 'lockinfo' parameter, used to populate
similarly named class member.
* lib/vclib/svn/svn_repos.py
(Revision.__init__): Add 'lockinfo' parameter, and update call to
vclib.Revision().
(_log_helper): Update call to Revision(), and lose custom lockinfo handling.
(LocalSubversionRepository.dirlogs): Populate entry lockinfo with a
call to svn_fs_get_lock() for each entry.
* lib/vclib/svn/svn_ra.py
(LogCollector.__init__): Add 'lockinfo' parameter, used to populate
similarly named class member.
(LogCollector.add_log): Pass self.lockinfo to updated call to Revision().
(RemoteSubversionRepository.itemlog): Pass lock info to
LogCollector(), and lose custom lockinfo handling.
(RemoteSubversionRepository.itemtype, RemoteSubversionRepository.listdir):
Update expected return value from _get_dirents().
(RemoteSubversionRepository.dirlogs): Populate entry lockinfo from
updated return value from _get_dirents().
(RemoteSubversionRepository._get_dirents): Rework to trade in
dirents and locks instead of only dirents.
* lib/vclib/ccvs/bincvs.py
(Revision.__init__): Update call to vclib.Revision().
(_get_logs): Add 'lockinfo' member to DirEntry() items.
* lib/vclib/ccvs/ccvs.py
(InfoSink.__init__): Init lockinfo dictionary.
(InfoSink.set_locker): New.
(InfoSink.define_revision): Set lockinfo on Revision item.
(InfoSink.set_revision_info): Populate DirEntry lockinfo from
Revision lockinfo data.
* lib/viewvc.py
(view_directory): Populate entry lockinfo.
(common_template_data): Populate the 'lockinfo' data dictionary item.
* templates/directory.ezt,
* templates/dir_new.ezt
* templates/annotate.ezt,
* templates/markup.ezt
Tweak to show lock status.
* docs/template-authoring-guide.html
Note new data dictionary items.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1787 8cb11bc2-c004-0410-86c3-e597b4017df7
* templates/annotate.ezt
Try to make the annotate view stylations look a little more like
those of the markup view.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1553 8cb11bc2-c004-0410-86c3-e597b4017df7
having them populate almost identical data dictionaries, and having
similar template headers.
* docs/upgrading-howto.html
(Upgrading from 1.0.0): Note that 'mime_type', 'log', 'date', 'ago',
'author', 'branches', 'tags', 'branch_points', 'changed', 'size',
'state', 'vendor_branch', and 'prev' were added to annotate.ezt.
* docs/template-authoring-guide.html
(Annotation View): Add 'mime_type', 'log', 'date', 'ago', 'author',
'branches', 'tags', 'branch_points', 'changed', 'size', 'state',
'vendor_branch', and 'prev'.
* templates/annotate.ezt
Basically, replace the top of this thing with a copy of the top of
markup.ezt.
* lib/viewvc.py
(view_annotate): Populate almost an identical data dictionary to
what the markup view uses.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1552 8cb11bc2-c004-0410-86c3-e597b4017df7
checkout view. The former is for sanity, the latter for security.
* viewvc.conf.dist
(allow_tar, allow_annotate, allow_markup): Removed.
(allowed_views): New.
* lib/config.py
(Config._force_multi_value): Add 'allowed_views'.
(Config.set_defaults): Set default for 'allowed_views'; no longer set
defaults for 'allow_tar', 'allow_annotate', 'allow_markup'.
* lib/viewvc.py
(default_view, view_directory, download_tarball, get_file_view_info,
view_annotate, view_diff, build_commit, view_revision, view_markup,
view_checkout): Track changes, adding code to prevent checkout view
URL generation when the view is disabled, and doing the same for
markup views (which should have already been done, since we already
had an allow_markup option!)
* templates/query_results.ezt
* templates/markup.ezt
* templates/directory.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/annotate.ezt
Don't assume checkout and markup views are present.
* docs/upgrading-howto.html
Update to show the configuration changes.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1544 8cb11bc2-c004-0410-86c3-e597b4017df7
Andreas Amann (aamann) using patch he provided.
* templates/diff.ezt
* templates/annotate.ezt
put a letter in front of id tags that begin with numbers
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1248 8cb11bc2-c004-0410-86c3-e597b4017df7
to them from the diff page.
* viewvc/templates/annotate.ezt
Make each row bookmarkable.
* viewvc/templates/diff.ezt
Make line numbers into links to the annotate page.
* viewvc/lib/viewcvs.py
(view_diff): Add an annotate_href to the data dictionary.
* viewvc/viewvc.org/template-authoring-guide.html
(variables-diff): Document new annotate_href and changes.line_number
variables.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1235 8cb11bc2-c004-0410-86c3-e597b4017df7
showing 404 errors when users try to jump to revisions where the path
being viewed doesn't exist, just redirect to the closest revision where
the path does exist.
Also, italicize the links which change the current 'pathrev' value
to make them stand out from links that stay within the current revision.
* lib/viewcvs.py
(redirect_pathrev):
new view that validates input from the pathrev form and redirects to
the right revision
(pathrev_form):
new function that generates fields for pathrev form
(_last_rev):
new function for tracking subversion revisions
(Request.run_viewcvs, Request.get_link, _legal_params, _views):
add handling for redirect_pathrev view
(Request.get_form):
new function that wraps around get_link
(view_directory, view_log):
make use of new pathform_form and get_form functions
(common_template_data, view_revision, view_queryform):
make use of get_form function
(view_directory, view_log):
make use of pathrev_form
* templates/include/pathrev_form.ezt
only show the "Clear" button when clearing won't cause a 404
* templates/annotate.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
italicize revision jumping links
* website/template-authoring-guide.html
update
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1146 8cb11bc2-c004-0410-86c3-e597b4017df7
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
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
were present in ViewCVS 0.9.2, but seem to have been inadvertently
removed since then.
* lib/viewcvs.py
(common_template_data):
set "up_href, "log_href," and "graph_href" template variables
for files
(view_markup):
set "annotate_href"
(view_directory):
stop setting "up_href" here
(view_log):
stop setting "graph_href" and "back_url" here
set "annotate_href" here
(view_queryform):
set "dir_href" here
* templates/annotate.ezt
* templates/diff.ezt
* templates/graph.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
* templates/query_form.ezt
* templates/include/branch.ezt
add links
* website/upgrading.html
document changed variables
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1003 8cb11bc2-c004-0410-86c3-e597b4017df7
Make the annotate data "smaller", and increase the padding between
columns.
* viewcvs/templates/annotate.ezt
Remove superfluous spaces in table cells. Mozilla is rendering
wrongly, presumably because the cells are using "nowrap" or "pre"
whitespace handling.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@912 8cb11bc2-c004-0410-86c3-e597b4017df7
by Dirk Lemstra <dirk.lemstra@atosorigin.com>. Also, add some stuff
to the generally-available-to-all-templates dataset. And finally,
re-work all the templates for consistent look and feel.
I can die now.
* viewcvs/lib/viewcvs.py
(common_template_data): Expose the 'where', 'roottype', and
'rootname' Request members, and the 'nav_path', to all views.
Also, do the root selection stuffs ('roots', 'change_root_action',
'change_root_hidden_values').
(nav_header_data): No longer explicitly add 'nav_path' to the data
dictionary.
(_dir_url): For Subversion, supply the revision number to the
generated links.
(view_directory): Include the revision when generating log view
URLs. Also, expose a 'tree_rev_href' data item for linking to the
revision view. No longer explicitly add 'roottype', 'where', and
'current_root' to the data dictionary. No longer do the root
selection stuff here, either.
(view_log): No longer explicitly add 'roottype', 'where', and
'current_root' to the data dictionary.
(human_readable_diff): No longer explicitly add 'where' to the data
dictionary.
(view_markup, view_revision): No longer explicitly add 'roottype' to
the data dictionary.
* viewcvs/website/upgrading.html
Document the changes.
* viewcvs/website/help_rootview.html
Add a missing "<br>".
* viewcvs/templates/annotate.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
* viewcvs/templates/revision.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
Beat the heck outta these templates until they all reference
header.ezt and footer.ezt (except for error.ezt), and they all
present a basically consistent interface across all views.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@835 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
* 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