Commit Graph

1053 Commits (2c0181d6253def8584edbd7cbd04d5c3ec81e011)

Author SHA1 Message Date
cmpilato 2481c9a5c9 Normalize configured paths at a different time so that we don't
destroy URLs used by the svn_ra module.

* viewcvs/lib/config.py
  (_parse_roots): Don't normalize the paths for roots here -- it will
    destroy URLs.

* viewcvs/lib/viewcvs.py
  (Request.run_viewcvs): Normalize them here, *after* we know what's a
    URL and what's a normal path.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@917 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-09-09 22:10:57 +00:00
jhenstridge 302fa88601 * templates/include/dir_footer.ezt: get rid of validity error due to
misnesting of <form> and <table> tags.
* templates/include/diff_form.ezt: get rid of a similar problem in the
  diff form.
  Also simplify the form a bit for the case when there are no tags (ie.
  subversion).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@916 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-09-03 12:31:59 +00:00
jhenstridge c969184313 * templates/directory.ezt, dir_alternate.ezt: make the sort order arrow
part of the header hyperlink.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@915 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-09-03 11:48:38 +00:00
cmpilato f857dad099 Learn these here RCS parsers about the fact that that "branch" keyword
over yonder is right optional.  Patch by Max Bowsher <maxb@ukf.net>.
Faux cowboy by cmpilato.

* lib/vclib/ccvs/rcsparse/common.py (_Parser.parse_rcs_admin)
* lib/vclib/ccvs/rcsparse/default.py (Parser.parse_rcs_admin)
* tparse/tparse.cpp (parse_rcs_admin)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@914 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-08-17 23:08:54 +00:00
cmpilato e58b5f67aa * lib/viewcvs.py
(_re_validate_number): Allow brackets in tag names.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@913 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-08-17 19:17:55 +00:00
cmpilato e376b03b6d * website/styles.css
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
2004-08-14 16:50:57 +00:00
cmpilato 2f0a5efaf1 Cleanup the new dead file handling code to be more template-friendly
(and honest).

* lib/viewcvs.py
  (view_directory): Always calculate the num_dead variable with
    truth.  Just because we aren't showing dead files doesn't mean they
    don't exist.

* templates/include/dir_header.ezt
  Provide a single place for reporting the number of, and toggling the
  display of, dead files.

* templates/directory.ezt
* templates/dir_alternate.ezt
  Stop handling dead file display toggling on what appears (and yet
  isn't) a per-item basis.  Also, use Apache's broken.gif as the icon
  for dead files.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@911 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-08-11 14:35:44 +00:00
rey4 4f1e9a7ce7 Update alternate template.
* templates/dir_alternate.ezt
    fix handling of attic directories as in templates/directory.ezt, rev 1.47


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@910 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-08-01 14:41:39 +00:00
rey4 72f060b3ad Get the query view working on windows. The backslashes in repository paths
weren't being escaped before being embedded in sql strings.

Also do some cleanup in dbi.py

* lib/cvsdb.py
  (CheckinDatabase.SQLQueryListString):
    escape string values using Connection.escape() method

  (CheckinDatabase.CreateSQLQueryString):
    update calls to SQLQueryListString()

* lib/dbi.py
  (Cursor, Connection):
    remove these proxy objects, they don't do anything

  (connect):
    return MySQLdb.Connection object instead of proxy object


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@909 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-08-01 14:33:00 +00:00
rey4 f3ca45b9a0 Handle CVS Attic paths transparently in the bincvs module
instead of exposing them to users.

* templates/include/dir_footer.ezt
    add link to show dead files

* templates/directory.ezt
    remove code for detecting Attic entries,
    change (in the attic) caption to (dead)

* lib/viewcvs.py
  (Request.run_viewcvs):
    handle old Attic URL's by redirecting,
    remove unused request.full_name member

  (get_up_path, _re_up_attic_path, nav_header_data, generate_tarball,
   download_tarball):
    remove code for handling Attic directories

  (view_markup):
    remove unused "full_name" variable

  (view_directory):
    remove code for handling Attic directories,
    replace "no_match" template variable with "num_dead"

  (view_log):
    update call to get_up_path

  (view_annotate, view_cvsgraph_image, view_cvsgraph, view_diff):
    use CVSRepository.rcsfile to get path to rcs file

* lib/vclib/bincvs/__init__.py
  (CVSRepository.itemtype):
    look in Attic for repository files

  (CVSRepository.listdir):
    remove "cvs_list_attic" option, now always list attic files.
    leave "Attic" and "CVS" directories out of returned listing.

   (CVSRepository.rcsfile, CVSRepository._atticpath):
     new methods

   (BinCVSRepository.openfile, BinCVSRepository.filelog):
     use CVSRepository.rcsfile to get path to rcs file

   (_get_logs):
     don't mark directories as dead

* lib/vclib/ccvs/__init__.py
   (CCVSRepository.filelog, CCVSRepository.openfile):
     use CVSRepository.rcsfile to get path to rcs file

* website/upgrading.html
    document "no_match" and "num_dead" template variables


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@908 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-31 22:34:51 +00:00
rey4 98b799adbf Improve error handling in directory view.
* lib/vclib/bincvs/__init__.py
  (BinCVSRepository.openfile, BinCVSRepository.filelog, fetch_log):
    update calls to _parse_log_header

  (_re_log_error, _re_cvsnt_error, _re_lineno):
    update regular expressions for parsing rlog error messages

  (_parse_log_header):
    do a better job of parsing rlog error messages and return messages
    to callers

  (_get_logs):
    set new DirEntry.log_errors property and deal with multiple rlog error
    messages about the same file and cases where error messages precede
    file information

  (_log_path):
     return error info

* lib/vclib/ccvs/__init__.py
  (CCVSRepository.dirlogs):
    set new DirEntry.log_errors property

* lib/vclib/svn/__init__.py
  (get_logs):
    set new DirEntry.log_errors property

* lib/vclib/svn_ra/__init__.py
  (get_logs):
    set new DirEntry.log_errors property

* lib/vclib/__init__.py
  (Repository.dirlogs):
    document new DirEntry.log_errors property

* lib/viewcvs.py
  (view_directory):
    set new template variables

* website/upgrading.html
    document new template variables

* templates/include/dir_footer.ezt
    get rid of confusing "One or more files were unreadable" message.
    We display more specific error messages in the directory list.

    add links to set selection criteria at the bottom of "There are
    [num_files] files, but none match the current selection criteria"
    message

* templates/directory.ezt
* templates/dir_alternate.ezt
    simplify the way error messages are displayed


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@907 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-31 14:38:03 +00:00
jhenstridge 73a344bb15 * lib/viewcvs.py (view_diff): also use entry.filename as the location for
the view_href in the case where the path type is a directory.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@906 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-29 02:37:47 +00:00
jhenstridge 32b741f259 * lib/viewcvs.py (view_log): when constructing the view and download URLs,
use entry.filename as the location.  This fixes the view/download links
  when the log crosses a copy boundary.  Fixes bug #999355.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@905 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-29 02:33:04 +00:00
jhenstridge ea19338677 * lib/viewcvs.py (htmlify): when htmlifying email addresses, encode the
@ symbol as a character reference.  This can trip up some email address
  spiders, while being transparent to web browsers.
  The idea came from Bugzilla.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@904 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-29 02:04:16 +00:00
jhenstridge 7a0284214c * templates/include/header.ezt: remove stray </h1> tag.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@903 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-28 02:51:40 +00:00
jhenstridge 997d4f85d1 * lib/viewcvs.py (view_directory): If it is a subversion repository,
use the directory revision number as a weak etag.
 (view_revision_svn): use the revision number as a weak etag.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@902 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-26 09:00:42 +00:00
jhenstridge 85d9d50631 * diff_form.ezt: wrap the text associated with the "makepatch" checkbox
in a <label> element, so that users can click on the text to toggle
  the value.
  Quote a few unquoted attribute values.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@901 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-26 08:17:15 +00:00
jhenstridge d906319a8e * viewcvs-install (install_tree): don't install files ending in '~', since
this is the suffix many unix editors use for backups (and there aren't
  any files with that suffix in viewcvs).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@900 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-26 05:20:39 +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
rey4 db74810b91 Normalize user-specified paths in cvs_roots, svn_roots, and root_parents.
The bincvs module doesn't take kindly to paths with alternate directory
seperators or trailing slashes.

* lib/config.py
  (_parse_roots):
    call os.path.normpath for cvs_roots and svn_roots paths

* lib/viewcvs.py
  (handle_config):
    call os.path.normpath for root_parents paths


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@898 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-23 23:47:00 +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 4f348926fe Add thead/tbody tags to log_table.ezt, query.ezt and revision.ezt
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@895 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-23 09:55:50 +00:00
jhenstridge 09165074cf set size of sort arrow images, so that they don't cause reflows while
loading.  Wrap the column headers in a <thead> tag, and the rest of
the elements in a <tbody> tag.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@894 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-23 08:43:04 +00:00
jhenstridge 0f89aa8265 Add vc_log CSS class to log message on revision.ezt template. Fix from
Simon Lieschke (patch #995667)


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@893 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-22 10:08:29 +00:00
jhenstridge 768233a590 fix up typo in comment.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@892 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-22 08:58:18 +00:00
jhenstridge 80e621dc0d Sort the tags attached to a revision in the log view. Fix came from
bug #994522.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@891 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-22 02:19:07 +00:00
jhenstridge 247234ff03 Add support for generating backout scripts from query results like Bonsai
can.  Suggested in Bug #777122.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@890 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-22 02:10:51 +00:00
jhenstridge af221adef2 Use a different parameter name for the query sort key so that it doesn't
get mixed up with the directory view sort (similar to how the log view
uses logsort as a parameter name).

Don't display the branch column in results for a subversion repo query.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@889 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-21 16:01:09 +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 69d586a5d8 Since you don't need to click on the sort arrow to change sort direction,
don't make the arrows look like buttons.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@887 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-21 15:11:48 +00:00
jhenstridge cc970525ac Simplify column sort code, so that clicking the sort column header
reverses the sort order, while clicking on other headers sorts by
that column in ascending order.  This matches how most GUIs handle
sorting in columned lists.

Also port the sort handling from dir_alternate.ezt to directory.ezt
to reduce differences between the two templates.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@886 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-21 14:58:30 +00:00
jhenstridge 57c58fde9b Fix up dir_alternate.ezt template to fix bug #995121 (switch the
pathname and revision links for directories).

Previously dir_alternate.ezt was broken for CVS repositories, resulting
in a traceback since it was trying to show the log href which doesn't
exist.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@885 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-21 12:17:50 +00:00
jhenstridge 55bdd8cb45 Convert double dashes in comment to single dashes, since the double dash
ends the comment.  Mentioned in a Debian bug report:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245550

Add a <meta name="generator"> tag to the top listing the version of
viewcvs used to generate the page.  This is less likely to be removed
from custom templates, and should be helpful when tracking bugs.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@884 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-20 07:26:52 +00:00
jhenstridge fcdcd96359 Remove the italics from the log message CSS rules, since regular type
was more common for rendering log messages.

Before, non-italic was used in the markup, log and query templates,
while italic was used in log_template and query_results (which I copied
off of log_template).


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@883 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-20 07:16:50 +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
jhenstridge 8a3030d4cf use CSS classes for the different columns in annotate mode. In particular,
set "white-space: pre" for the text column, so that white space isn't
collapsed.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@881 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-18 11:11:56 +00:00
jhenstridge 236668b628 Expose glob matching and notregex matching in query_form.ezt.
Loosen some of the parameter validation to _validate_regex for
branch, file and who query parameters.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@880 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-18 06:37:31 +00:00
jhenstridge f3cbf1e629 Add two new match types: notregex and glob. The "glob" match type is
implemented using fnmatch to translate it into a regular expression.

Refactor CreateSQLQueryString a little bit to split out join conditions.
Previously if you wanted to query files names A or B, it would generate
SQL like this:
  ((checkins.fileid=files.id AND files.file='A') OR
   (checkins.fileid.files.id AND files.file='B'))
Now it generates the shorter (and hopefully easier to optimise):
  (checkins.fileid=files.id) AND (files.file='A' OR files.file='B')
I'd change it to do INNER JOIN's, but apparently MySQL 3.22 doesn't
support them fully.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@879 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-18 05:41:53 +00:00
jhenstridge 7ad43eaa74 Port the "diff link" support over to the query.cgi script.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@878 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-17 06:46:02 +00:00
jhenstridge d8cc63ee4e Add simple querying support directly to the viewcvs script. This is
closer to the Bonsai query interface, and provides better integration
with the rest of viewcvs.

Fixed two bugs in cvsdb.py:
 - when loading up query results, set the checkin type on the Commit object
 - When sorting on file name or author, order by the name rather than ID.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@877 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-17 06:03:33 +00:00
jhenstridge 41c06a258e Fix file descriptor leak in standalone.py
Reported as http://sourceforge.net/tracker/?func=detail&aid=735455&group_id=18760&atid=318760


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@876 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-17 01:50:20 +00:00
jhenstridge a6ae62b59f 1) add a bit of documentation on using svndbadmin to load revision
information into the query database.
2) Update query.cgi to set [docroot] correctly.  This allows it to find
   the stylesheet, and corrects the help link in the footer.
3) Results could point at subversion repositories, so check if the
   repository is in svn_roots too.
4) Only display repository names rather than paths in the results.
   This matches what viewcvs.cgi shows the user.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@875 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 16:39:46 +00:00
cmpilato 4a479b303b Add copyright info to SVN mailer patch.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@874 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 16:31:21 +00:00
cmpilato 39beba2aa9 New patch for integration with Subversion's mailer.py script.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@873 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 16:25:59 +00:00
jhenstridge 4d6369388e Remove the svn_parent_path config value, and replace it with a root_parents
config value, which can handle CVS repositories as well as Subversion ones.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@872 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 15:43:01 +00:00
cmpilato 648ac31eb3 * viewcvs/lib/viewcvs.py
(list_roots): Make the roots hash values into tuples, adding the roottype.
  (common_template_data): Make the 'roots' list items into hashes that
    carry the root names and types.

* viewcvs/templates/include/header.ezt
  Split the list of repositories up into CVS ones and Subversion ones
  using optgroups.  Note the super-cool single pass over the roots,
  appending options to variables created on-the-fly.  Have I mentioned
  how much I love James Henstridge today?


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@871 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 14:11:55 +00:00
jhenstridge 59f7ac841a Fix the same issue in view_log(). Was mentioned in the same bug report
as the view_directory() one.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@870 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 14:05:14 +00:00
jhenstridge fc86389a25 s/query_dict/request.query_dict/ in view_directory() to fix traceback
when using pages.  Reported in the bug tracker as:
  http://sourceforge.net/tracker/index.php?func=detail&aid=953892&group_id=18760&atid=118760


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@869 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 14:03:10 +00:00
jhenstridge d428e9fa2e - Add svndbadmin script, which can be used to add Subversion revision
information to the Bonsai checkin database.
- Get viewcvs-install to install the new script.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@868 8cb11bc2-c004-0410-86c3-e597b4017df7
2004-07-16 11:53:48 +00:00