* lib/viewcvs.py
(_UNREADABLE_MARKER):
removed
(DirEntry):
new class to replace directory entry tuples
(get_file_data_svn, get_file_data):
take repository object and directory path as arguments instead of
taking the entire Request object. And return DirEntry instances
instead of tuples
(get_file_tests):
removed, code moved into get_file_data
(get_last_modified, sort_file_data, view_directory_cvs,
view_directory_svn, search_files, generate_tarball_cvs):
work with DirEntry instances instead of tuples
(search_files):
change the way this is called and remove cvs-specific code so
subversion listings could potentially have regular expression
searching
(download_tarball, generate_tarball_cvs, generate_tarball_svn):
change the way two recursive parameters are used to make it
easier to call vclib-style functions
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@731 8cb11bc2-c004-0410-86c3-e597b4017df7
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
* 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
* viewcvs/lib/vclib/svn/__init__.py
(get_last_history_rev): Add 'pool' argument; use it instead of the
repository object's pool.
(get_logs): Make this sucker us an iteration subpool. Update call
to get_last_history_rev().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@727 8cb11bc2-c004-0410-86c3-e597b4017df7
to disable a buggy and inefficient subversion feature. But it's no
longer neccessary with C. Mike's recent improvements to the subversion
module.
* viewcvs.conf.dist
(show_changed_paths):
removed option
* lib/config.py
(Config.set_defaults)
removed default assignment
* lib/viewcvs.py
(run_viewcvs):
stop passing option value to repository object
* lib/vclib/svn/__init__.py
(log_helper, fetch_log):
stop passing option value to log_helper function
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@726 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/vclib/svn/__init__.py
(_trim_path):
new function to take leading slashes off paths
(log_helper):
remove leading slashes from paths that get used by templates
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@725 8cb11bc2-c004-0410-86c3-e597b4017df7
* standalone.py
(global code):
remove os.chdir() call and set viewcvs.g_install_dir variable so
the templates and configuration file can be found
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@723 8cb11bc2-c004-0410-86c3-e597b4017df7
(handle_config):
when viewcvs is run without being installed first, look for a
viewcvs.conf file in the root of tree instead of in the current
directory
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@722 8cb11bc2-c004-0410-86c3-e597b4017df7
(log_helper): Stop skipping over revisions in which the target path
didn't actually change. If we decide to re-add this feature, we
need to do it in viewcvs.py itself (because other code, like
view_markup(), is depending on getting real values for all
relevant revisions.
(get_last_history_rev): New.
(get_logs): Move this function down in the file, and now call
get_last_history_rev() instead of fs.node_created_rev().
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@721 8cb11bc2-c004-0410-86c3-e597b4017df7
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
(read_log): Word-capitalize the "Tag Not Found" status line.
(view_diff): Add 400 status to the exceptions.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@718 8cb11bc2-c004-0410-86c3-e597b4017df7
(get_file_data_svn): Use request.full_name, not just full_name,
since the latter doesn't exist in the scope.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@717 8cb11bc2-c004-0410-86c3-e597b4017df7
(NodeHistory): New collector class.
(get_history): Use svn_repos_history() now instead of directly using
the fs.history interface.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@715 8cb11bc2-c004-0410-86c3-e597b4017df7
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
(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
too.
* viewcvs/lib/vclib/svn/__init__.py
(date_from_rev): Remove a semicolon (it's a Python no-no).
(get_history): Remove an errant space, and take advantage of
Python's kewl tuple support to avoid a temp variable and simplify
the read.
(log_helper): Promote to a "real" function, adding some params and
returning a real value.
(fetch_log): Move the sub-function log_helper out.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@711 8cb11bc2-c004-0410-86c3-e597b4017df7
(optionally, turned off by default). No diffs across paths yet, but
that's coming soon(ish)!
* viewcvs/lib/vclib/svn/__init__.py
(LogReceiver): Buh-bye.
(get_history): New.
(fetch_log): Use get_history() instead of the svn_repos_get_logs interface.
* viewcvs/lib/config.py
(Config.set_defaults): Add default for 'cross_copies' option.
* viewcvs/lib/viewcvs.py
(Request.run_viewcvs): Set the 'cross_copies' SubversionRepository
attribute based on the config option of the same name.
* viewcvs/viewcvs.conf.dist
(cross_copies): New.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@709 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/viewcvs.py:
(g_install_dir): from the CGI, the conf is a couple levels up (now)
rather than just one.
(view_directory_cvs): row.name must be set for all row types since it
will be displayed as part of the error lines. move the assignment
further up in the file.
* www/cgi/viewcvs.cgi:
(__main__): the lib is a couple levels up from the CGI (now)
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@706 8cb11bc2-c004-0410-86c3-e597b4017df7
for example, which using Subversion). This fixes #Bugs item #793866,
reported by Timothee Besset.
* templates/dir_alternate.ezt
* templates/directory.ezt
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@704 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/compat.py (cvs_strptime): make compatibility function throw a
ValueError when time is not in expected format, so it is more
like the native function
* lib/viewcvs.py (rcs_date_reformat): catch ValueError exception
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@702 8cb11bc2-c004-0410-86c3-e597b4017df7
<David.Oxley@workplace-systems.plc.uk> on Subversion dev list
* lib/sapi.py (ModPythonServer.getenv): derive SCRIPT_NAME from apache
request instead of using mod_python's value
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@700 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/popen.py
use string functions instead of methods
* lib/viewcvs.py
use apply() function instead of **arg calling syntax
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@697 8cb11bc2-c004-0410-86c3-e597b4017df7
formatted dates. Bug reported by zindine <zindine at easynet.fr> who
encountered this using cvsnt's rcsdiff.
* lib/compat.py (cvs_strptime): changed to return None when the date
doesn't match, instead of throwing an exception
* lib/viewcvs.py (rcsdiff_date_reformat, human_readable_diff): changed
to display unaltered date string returned by rcsdiff when it can't
be parsed.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@696 8cb11bc2-c004-0410-86c3-e597b4017df7
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
based on patch from Steve Lamm (slamm)
* lib/vclib/bincvs/__init__.py (parse_log_entry): fixed to work with
versions of RCS that add extra dashed separator lines
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@691 8cb11bc2-c004-0410-86c3-e597b4017df7
* tools/loginfo-handler (HeuristicArgParse, CvsNtArgParse): added tests
to detect command line parameters ending in "- Imported sources'"
(debug, warning, error): changed these functions to write to standard out
instead of standard error
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@687 8cb11bc2-c004-0410-86c3-e597b4017df7
* lib/cvsdb.py (ConnectDatabase): now returns an existing database
connection instead of always creating a new one.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@685 8cb11bc2-c004-0410-86c3-e597b4017df7
* viewcvs/viewcvs.conf.dist
Make the 'show_changed_paths' option default to 0. We should
generally avoid a policy of checking in code that, by default,
SEGFAULTs. Further, showing changed paths in Subversion is a large
deviation of the manner in which CVS behaves, and I'd like to keep
the two displaying as similarly as possible in the default setup.
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@684 8cb11bc2-c004-0410-86c3-e597b4017df7
true and a directory containing the file being displayed has been copied
* vclib/svn/__init__.py (LogReceiver.__init__): added a new member
called "node_id" and changed parameters passed to constructor
(LogReceiver.receive): now compares each changed file in a revision
with the file being displayed using file revision identifers rather
than pathnames. Also removed some leftover debugging code
(fetch_log): adjusted arguments passed to LogReceiver constructor
git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@683 8cb11bc2-c004-0410-86c3-e597b4017df7