Overview
Upgrading
Contributing
License
Who
|
This document describes some of the things that you will need to
consider, change, or handle when upgrading an existing ViewCVS
installation to a newer version.
Upgrading from an ancient version of ViewCVS to the latest version
isn't necessarily a multi step process. The instructions are only
organized that way. You can certainly upgrade in a single step.
It is always recommended to install the new version in a fresh directory
and to carefully compare the configuration files. A possible approach
is to name the directories /usr/local/viewcvs-0.6 ,
/usr/local/viewcvs-0.7 and so on and than create a
symbolic link viewcvs pointing to the production
version. This way you can easily test several versions and switch
back, if your users start to complain.
This section discusses how to upgrade ViewCVS 0.9 to version
1.0 or a later version of the software.
CGI Stubs
The CGI stub scripts haved been moved from
<VIEWCVS_INSTALLATION_DIRECTORY>/cgi/ to
<VIEWCVS_INSTALLATION_DIRECTORY>/www/cgi/ , so you
will need update any ScriptAlias directives pointing to them in
your apache configuration. Also, the contents of these scripts
have changed, so you may need to replace copies of the old scripts
you put in other directories.
Checkin Database
ViewCVS 1.0 reads and writes commit times in the MySQL
database in UTC time rather than local time. This can cause
times displayed on the query page to be a few hours off if
an old database is being used with a new version of ViewCVS.
The best way to fix this is to rebuild the database with the
new version of cvsdbadmin, but it it is also possible to
enable a backwards compatibility mode by setting
utc_time = 0 at the top of lib/dbi.py
Removed Template Variables
-
directory.ezt and
dir_alternate.ezt :
params
-
Replaced with new search_tag_hidden_values
variable.
graph.ezt : request.url
- Replaced with new imagesrc variable.
graph.ezt : request.where
- Replaced with path variable.
header.ezt : qquery
- Combined into file_url variable.
markup.ezt : utc_date,
href, and text_href
-
Replaced with new date_str, download_href>,
and download_text_href variables.
log.ezt and log_table.ezt :
href, query, qquery,
head_href, head_abs_href,
entries.href, and
entries.text_href
-
Replaced with new entries.annotate_href,
diff_url, diff_params,
diff_select_action,
branch_select_action,
logsort_action,
view_href, download_href,
download_text_href,
entries.download_href, and
entries.download_text_href variables.
New Template Variables
- All files: roottype
-
String denoting the type of the current repository. Either
"cvs" or "svn".
- All files: icons
-
Web path to directory containing apache icon files.
- All files: docroot
-
Web path to directory containing ViewCVS static files
(files in
<VIEWCVS_INSTALLATION_DIRECTORY>/doc )
graph.ezt : imagesrc
- String contain URL for graph image.
markup.ezt : date_str
- String representing checkin date
-
markup.ezt :
download_href and download_text_href
- New variables for links.
-
log.ezt and log_table.ezt :
entries.filename, entries.size,
entries.copy_path, entries.copy_rev,
entries.copy_href, entries.prev_path,
and entries.revision_href
- New attributes for Subversion revisions.
-
log.ezt and log_table.ezt :
view_href, download_href,
download_text_href,
entries.download_href, and
entries.download_text_href
- New variables for links.
New Template Form Variables
Each HTML form that appears in ViewCVS templates is now
associated with 2 new variables which should be used to
determine its ACTION value and its hidden field
values. Forms using the new variables look like
<form method=get action="[my_form_action]">
[my_form_hidden_values]
... form widgets go here ...
</form>
Here is a list of the new variable names and the forms they are
associated with:
Variables | Form |
change_root_action
change_root_hidden_values
|
Root selector form in directory.ezt and
dir_alternate.ezt .
|
jump_rev_action
jump_rev_hidden_values
|
Subversion directory revision selector form in
directory.ezt and
dir_alternate.ezt .
|
dir_paging_action
dir_paging_hidden_values
|
Directory paging form in directory.ezt and
dir_alternate.ezt .
|
search_tag_action
search_tag_hidden_values
|
Tag choosing and regular expression searching form in
directory.ezt and
dir_alternate.ezt .
|
log_paging_action
log_paging_hidden_values
|
Log page paging form in include/paging.ezt .
|
diff_select_action
diff_select_hidden_values
|
Arbitrary diff form on log page in
include/diff_form.ezt .
|
branch_select_action
branch_select_hidden_values
|
Branch select form on log page in
include/branch_form.ezt .
|
logsort_action
logsort_hidden_values
|
Log sort form on log page in include/sort.ezt .
|
diff_format_action
diff_format_hidden_values
|
Diff format form in include/diff.ezt .
|
Other Template Changes
In directory.ezt and dir_alternate.ezt
-
A new form for changing the current directory revision is
displayed for subversion directories.
-
A new form that controls paging is displayed when
cfg.options.use_pagesize is not 0
-
The sorting links and "hide attic" link are no longer
prefixed with "
./ "
-
The revision number links no longer need
"
content-type=text/vnd.viewcvs-markup " suffixes.
-
The link to Attic/ is only displayed for CVS roots
-
Directory rows.name values no longer have
trailing slashes
In log.ezt and log_table.ezt
-
"Default branch" section moved into include/branch.ezt and is
only displayed for CVS roots
-
"Current tag" section moved into include/view_tag.ezt and is
only displayed for CVS roots
-
"Changes since" is only displayed for cvs roots
-
New paging form is included from include/paging.ezt
-
Arbitrary diff form moved into include/diff_form.ezt
-
Branch select form moved into include/branch_form.ezt
-
Log sort form moved into include/sort.ezt
This section discusses how to upgrade ViewCVS 0.8 to version
0.9 or a later version of the software.
NOTE: these changes will bring you up to the
requirements of version 0.9. You must also follow the directions
for upgrading from 0.9.
Configuration Options
More templates were introduced in version 0.8 of the software,
which made many of the configuration options obsolete. This
section covers which options were removed. If you made any
changes to these options, then you will need to make
corresponding changes in the templates.
-
Colors:
diff_heading,
diff_empty,
diff_remove,
diff_change,
diff_add,
and diff_dark_change
-
These options have been incorporated into the
diff.ezt template.
- markup_log
-
This option has been incorporated into the
markup.ezt template.
- Colors: nav_header
and alt_background
-
These options have been incorporated into the
header.ezt template.
-
Images:
back_icon,
dir_icon,
and file_icon
-
These options have been incorporated into the
directory.ezt , header.ezt ,
log.ezt , log_table.ezt , and
query.ezt templates.
- use_java_script
and open_extern_window
-
The templates now use JavaScript in all applicable places,
and open external windows for most downloading and viewing
of files. If you wish to not use JavaScript and/or external
windows, then remove the feature(s) from the templates.
- show_author
-
Changing this option would be quite strange and rare. If you
do not want to show the author for the revisions, then you
should remove it from the various templates.
- hide_non_readable
-
This option was never used, so it has been removed.
- flip_links_in_dirview
-
This option is no longer available. If you want the links in
your directory view flipped, then you may use the
dir_alternate.ezt template.
Template Variables
Some template variables that were available in 0.8 have been
removed in 0.9. If you have custom templates that refer to these
variables, then you will need to modify your templates.
directory.ezt : headers
-
The headers are now listed explicitly in the template,
rather than made available through a list.
-
directory.ezt :
rows.cols,
and rows.span
-
These variables were used in conjunction with the
headers variable to control the column
displays. This is now controlled explicitly within the
templates.
directory.ezt :
rev_in_front
-
This was used to indicate that revision links should
be used in the first column, rather than in their
standard place in the second column. Changing the
links should now be done in the template, rather than
according to this variable. You may want to look at
the
dir_alternate.ezt template, which has
the revision in front.
directory.ezt :
rows.attic
and rows.hide_attic_href
-
These variable were used to manage the hide and
showing of the contents of the
Attic/
subdirectory. Several new variables were introduced
which can be used to replace this functionality:
show_attic_href,
hide_attic_href, and rows.state.
This section discusses how to upgrade ViewCVS 0.7, or earlier,
to 0.8 or a later version of the software.
NOTE: these changes will bring you up to the
requirements of version 0.8. You must also follow the directions
for upgrading from 0.8.
Configuration Options
The largest change from 0.7 to 0.8, that you will need to deal
with, is the introduction of templates. This shifted many
configuration file options into the templates, for more direct
editing of the output style, colors, and layout. Below is a list
of options that no longer exist, and where you can find their
counterpart in the current version of ViewCVS.
The following options have all been removed in ViewCVS 0.8. If
you made local changes to your ViewCVS configuration, then you
will need to edit templates in the templates/
subdirectory.
-
The [text] section:
short_intro,
long_intro,
and doc_info
-
These options have been incorporated into the
doc/help_rootview.html page and the
doc/help_dirview.html page.
- repository_info
-
This option is now incorporated into the
directory.ezt template.
- table_padding
-
The table padding values can be changed in the
directory.ezt template.
- table_border
-
Edit
directory.ezt to add a border around the
directory table.
-
column_header_normal and
column_header_sorted
-
Edit
directory.ezt to modify the colors of the
column headers.
-
extern_window_width and
extern_window_height
-
These options were never used and have been removed.
- logo
-
Edit the templates directly (
directory.ezt ,
log.ezt or log_table.ezt and if
needed query.ezt ) to alter the URL and size of
your logo.
- allow_version_select
-
Edit the
log.ezt template if you want to remove
the link which allows the user to select a revision for a
diff.
- input_text_size
-
Edit the
log.ezt template if you want to change
the size of the entry box for revisions for performing
diffs.
- even_odd
-
Edit the
directory.ezt and
query.ezt templates if you want to change the
colors of the rows in the directory and query result tables.
- Colors: text
and background
-
These options have been incorporated into the
directory.ezt , log.ezt , and
log_table.ezt templates.
|