against the upstream version of this module.
* lib/common.py
(TemplateData): Moved here...
* lib/ezt.py
...from here.
* lib/query.py,
* lib/viewvc.py
Import 'TemplateData' from 'common' now, and update references to this
relocated class.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2711 8cb11bc2-c004-0410-86c3-e597b4017df7
New file to house common definitions; _item and _RCSDIFF_*
for now. Remove local definitions in the rest of modules.
* idiff.py
(sidebyside, unified): Return _RCSDIFF_NO_CHANGES type if
the generator failed to yield anything else.
(sidebyside): Add type attribute to the returned tuple so
that template can check the type.
* diff_display.ezt
(top-level): Define messages to be used if diffs cannot be
displayed. Use the definitions in all non-raw displays.
(sidebyside,unified): Handle _RCSDIFF_IS_BINARY and
_RCSDIFF_NO_CHANGES; the former is not returned yet - will
be passed to the template once properties are diffed.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/branches/property-diff@2605 8cb11bc2-c004-0410-86c3-e597b4017df7
#433 ("queries return only partial results"). When a database query
is artificially limited by the 'row_limit' setting, inform the user
that the returned data is incomplete.
* lib/cvsdb.py
(CheckinDatabase.CreateSQLQueryString): Add 'detect_leftover'
parameter, used internally to check for a reached query limit.
(CheckinDatabase.RunQuery): Update call to CreateSQLQueryString(),
and check for leftover query response rows. If any are found, set
the appropriate flag on the query object.
(CheckinDatabaseQuery.__init__): Set initial values for new
'executed' and 'limit_reached' members.
(CheckinDatabaseQuery.SetExecuted,
CheckinDatabaseQuery.SetLimitReached,
CheckinDatabaseQuery.GetLimitReached,
CheckinDatabaseQuery.GetCommitList): New functions.
* lib/viewvc.py
(view_query): Use query.GetCommitList() now instead of poking into
the query object directly. Also, check query.GetLimitReached(),
reporting the findings through the data dictionary (via a new
'row_limit_reached' item) to the templates.
* lib/query.py
(run_query): Use query.GetCommitList() now instead of poking into
the query object directly. Now return a 2-tuple of commits and a
limit-reached flag.
(main): Update expectations of run_query() call. Populate
'row_limit_reached' data dictionary item.
* templates/query_results.ezt,
* templates/query.ezt
Display a warning if the query results are incomplete.
* templates/docroot/styles.css
(.vc_warning): New style definition.
* docs/template-authoring-guide.html
Document the new 'row_limit_reached' template item.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2551 8cb11bc2-c004-0410-86c3-e597b4017df7
mechanisms, namely by removing the largely redundant "global" limit
and allowing the per-query row limit (which already exist, too) to do
its work.
While here, remove a poorly conceived (but thankfully unhighlighted)
mechanism for overriding the administrative limit on database rows
which was accessible via URL CGI params.
* lib/viewvc.py
(_legal_params): Remove 'limit' as a legal parameter.
(view_query): No longer allow an undocumented URL parameter to
override the admin-declared SQL row limit. That should have never
been allowed!
* lib/cvsdb.py
(CheckinDatabase.__init__): Remove 'row_limit' parameter and
associated self._row_limit member.
(CheckinDatabase.CreateSQLQueryString): No longer fuss with
self._row_limit. Let the individual query carry the row limit.
(ConnectDatabase): Update call to CheckinDatabase().
* lib/query.py
(form_to_cvsdb_query): Now accept 'cfg' parameter, and set the
query's row limit from the configured defaults.
(run_query): Update call to form_to_cvsdb_query().
* docs/url-reference.html
Remove reference to the 'limit' parameter.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2547 8cb11bc2-c004-0410-86c3-e597b4017df7
still generating the same defaults as before.
* conf/viewvc.conf.dist
(query, query.viewvc_base_url): New section and value.
* lib/config.py
(_base_sections): Add 'query'.
(Config.set_defaults): Set default value for cfg.query.viewvc_base_url.
* bin/asp/query.asp,
* bin/cgi/query.cgi,
* bin/mod_python/query.py,
* bin/wsgi/query.fcgi,
* bin/wsgi/query.wsgi,
Ask the configuration for the location of ViewVC before falling back
to old defaults.
* templates/query.ezt
Don't reference unset variables. Do test the log message for
empty-ness, dropping a non-breaking space in place where it is.
* templates/include/footer.ezt
Don't reference unset variables.
* lib/query.py
(build_commit): Allow ob.log to be empty. Don't generate ViewVC
links if we don't have a base URL for ViewVC.
(main): Calculate docroot in light of possible absent viewvc_link.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2458 8cb11bc2-c004-0410-86c3-e597b4017df7
of this is aimed at not paying the maintenance price of supporting
Python versions prior to 2.4 any longer, plus a little bit of just
getting dead code out of the way.
* lib/compat.py
Remove as unused.
* bin/cvsdbadmin,
* bin/loginfo-handler,
* bin/make-database,
* bin/svndbadmin,
* lib/accept.py,
* lib/blame.py,
* lib/cvsdb.py,
* lib/popen.py,
* lib/query.py,
* lib/sapi.py,
* lib/vcauth/forbidden/__init__.py
* lib/vcauth/forbiddenre/__init__.py,
* lib/vcauth/svnauthz/__init__.py,
* lib/vclib/__init__.py,
* lib/vclib/ccvs/blame.py,
* lib/win32popen.py,
* tests/timelog.py
Replace explicit import and use of the 'string' module with newer constructs.
* bin/standalone.py,
* lib/viewvc.py
No longer use 'compat' module. Replace explicit import and use of
the 'string' module with newer constructs.
* lib/dbi.py
Use calender.timegm() instead of compat.timegm().
* lib/vcauth/__init__.py
Lose unused module imports.
* lib/config.py,
Replace explicit import and use of the 'string' module with newer
constructs where possible. Lose old ConfigParser patch-up code for
Python 1.5.1.
* lib/vclib/ccvs/ccvs.py
Replace explicit import and use of the 'string' module with newer
constructs where possible. Import _path_join() from bincvs, and use
it instead of a bunch of copy-and-pasted string join() statements
throughout.
* lib/vclib/ccvs/__init__.py
(cvs_strptime): Moved here from the 'compat' module.
* lib/vclib/ccvs/bincvs.py
(): No longer use 'compat' module. Replace explicit import and use
of the 'string' module with newer constructs.
(_path_join): New, used now instead of a bunch of copy-and-pasted
string join() statements throughout.
* viewvc-install
Don't use the 'compat' module any more.
Also, so some rearranging of non-critical bits.
* misc/: New directory.
* misc/py2html.py: Moved from 'lib/py2html.py'.
* misc/PyFontify.py: Moved from 'lib/PyFontify.py'.
* misc/elemx/: Moved from 'elemx/'.
* misc/tparse/: Moved from 'tparse/'.
* tools/make-release
Omit 'misc' directory from releases, too.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
the ViewVC codebase. Simplify, conjoin, remove, etc.
* lib/sapi.py
(escape): New function. *The* preferred HTML-escaping mechanism.
(Server.escape): New common Server object escape mechanism (which
uses the aforementioned escape(), of course).
(CgiServer.escape, WsgiServer.escape, AspServer.escape,
ModPythonServer.escape): Lose as unnecessary.
* lib/viewvc.py
(Request.get_form): Escape hidden form variable names and values.
(htmlify): Remove.
(): Replace all uses of cgi.escape() and htmlify() with (directly or
indirectly) sapi.escape().
* lib/query.py
(main): Use server.escape() instead of cgi.escape().
* lib/blame.py
(HTMLBlameSource.__getitem__): Use sapi.escape() instead of
cgi.escape().
* lib/idiff.py
(_mdiff_split, _differ_split): Use sapi.escape() instead of
cgi.escape().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2344 8cb11bc2-c004-0410-86c3-e597b4017df7
Make per-root authorizer-related configuration work so that admins can
feel comfortable exposing their root listing views again.
Also, make the query interface require that queried roots be
configured (explicitly or implicitly) to use either the 'forbidden'
authorizer or none at all. This is a security fix, since
administrators might reasonably have thought that if they configured a
root to use another authorizer, the query interface would have honored
that configuration.
* lib/config.py
(Config.__init__): Now track whether root options have been overlayed.
(Config.overlay_root_options): Assert that no root options have been
overlayed (and then noted that they now have).
(Config.get_authorizer_and_params_hack): New function to workaround
our inability to un-overlay root-specific options. It's only the
query interface and root listing views that really need to act on
multiple roots at once, and really only the authorization options
that matter there anyway.
(Config.get_authorizer_params): Remove per-root overlay hacks from
this function.
* lib/viewvc.py
(Request.run_viewvc): Update call to setup_authorizer() (to not
specify the rootname).
(setup_authorizer): Make the rootname parameter option, as a flag
for whether to consult the current configuration or instead use
the hack which manually digs around for per-root overrides of
authorizer stuffs.
* lib/query.py
(is_forbidden): Don't try to apply the 'forbidden' authorizer where
some other (or no) authorizer has been configured for a given
root. But do complain if another authorizer has been configured,
rather than simply letting stuff leak through that an
administrator might reasonably expect to have been hidden.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2300 8cb11bc2-c004-0410-86c3-e597b4017df7
in all of its templated views. Do this with a custom, dictionary-like
class that prevents the creation of new keys after an initial
instantiation of keys and (possibly dummy) values.
* lib/ezt.py
(TemplateData): New.
* lib/viewvc.py
(common_template_data): Now return an ezt.TemplateData() object.
(make_comma_sep_list_string): New.
(markup_or_annotate): Use new ezt.TemplateData() interface now. Use
make_comma_sep_list_string() where applicable.
(view_roots, view_log, view_cvsgraph, view_diff, view_revision,
view_queryform, view_query): Use new ezt.TemplateData() interface now.
(view_directory): Use new ezt.TemplateData() interface now. Drop
'search_re_form' dictionary item.
* lib/query.py
(main): Use new ezt.TemplateData() interface now. While here, drop
'script_name' calculation (it isn't used).
* templates/include/dir_header.ezt
Display the search form if 'search_re_action' is set, not 'search_re_form'.
* docs/template-authoring-guide.html
Remove 'search_re_form'. Update 'search_re_action' description.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2123 8cb11bc2-c004-0410-86c3-e597b4017df7
Ability to connect to MySQL through UNIX socket
diff links in query.py are shown now (moved expand_root_parents to config.py)
full-text comment searches in query and query_form are supported using MySQL FULLTEXT indexes
<select> for repository selection in query
git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@5 6955db30-a419-402b-8a0d-67ecbb4d7f56
message read thusly:
On the 1.0.x branch:
Fix buglets (and minor security leak) related to the files attached
to commit items in the query view and query.cgi script results. These
views still returned commit objects with all attached metadata even
when all the files associated with that commit were blocked due to
configured forbiddenness. The generic query.ezt template masked this
bug (because it was keyed on the files more so than on the commit
items), but query_results.ezt revealed it. Also, we were doing change
limiting at the wrong time, so you'd get results that showed 2 files
but read "Only first 5 files shown...".
* lib/viewvc.py
(build_commit): Trade the 'limited_files' parameter for a
'max_files' parameter, and change the way file counting and
filtering happens so we get accurate file counts and the maximum
number of allowed files when limiting changes. Now returns None
if the would-be-returned commit item has no associated allowed
files, and defers building of the commit item until necessary.
(view_query): Don't do file limiting here, defer it to
build_commit(). Also, watch for (and ignore) None returns from
build_commit(), too.
* lib/query.py
(run_query): Strip out commits which have no associated files.
Since commits in the query view are file-driven, the only way we
could have a commit that has no files is if the files were
stripped by forbiddenness checks.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1804 8cb11bc2-c004-0410-86c3-e597b4017df7
convention of ViewVC into a tizzy, so rework the way the auth handling
stuff works there. We'll get root-specific handling of 'forbidden'
out of this as a result.
* lib/query.py
(is_forbidden): New.
(build_commit): Lose the 'auth' parameter, and call is_forbidden to
determine if a given result may be displayed.
(run_query): No longer grab an Authorizer object. Update calls to
build_commit().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1673 8cb11bc2-c004-0410-86c3-e597b4017df7
check_file_access() functions into a single check_path_access(). Most
authorizers won't need to care about the distinction.
* lib/vcauth/__init__.py
(GenericViewVCAuthorizer.check_path_access): New, replaces ...
(GenericViewVCAuthorizer.check_file_access,
GenericViewVCAuthorizer.check_directory_access): ...these
now-removed functions.
(ViewVCAuthorizer.check_path_access): New.
(ViewVCAuthorizer.check_file_access,
ViewVCAuthorizer.check_directory_access): Removed.
* lib/vcauth/forbidden/__init__.py
(ViewVCAuthorizer.__init__): Squirrel away 'root' so we can use it ...
(ViewVCAuthorizer.check_path_access): ...here. Was
check_directory_access(), and now optionally checks the path's type
before making the access determination.
(ViewVCAuthorizer.check_file_access): Removed.
* lib/vcauth/svnauthz/__init__.py
(ViewVCAuthorizer.check_path_access): Was _check_path_access(). Add
'rev' parameter.
(ViewVCAuthorizer.check_file_access,
ViewVCAuthorizer.check_directory_access): Removed.
* lib/viewvc.py
(Request.run_viewvc, view_directory, _get_diff_path_parts,
generate_tarball, view_revision, build_commit): Use the
authorizor's check_path_access() instead of the now-removed
check_directory_access() and check_file_access() functions.
* lib/query.py
(build_commit): Use check_path_access() instead of
check_directory_access().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1661 8cb11bc2-c004-0410-86c3-e597b4017df7
subsystem go mainstream!
* notes/authz-dev-TODO
* lib/vcauth/*
New, copied from the authz-dev branch.
* viewvc.conf.dist
* lib/viewvc.py
* lib/query.py
* lib/debug.py
Merge changes from the authz-dev branch.
* lib/config.py
Merge changes from the authz-dev branch. Also, make 'forbidden' the
default value for 'authorizer'.
* docs/upgrading-howto.html
Add sections about handling forbidden modules.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1623 8cb11bc2-c004-0410-86c3-e597b4017df7
first-listed, cvs_roots-found, CVS repository wins.
* lib/query.py
(run_query): Ensure that in a rootname clash situation, the CVS
repository wins.
* lib/viewvc.py
(list_roots): Ensure that in a rootname clash situation, the CVS
repository wins.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1605 8cb11bc2-c004-0410-86c3-e597b4017df7
the output stream.
* lib/viewvc.py
(copy_stream): Don't supply a default value for 'dst', and don't
special-case a value of None for it, either.
(view_checkout, view_cvsgraph_image, view_doc): Pass
request.server.file() as the 'dst' parameter to copy_stream().
(view_patch): Pass request.server.file() as the 'dst' parameter to
copy_stream(). Also, use request.server.file() instead of
sys.stdout.
(download_tarball): Use request.server.flush() instead of
sys.stdout.flush().
(view_error): Use server.file() instead of sys.stdout.
* lib/query.py
(main): Use server.file() instead of sys.stdout.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1532 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/query.py
(main): Add 'rss_href' to the data dictionary so the template
doesn't freak out.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1382 8cb11bc2-c004-0410-86c3-e597b4017df7
<john@linux.intel.com> on the users list.
* lib/query.py
(build_commit): set 'commits.log' template var instead of 'commits.desc'
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1265 8cb11bc2-c004-0410-86c3-e597b4017df7
file, templates, etc). Specifically, make the following changes:
- Get rid of hardcoded paths in module files ("lib" directory) and
configuration files (viewcvs.conf and mod_python's .htaccess)
- Allow stub scripts (for asp, cgi, and mod_python) to specify
configuration files so it's possible to have multiple configurations of
viewcvs running off a single installation.
- Be more consistent about resolving paths when they aren't hardcoded
(when ViewCVS is running from a source directory). In particular, try
not to depend on the working directory. That way it's legal to run
./standalone.py instead of bin/standalone.py without getting an
ImportError.
- Get rid of global cfg variables in viewcvs.py and cvsdb.py. They led to
all sorts of hacks in other files to pilfer and reset them. They were
also possible sources of races in multithreaded environments like
mod_python and asp.
- Rewrite mod_python handler so library paths can be specified inside the
stub files.
* lib/apache.py
removed, contained old mod_python handler
* lib/config.py
(Config.load_config):
remove sys.argv voodoo, just load the configuration path specified in
the pathname argument
(Config.set_defaults):
use relative path for cvsgraph_conf setting instead of hardcoded
<VIEWCVS_INSTALL_DIRECTORY> literal
* lib/cvsdb.py
(CONF_PATHNAME, config, cfg):
removed, configuration stuff
(CheckinDatabase.__init__, CheckinDatabase.CreateSQLQueryString):
add "_row_limit" member instead of using cfg object
(CreateCheckinDatabase):
removed, a do-nothing function
(ConnectDatabaseReadOnly, ConnectDatabase):
add cfg arguments
(GetUnrecordedCommitList):
add db argument
* lib/query.py
(CONF_PATHAME):
removed
(build_commit, run_query, main):
add cfg arguments, use new viewcvs.get_template function
* lib/viewcvs.py
(CONF_PATHNAME, cfg, g_install_dir):
removed
(Request.__init__):
add cfg member
(Request.run_viewcvs, Request.get_link, check_freshness,
get_view_template, generate_page, default_view, get_file_view_info,
format_log, common_template_data, MarkupEnscript.__init__,
markup_stream_python, markup_stream_php, make_time_string, view_markup,
sort_file_data, view_directory, paging, view_log, view_annotate,
view_cvsgraph_image, view_cvsgraph, view_doc, rcsdiff_date_reformat,
spaced_html_text, DiffSource.__init__, DiffSource._get_row, view_patch,
view_diff, generate_tarball, download_tarball, view_revision,
is_query_supported, english_query, build_commit, view_query,
view_error, main):
stop using global config, use cfg arguments or request member instead
(_install_path):
new, use __file__ to locate template and configuation paths
(get_view_template):
use _install_path and return compiled template instead of path
(is_viewable, default_view):
rename is_viewable to default_view and return view instead of boolean
(handle_config, load_config):
rename handle_config to load_config and return config object instead
of setting cfg global
* bin/cgi/viewcvs.cgi
* bin/cgi/query.cgi
* bin/cvsdbadmin
* bin/loginfo-handler
* bin/standalone.py
* bin/svndbadmin
look for library relative to sys.argv[0] when no hardcoded library
path is available. Also add configuration loading code.
* bin/asp/viewcvs.asp
* bin/asp/query.asp
add configuration loading code
* bin/mod_python/.htaccess
specify new mod_python handler, remove reference to
<VIEWCVS_APACHE_LIBRARY_DIRECTORY>
* bin/mod_python/handler.py
added, holds new mod_python handler
* bin/mod_python/viewcvs.py
* bin/mod_python/query.py
rewrite for new handler, add hardcoded library and configuration paths
* viewcvs.conf.dist
remove references to <VIEWCVS_INSTALL_DIRECTORY>
* viewcvs-install
(FILE_INFO_LIST):
stop hardcoding paths in config files
(SetPythonPaths,):
get rid of <VIEWCVS_INSTALL_DIRECTORY> and
<VIEWCVS_APACHE_LIBRARY_DIRECTORY> substitutions
(ApacheEscape, _re_apache):
removed
(InstallTree):
stop hardcoding paths in lib directory
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1173 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/lib/viewcvs.py
(copy_stream): Add 'htmlize' option.
(MarkupPipeWrapper.__call__): Use copy_stream() with htmlize=1
instead of duplicating that loop logic.
(view_log): Set 'rev_selected' and 'path_selected' based on
previously acquired values.
(_re_extract_rev): Tweak regexp so it can match context diff '***'
headers, too.
(view_patch): Move request.server.header() call to just before
rendering.
(view_diff): Escape the 'patch_href' item. Move
request.server.header() call to just before rendering.
(view_error): Don't use the error template if we've already started
sending output through the server.
* viewcvs/lib/sapi.py
(ModPythonServer.__init__, ModPythonServer.header): Add and manage
new headerSent variable (like the ones used by CGIServer and
ASPServer).
* viewcvs/lib/query.py
(main): Call server headers here instead of down in the exception printer.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1136 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
where too much data was being hidden that I think I caused myself, but
also a security fix where not enough data was being hidden. At any
rate, this should bring us to consistent support for forbidden modules
(directories, not files) across the various views.
* viewcvs/lib/viewcvs.py
(Request.run_viewcvs): Move the forbidden check until later, after
we know the path type, because forbiddenness only applies to
top-level directories (modules), not files.
(view_directory): Only do forbidden checks on directories, not files.
(view_query): Strip forbidden/hidden paths from the query results.
Noticed by Jon Stritar (jstritar) in Bug #1249974.
* viewcvs/lib/query.py
(build_commit): Strip forbidden/hidden paths from query results.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1080 8cb11bc2-c004-0410-86c3-e597b4017df7
of "template sets."
I'm introducing a new configuration variable ('template_dir') which is
the parent directory of all ViewCVS templates. Those templates have
names which match the views they describe (directory.ezt,
revision.ezt, graph.ezt, etc.). The 'docroot' variable will now
default to "<template_dir>/docroot". Finally, the [templates] section
will continue to work as before, save that all configuration therein
(and templates not configured will fallback to
"<template_dir>/<view_name>.ezt").
The beauty of this is that folks can start whipping up (and
maintaining themselves) ViewCVS template sets which can be traded and
shared, like themes for Mozilla or Windows XP. EZT is super-powerful,
and there are some really fun things you can do with it to serve up
interesting and unique ViewCVS views. But while we want to encourage
creativity and innovation, we don't want the ViewCVS project itself
having to maintain everyone's fun little themes. Anyway, so now
installing a new template set is just a matter of dropping that set
directory somewhere (anywhere, really) on your system and pointing
'template_dir' to that directory tree. No (very annoying) template
modification conflicts to deal with every time you update ViewCVS on
your system.
And the best part is that existing ViewCVS configurations should all
continue to work compatibly.
* viewcvs/viewcvs.conf.dist
Add a new option, "template_dir". Tweak documentation on the
"docroot" option. And make the whole [templates] section work a
little differently.
* viewcvs/lib/config.py
(Config.set_defaults): Use 'None' as the default value for the
self.templates.directory, self.templates.log,
self.templates.query, self.templates.diff, self.templates.graph,
self.templates.annotate, self.templates.markup,
self.templates.error, self.templates.query_form,
self.templates.query_results, and self.templates.roots options.
Add a new default value for self.options.template_dir.
* viewcvs/lib/viewcvs.py
(get_view_template): New.
(generate_page): Instead of taking a template name, take a view
name. Also, call get_view_template() to generate the full
template path.
(view_markup, view_roots, view_directory, view_log, view_annotate,
view_cvsgraph, view_diff, view_revision_svn, view_queryform,
view_queryform, view_error): Update calls to generate_page().
* viewcvs/lib/query.py
(main): Use viewcvs.get_view_template().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1029 8cb11bc2-c004-0410-86c3-e597b4017df7
- Stop converting directory and file paths to lower case with native
slashes before storing them in the database. Instead store with
preserved case and forward slashes.
- Stop trying to clean up paths haphazardly all over the cvsdb module,
instead expect paths to be normalized before they get passed to
cvsdb.
* lib/cvsdb.py
(Commit.SetRepository, Commit.SetDirectory, Commit.SetFile,
CheckinDatabaseQuery.SetRepository,
CheckinDatabaseQuery.SetDirectory):
remove path cleanup code
(RLogDataToCommitList)
don't strip repository prefix because rlog module now does it
(CleanRepository):
new function
* lib/rlog.py
(_get_co_file):
change to return paths with forward slashes and without repository
prefixes
(GetRLogData):
update call to _get_co_file
* tools/cvsdbadmin
(UpdateFile, CommandUpdate, RebuildFile, CommandRebuild)
remove calls to normcase here
(module code):
use CleanRepository function to clean up repository path
* tools/loginfo-handler
(CleanDirectory):
removed
(HeuristicArgParse, CvsNtArgParse):
don't call CleanDirectory or normcase here
(HeuristicArgParseDirectory):
remove stray print statement
(module code):
use cvsdb.CleanRepository function to clean up repository path
* tools/svndbadmin
(module code):
use cvsdb.CleanRepository function to clean up repository path
* lib/viewcvs.py
(view_query):
change to use forward slashes in directory names instead of native
slashes
use cvsdb.CleanRepository function to clean up repository paths
* lib/query.py
(build_commit):
change to handle forward slashes in directory paths instead of
native slashes
(run_query):
use cvsdb.CleanRepository function to clean up repository path
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@952 8cb11bc2-c004-0410-86c3-e597b4017df7
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
setup to test it at all. :-(
* viewcvs/lib/query.py
(main): Populate the 'docroot' data dictionary item.
* viewcvs/templates/query.ezt
Stop trying (and failing) to use the common header include ... I
don't have the energy to make this thing work with that right now.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@838 8cb11bc2-c004-0410-86c3-e597b4017df7
<rey4@columbia.edu> for bringing sanity to my morning with his fix of
the "isinstance()" usage.
* viewcvs/lib/config.py
(set_defaults): Add new default value for self.templates.error.
* viewcvs/viewcvs.conf.dist
(error): New configuration variable for specifying the error template.
* viewcvs/templates/error.ezt
New default error template.
* viewcvs/lib/debug.py
(ViewCVSException.__init__): Lose the 'description' member.
(PrintException): Now prints exception data passed in (doesn't do
the sys.exc_info() call itself any more).
(GetExceptionData): New generic exception data harvester for use
with templatized output.
* viewcvs/lib/viewcvs.py
(view_error): New error printer that tries to use the error template
before falling back to direct output.
* viewcvs/lib/query.py
Update calls to debug.PrintException() to get the exception data
from debug.GetExceptionData()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@664 8cb11bc2-c004-0410-86c3-e597b4017df7
- Filled in ModPythonServer and AspServer header() methods to make use of
the new http 'status' parameter. Also, changed CgiServer's header()
method to ignore the status parameter under IIS to prevent the server
from discarding the ViewCVS output and instead sending a static error
page.
- ModPythonFile and AspFile classes have been eliminated and replaced
with a more generic File class. All server classes have new write()
and flush() methods.
- Common code from AspServer and ModPythonServer has been moved into
a base class called ThreadedServer. AspProxy is renamed to
ThreadedServerProxy.
- All server classes now inherit from a new base class called Server
which contains the small amount of code common to all of them.
- added fix_iis_path_info() function, renamed IIS_FixURL() to
fix_iis_url()
- renamed getFile() methods to file()
* lib/viewcvs.py
- Eliminated global server variable. Changed some scattered
server.escape() calls into cgi.escape() calls. Got around other uses
of the variable by adding a server member to the Request class.
- Deleted gstein's strongly worded comment about the quality of the sapi
hack :)
- Page-global 'g_name_printed' is now passed as a normal parameter
called 'name_printed' to the augment_entry() function
- Got rid of some confusing string manipulation in human_readable_diff()
- added 'server' parameter to viewcvs.main() to avoid relying on the
sapi.server global variable
* cgi/viewcvs.cgi, windows/viewcvs.py, windows/viewcvs.asp
- Added 'server' parameter to viewcvs.main() calls
* standalone.py:
- Changed StandaloneServer.header() method to accept http status code
- Added 'server' parameter to viewcvs.main() call
* lib/query.py
- added 'server' parameter to query.main() to avoid relying on the
sapi.server global variable
- got rid of global 'server' variable and page-global 'viewcvs_link'
variable, instead those values are passed as function parameters
* cgi/query.cgi, windows/query.py, windows/query.asp
- Added 'server' parameter to query.main() calls
* lib/debug.py
- Changed PrintStackTrace(), PrintException(), and DumpChildren() not to
rely on global sapi.server variable and to use new server.write()
method
* lib/popen.py
- changed server.getFile() calls to server.file()
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@642 8cb11bc2-c004-0410-86c3-e597b4017df7