Commit Graph

53 Commits (9ec5d1f09e650e68f43d95e5e1e0c12e7630b2cf)

Author SHA1 Message Date
rey4 03070a2320 Attempt to make directory log page a little less confusing.
* templates/include/file_header.ezt
    link to current directory listing instead of parent directory

* templates/include/log_header.ezt
    don't display "Links to HEAD:" stuff for directories. With
    change above it's redundant

* templates/log.ezt
* templates/log_table.ezt
    label directory links as "Directory Listing" instead of "(view)"


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1219 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-23 16:03:14 +00:00
rey4 754e9dbc30 Update template authoring guide and make template cleanups.
* lib/viewcvs.py
  (get_file_view_info):
    get rid of viewable return value

  (nav_header_data):
    get rid of "viewable" template variable

  (view_directory):
    rename "entries.viewable" variable to "entries.prefer_markup"
    rename "selection_form" variable to "search_re_form"
    rename "search_tag_action" variable to "search_action"
    rename "search_tag_hidden_values" variable to "search_re_hidden_values"

  (view_log):
    rename "entries.html_log" variable to "entries.log"
    restore value of "entries.next_main" variable to what it was in ViewCVS
      0.9.x
    get rid of "entries.viewable" template variable
    get rid of "viewable" template variable
    get rid of "tag_viewable" template variable

  (view_revision):
    rename "changes.filename" variable to "changes.path"
    rename "changes.base_path" variable to "changes.copy_path"
    rename "changes.base_rev" variable to "changes.copy_rev"

  (build_commit)
    rename "commits.desc" variable to "commits.log"
    get rid of "commits.rev_href" variable and replace with
      "commits.view_href", "commits.download_href", and
      "commits.prefer_markup"

* templates/include/dir_footer.ezt
* templates/include/file_header.ezt
* templates/dir_new.ezt
* templates/directory.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/query.ezt
* templates/query_results.ezt
* templates/revision.ezt
    update templates for changed variables

* CHANGES
    fix blurb about paging

* viewvc.org/upgrading.html
    update information about 0.9.x variables

* viewvc.org/template-authoring-guide.html
    fill it out


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1176 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-08 18:18:08 +00:00
rey4 c002889dad Take some rough edges off the new sticky revision interface. Instead of
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
2005-11-03 13:33:56 +00:00
rey4 01437d5937 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 13:31:02 +00:00
cmpilato 8f79165d0c Move some logic that really UI-ish from the core code into the
templates.

* viewcvs/lib/viewcvs.py
  (view_log): Lose 'tr1' and 'tr2' dictionary items.

* viewcvs/templates/log.ezt,
* viewcvs/templates/log_table.ezt
  Calculate first and last revisions using EZT magic.

* viewcvs/templates/include/diff_form.ezt
  Choose default diff form values based on the 'rev_selected'
  dictionary item as well as the EZT-calculated first and last
  revisions.

* viewcvs/website/upgrading.html,
* viewcvs/website/template-authoring-guide.html
  Track removed variables, and add some missing punctuation.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1135 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-17 20:31:11 +00:00
cmpilato 2d37af8286 More template authoring guide; more dictionary tweaks as this exercise
points out more ugliness (which was its secondary goal, after all).

* viewcvs/lib/viewcvs.py
  (view_revision, view_markup, view_log): Use 'date' instead of
    'date_str' in data dictionary items.
  (view_directory): Use 'entries' instead of 'rows' in the data
    dictionary.  Remove redundant 'has_tags' dictionary init.

* viewcvs/templates/markup.ezt,
* viewcvs/templates/log.ezt,
* viewcvs/templates/revision.ezt,
* viewcvs/templates/log_table.ezt,
* templates/dir_alternate.ezt
* templates/directory.ezt
* viewcvs/website/upgrading.html
  Track variable renames.

* viewcvs/website/template-authoring-guide.html
  Track variable renames, and begin working on the directory view section.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1134 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-10-17 19:50:20 +00:00
cmpilato 97a07dc88e 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 17:06:16 +00:00
cmpilato ac88e349ca Expose annotation support for local Subversion repositories. Patch
largely by Stefan Haller <haller@ableton.com>, at least in the
approach used.

* viewcvs/viewcvs.conf.dist
  (svn_path): New configuration variable.

* viewcvs/lib/config.py
  (Config.set_defaults): Populate a new svn_path config member.

* viewcvs/lib/viewcvs.py
  (Request.__init__): Tweak the way Subversion's vclib.Repository
    objects are opened to have different codepaths for the 'svn' and
    'svn_ra' modules, and pass the new cfg.general.svn_path option to
    the 'svn' module's SubversionRepository.

* viewcvs/lib/vclib/svn/__init__.py
  (BlameSource, BlameSequencingError, _item): New.
  (SubversionRepository.__init__): Add 'svn_path' parameter.
    Calculate and store a path for the 'svn' command-line client binary.
  (SubversionRepository.annotate): Really implement annotation.

* viewcvs/templates/log.ezt,
* viewcvs/templates/log_table.ezt
  Enable annotate links for Subversion, too!


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1100 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-09-23 20:15:08 +00:00
rey4 99818c7cf0 Add a bunch of links between different views. Some of these links
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
2005-01-14 05:20:46 +00:00
rey4 c0110cacae Simplify page titles. Someone was getting a little - too crazy - with -
the: punctuation ;)

* templates/annotate.ezt
* templates/diff.ezt
* templates/graph.ezt
* templates/log.ezt
* templates/log_table.ezt
* templates/markup.ezt
* templates/query.ezt
* templates/query_form.ezt
* templates/query_results.ezt
* templates/revision.ezt
* templates/include/dir_header.ezt
* templates/include/header.ezt
  change titles

* lib/config.py
  (Config.set_defaults):
    remove "main_title" option

* viewcvs.dist.conf
    remove "main_title" option

* website/upgrading.html
    document removal of "main_title" option


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1000 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-01-14 03:40:55 +00:00
cmpilato 0540dd9c0a * lib/viewcvs.py
(view_log): Always expose the view_href and download_href.

* templates/log.ezt
* templates/log_table.ezt
  Lose the "if CVS" condition I added for some includes a while ago.

* templates/include/branch.ezt
  Always show bookmarkable links to HEAD/download.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@961 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-10-19 14:46:35 +00:00
cmpilato f570dd8bd6 Don't include the branch and view_tag templates for non-CVS log displays.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@947 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-10-13 18:19:14 +00:00
jhenstridge c3aff09497 * lib/viewcvs.py, templates/log.ezt, templates/log_table.ezt: revert
change that moved generation of human readable diff URLs from the
  templates to the Python code.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@899 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-24 16:34:04 +00:00
jhenstridge 4e573ace1d Fix up the diff links when diff_format is set to a non-default value on
the log pages.

* templates/include/diff_form.ezt: if no tags exist for the file, don't
  show the drop down tag selection box.  This gets rid of some unneeded
  UI when browsing Subversion repositories.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@897 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-23 12:43:11 +00:00
jhenstridge 198923b18a * viewcvs.py: add code to calculate various diff URLs used in the log
view.  For Subversion repositories, these URLs are usually shorter
  (only include p1/p2 when paths differ) and handle a few corner
  cases w.r.t. moves that the old code didn't.

* log.ezt, log_table.ezt: use the diff URLs passed in from viewcvs.py
  rather than constructing them in the template.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@896 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-23 11:28:30 +00:00
jhenstridge f2d02f282b Update get_link() to add a rev parameter for diff links on subversion
repositories (sets rev to the same value as r2).

Update run_viewcvs() so that if no view is selected, handle requests
that specify r1,r2,rev as diffs rather than checkouts, and requests
that specify r1,rev as logs.

Update log.ezt and log_table.ezt to set the rev parameter in the diff
links when browsing subversion repositories.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@888 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-21 15:46:47 +00:00
jhenstridge 31ac07eb78 render all revision log messages as <pre class="vc_log">...</pre>
Add CSS for vc_log to set it italic (as it was already shown in most places),
and set some proprietary properties to turn on word wrapping for Mozilla,
Opera and IE, and the equivalent standard CSS3 property (for when browsers
support it).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@882 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-19 08:49:39 +00:00
cmpilato a0bc4d071b * viewcvs/lib/viewcvs.py
(common_template_data): Expose request.pathtype as a generally
    available template variable.  (Have I mentioned today how much I
    dislike per-template data dictionary items?)

* viewcvs/templates/log_table.ezt
* viewcvs/templates/log.ezt
  Use the pathtype variable to determine whether or not to show
  file-only stuff like diff and download options.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@847 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-05-10 15:37:11 +00:00
cmpilato da21434ef0 Some bug fixes as suggested (in great detail, just short of a patch)
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
2004-04-22 15:40:01 +00:00
cmpilato ba43e61754 Re-arrange the templates directory a bit.
* viewcvs/templates/dir_footer.ezt
* viewcvs/templates/dir_header.ezt
* viewcvs/templates/footer.ezt
* viewcvs/templates/header.ezt
  Move all of these...

* viewcvs/templates/include/dir_footer.ezt
* viewcvs/templates/include/dir_header.ezt
* viewcvs/templates/include/footer.ezt
* viewcvs/templates/include/header.ezt
  ...to here.

* viewcvs/templates/annotate.ezt
* viewcvs/templates/diff.ezt
* viewcvs/templates/dir_alternate.ezt
* viewcvs/templates/directory.ezt
* viewcvs/templates/graph.ezt
* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
* viewcvs/templates/markup.ezt
* viewcvs/templates/query.ezt
  And then update the [include] items in these files to note the new
  locations of the aforementioned relocated templates.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@824 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-04-15 05:57:57 +00:00
cmpilato fe97494fd0 Fix copyfrom links in the Subversion log view.
Patch mostly by Eike Bernhardt <eike-usenet@unorganized.net>.

* viewcvs/lib/viewcvs.py
  (Request.get_link): Don't lose the rev= parameter when building
    log-view URLs.
  (view_log): Include the copyfrom revision in the copyfrom URL.

* viewcvs/templates/log_table.ezt
* viewcvs/templates/log.ezt
  Don't tack on a revision bookmark to the copyfrom URL.  It's not
  likely to exist, and is now unnecessary anyway.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@807 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-03-08 16:41:37 +00:00
rey4 05888638d0 Make view/download links on log and markup pages simpler and more uniform.
I didn't like a number of things about previous interface, like how it:
 - inconsistently made some links pop up and others open in the same window
 - used inconsistent terminology, "view" links lead to markup pages in some
   cases and direct downloads in others
 - omitted useful links, there were no direct download links for images and
   no markup or "as text" links for "nonviewable" files (like text files
   that ending in .doc)
 - inserted extraneous punctuation, in lines like
   "Revision 1.1 - , (view/download)"

There's some more information about this change posted on the dev list:
http://mailman.lyra.org/pipermail/viewcvs-dev/2004-January/001337.html


* lib/viewcvs.py:
  (view_markup, view_log):
    set new template variables that have the same names and functions on
    all pages: "view_href", "download_href", and "download_text_href"

* templates/log.ezt
* templates/log_table.ezt
* templates/include/branch.ezt
* templates/markup.ezt
    use new template variables and get rid of pop-up links

* templates/dir_alternate.ezt
* templates/directory.ezt
    get rid of pop-up links

* website/upgrading.html
    describe changed variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@788 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-01-21 22:50:26 +00:00
cmpilato 9d5d4170f9 More work on the cool new revision view.
* viewcvs/lib/vclib/svn/__init__.py
  (LogEntry.__init__): Remove 'other_paths' parameter and support.
  (ChangedPathEntry): Remove.
  (ChangedPath, get_revision_info): New.
  (log_helper): Don't do changed-path or action stuffs.  Update call
    to LogEntry().
  (get_logs): Update call to LogEntry().

* viewcvs/lib/viewcvs.py
  (view_log_svn): Remove support for 'other_paths' support.
  (view_revision): Move svn-specific stuff to new view_revision_svn()
  (view_revision_svn): New.

* viewcvs/templates/revision.ezt
  Make this template actually do something useful.

* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
  Remove display of "other_paths" from Subversion logs.  Make revision
  numbers into links to the revision view.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@740 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-22 18:23:01 +00:00
rey4 131904872c Stop looking up "action" values for subversion log entries. C. Mike
pointed out that will ultimately allow us to get rid of an inefficient
call to svn_fs_paths_changed().

* lib/vclib/svn/__init__.py
  (LogEntry.__init__, log_helper, get_logs):
    no longer set LogEntry.action member

* templates/log.ezt
* templates/log_table.ezt
    stop trying to read LogEntry.action member


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@729 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-17 17:56:44 +00:00
cmpilato 4e5303978a Expose the actions for "other changed paths".
* viewcvs/lib/vclib/svn/__init__.py
  (ChangedPathEntry.__init__): Add 'action' parameter.
  (_unparse_action): New helper (with code previously in log_helper()).
  (log_helper): Now call _unparse_action() to get the action string
    for the path.  But now also call it for the other paths, passing
    the result to the updated ChangedPathEntry.__init__() function.

* viewcvs/templates/log.ezt
* viewcvs/templates/log_table.ezt
  Now show the type of change that happened for "the other paths", and
  don't make paths that were deleted into hyperlinks.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@728 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-16 14:41:10 +00:00
cmpilato 9a8d5d115b Whip 'select for diffs', 'diff to previous', and 'diff to selected'
into shape for Subversion.

* viewcvs/lib/viewcvs.py
  (view_log): Grab the path of a version selected for diffs from the
    query data, and stash it in the data dictionary.

* viewcvs/templates/log_table.ezt
* viewcvs/templates/log.ezt
  Fix the 'diff to previous', 'diff to selected', and 'select for
  diff' links for Subversion.  Also, don't display the various "branch
  point" and "next main" diff links for Subversion.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@720 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-10-15 16:42:02 +00:00
cmpilato 4f46a705e2 Some fix-em-ups to the new history-using ViewCVS code. Thanks to Greg
Stein and Russell Yanofsky for review and suggestions.

* lib/vclib/svn/__init__.py
  (log_helper): Add 'pool' argument, and use it instead of
    svnrepos.pool for allocations.  Also, calculate the action and
    copy_rev/copy_path fields in the log entries.
  (fetch_log): Use an iteration subpool when looping over history items.

* templates/log.ezt
  Eliminate an unnecessary "if-any" check (since "is" does this work
  for us in this case).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@713 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-09-30 13:58:44 +00:00
cmpilato f808704efe * viewcvs/lib/vclib/svn/__init__.py
(log_helper): Populate the 'action' attribute of the LogEntry.

* viewcvs/templates/log.ezt
  Expect human-readable strings for the action type (instead of the
    single-character abbreviations).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@712 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-09-26 14:29:07 +00:00
cmpilato 7eae388966 Make "diff to previous" for across Subversion copies work.
* viewcvs/lib/viewcvs.py
  (_legal_params): Allow 'p1' and 'p2' query args.
  (view_log_svn): Populate prev_path entry members.
  (view_diff): Handle the 'p1' and 'p2' query string items.  Update
    call to vclib.svn.do_diff().

* viewcvs/templates/log.ezt
  Update "diff to previous" links to include prev_path.

* viewcvs/lib/vclib/svn/__init__.py
  (do_diff): Add (and use) 'path2' argument.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@710 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-09-26 02:58:59 +00:00
rey4 66bb812aeb * lib/viewcvs.py (common_template_data): new function to set a few variables
common to all templates

  (Request.__init__): moved icon and docroot initialization into
  common_template_data

  (html_footer, view_directory, view_log, view_markup, view_checkout,
   view_cvsgraph, human_readable_diff): changed to use common_template_data

* templates/dir_alternate.ezt:
  templates/directory.ezt:
  templates/graph.ezt:
  templates/header.ezt:
  templates/log.ezt:
  templates/log_table.ezt:
  templates/query.ezt: renamed docroot and icon variables

* website/upgrading.html: updated description of changed template variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@692 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-07-25 05:34:11 +00:00
rey4 5d4c447dd4 added "icons" and "docroot" options to control the locations of
static files

* viewcvs.conf.dist, lib/config.py: added new options

* templates/dir_alternate.ezt:
* templates/directory.ezt:
* templates/header.ezt:
* templates/log.ezt:
* templates/log_table.ezt:
* templates/query.ezt:
* lib/viewcvs.py (Request.__init__):
  new "request.docroot" and "request.icons" template variables

* standalone.py (serve): standalone server must use default locations


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@690 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-07-24 20:37:39 +00:00
rey4 c6ddff38ef Added some new fields to the Subversion log view and fixed the
download/view/markup links for old revisions of copied files.

The new fields are "Other changed files" which is a list of links to other
files changed in the same revision, "Copied from" which is displayed for
file revisions that are the result of a copy operations, and "Filename"
which is displayed for older file revisions which precede a copy operation.

* viewcvs.conf.dist
* lib/config.py (set_defaults): added "show_changed_paths" option to determine
  whether or not to retrieve and display the new information

* lib/viewcvs.py (run_viewcvs): now passes show_changed_paths option to
  newly created subversion repository objects

  (view_log_svn): changed the way download/view/markup links are generated
  and added code to generate links for new fields

* templates/log.ezt: template additions

* lib/vclib/svn/__init__.py (LogEntry.__init__): added extra arguments for new
  fields

  (ChangedPathEntry): new class to hold information about the changed paths
  associated with a revision

  (LogReceiver.__init__): added some new members to hold more state for the
  callback function

  (LogReceiver.receive): added some code to crawl through the "paths" hash
  and save useful information

  (get_logs): changed to work with new LogReciever constructor

  (fetch_log): changed call to repos.svn_repos_get_logs() to pass true for the
  "discover_changed_paths" argument. moved fs.file_length() call into
  LogReceiver.__init__


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@675 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-07-03 06:20:24 +00:00
rey4 61406314a9 Changes intended to simplify handling URLs in ViewCVS. Nearly all
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
2003-07-01 08:35:28 +00:00
cmpilato 0a88d6f1a6 * viewcvs/lib/vclib/svn/__init__.py
(get_logs, fetch_log): Add file sizes to file LogEntry() items.

* viewcvs/templates/log.ezt
  Add file size display for Subversion repositories.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@665 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-06-26 19:54:13 +00:00
cmpilato 5473b5d8d4 No longer display "Changes since" for non-CVS repositories
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@646 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-04-29 20:32:51 +00:00
timcera bd78d04280 Bolding revision number. See patch
http://sourceforge.net/tracker/index.php?func=detail&aid=621979&group_id=18760&atid=318760


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@582 8cb11bc2-c004-0410-86c3-e597b4017df7
2003-02-01 05:02:09 +00:00
cmpilato 5a5450e4c9 Implement alternative URL scheme, and make Subversion a little more
public.  Miscellaneous Subversion bug fixes, too.

* viewcvs/lib/config.py
  (Config.set_defaults): Add default state for 'root_as_url_component'
    option.  Remove "CVS" from the 'general/address' and
    'general/main_title' default values.

* viewcvs/cgi/viewcvs.conf.dist
  Lots of documentation changes in here.
  (root_as_url_component, svn_roots, svn_parent_path): New options.
  (address, main_title): Lose the "CVS" in the value.

* viewcvs/lib/viewcvs.py
  (Request.__init__): Handle the new 'root_as_url_component' option.
  (list_roots): New.
  (clickable_path, download_url): Take any embedded roots into account
    during href generation.
  (view_diff): Fix the revision parsing here.  I dunno why I ever made
    this code CVS-specific in the first place...
  (view_log_svn): Populate 'roottype' data member.
  (view_log_cvs): Was view_log().  Populate 'roottype' data member.
  (view_directory_cvs, view_directory_svn): Use new list_roots()
    helper.  Also, calculate 'nav_path' unconditionally (it may be
    None, but it will at least be defined so templates can use it).
  (main): Update call to view_log_cvs().

* templates/directory.ezt
* templates/dir_alternate.ezt
  Take 'embedded_root' into account for href generation.

* templates/log.ezt
  Do some "CVS" vs. "Subversion" string changing.  Disable "annotate"
  link for Subversion.

* templates/log_table.ezt
  Disable "annotate" link for Subversion.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@575 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-12-12 02:02:52 +00:00
gstein 43c6a836e4 Fix the URL construction to use entities for the ampersands.
Submitted by: Ville Skytt� <scop@users.sourceforge.net>


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@569 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-10-10 23:08:52 +00:00
cmpilato b5d5e9d245 * viewcvs/lib/viewcvs.py
(handle_config): Use '' instead of None for the default value of
    "search".  A bug in urlencode() requires it.
  (view_diff_svn): New placeholder function.
  (Request.__init__, human_readable_diff): No longer chop the '.diff'
    off of the path.
  (main): Reorg the code here a bit.  I'm pretty sure I didn't
    actually change the logic outside of adding: redirect on file
    paths that have the extra '.diff' tacked on, and call the
    view_diff_svn stub at the right time.

* templates/log.ezt
* templates/log_table.ezt
* templates/include/diff_form.ezt
  Stop tacking that confounded ".diff" onto the diff queries.  The
  presence of r1 and r2 are enough to do the job.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@552 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-09-27 14:53:31 +00:00
timcera ce16ab01b0 Added UTC/localtime feature based on patch supplied by Guy Davis in
'[ 548889 ] Local time display option'.
* Made a 'make_time_string' function that returns formatted date
  string in localtime or UTC, based on configuration choices.
* Added 'use_localtime' option in 'cgi/viewcvs.conf.dist' and
  'lib/config.py'.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@510 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-05-06 02:05:25 +00:00
timcera 8004d3ed59 Made common elements of the log templates into include files. Makes the
templates much easier to read and allows easier movement of the
elements around on the page.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@461 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-01 03:29:25 +00:00
timcera d72922d81b This changes the behavoir of the View and Download links on log and log_table.
* For text files:
  'Download' opens download to file dialog box
  'View as Text' displays revision in new window
  'View as markup' displays enscript colored view with header information
  'View annotated' displays blame

* For gif, jpeg, and png:
  'View' displays graphic with header information similar to text markup

* For other binaries:
  'View/Download' will either view or download depending on browser's
   mime type / application settings.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@460 8cb11bc2-c004-0410-86c3-e597b4017df7
2002-02-01 03:02:17 +00:00
timcera 16bcb9e218 Added paging capability.
* Added use_pagesize to viewcvs.conf.dist and config.py
  * Modified directory and log templates to have a <select>
    pulldown menu based on files for directory views and revs
    for file logs.  Also setup to make the current page the
    'selected' item in the pulldown.
  * Added paging function to viewcvs.py.  Called from
    view_directory and view_log.
  * Added two variables to the _sticky_vars, dir_pagestart and
    log_pagestart.  Couldn't use a single pagestart var because
    it stuck around between the directory and log pages.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@434 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-31 04:39:34 +00:00
gstein 830c6ba76c Move the footer to its own template, and include it from the others.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@394 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:09:00 +00:00
gstein e9a4e3bbe2 Minor fix to the diff-selection popup. It tested for "c" when it
should have been "s". (the resulting bug is that a side-by-side diff
would never appear pre-selected in the popup)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@393 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-18 00:06:53 +00:00
pefu acbf138a6e Add Help buttons.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@386 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-12-12 20:42:31 +00:00
gstein 51988428f2 Fix up the diff links:
* put them back on a single line

* restore ordering -- "previous" is the most common, so it goes first

* add the action text into Diff links for larger hit targets
  (idea from Stephen Lamm <slamm@yahoo-inc.com>)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@338 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-18 11:30:27 +00:00
timcera a0503097c0 * Developed a solution for the hanging 'Diff' issue. Rather simple solution
really, which means that I probably overlooked something, but it works.
* Rearranged the diff links.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@302 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-09 18:06:11 +00:00
timcera 9639a02d25 * Added log_table.ezt as a draft table format for the log page. Need to add
logic for sorting similar to what is available on directory page. Need more
  testing to make sure format is scalable to complex repositories.
* Fixed small bug in log.ezt.  Stray 'Diff' string in the wrong place.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@291 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-11-03 04:17:17 +00:00
pefu 91f6f38ae4 * Removed the Graph column from directory display and changed the File
column to colspan=2, if cfg.options.use_cvsgraph is enabled.  This is
  a very minimal change not solving what Greg called
     """the stupid stuff about table headers in view_directory() and
        directory.ezt needs to be cleaned up. Specifically, the whole
	"show_author" crap should just be an aspect of the template, not the
	code."""
  Although I still believe, that the /icons/small/image2.gif would look
  better, I left the text "(graph)" as represenation of the link in there.
* Added a link to the cvsgraph display to the log.ezt template.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@268 8cb11bc2-c004-0410-86c3-e597b4017df7
2001-10-24 23:26:09 +00:00