ad_page_contract { Tag each file in a package as part of a particular package version. @param version_id The package to be processed. @author ron@arsdigita.com @creation-date 9 May 2000 @cvs-id $Id: version-tag.tcl,v 1.9 2018/04/11 20:52:01 hectorr Exp $ } { {version_id:integer} } db_1row apm_package_by_version_id {} if { $installed_p eq "f" } { ad_return_complaint 1 "
We're going to write the CVS tag $version_tag
into
the repository for each file in this package. This will let you
retrieve the exact set of revisions that make up
$pretty_name $version_name in the future. You can repeat
this operation as often as you want, to tag new files for example.
Here goes:
" # Update the versions table to indicate whether or not this version # was successfully tagged. if {$bad_file_count} { doc_body_append "" # Check for the existence of CVS/Root as a basic check that each file is # under version control. No error handling yet. set bad_file_count 0 set files_to_add [list] set files_to_commit [list] foreach path $files { global vc_file_props vc_parse_cvs_status [apm_fetch_cached_vc_status "packages/$package_key/$path"] switch -- $vc_file_props(status) { "Up-to-date" { set full_path [acs_package_root_dir $package_key]/$path exec $cvs tag -F $version_tag $full_path set status "T $path" } "Locally Modified" { incr bad_file_count lappend files_to_commit $path set status "M $path (Locally Modified)" } default { incr bad_file_count lappend files_to_add $path set status "I $path (No CVS Information)" } } doc_body_append "$status\n" doc_body_flush } doc_body_append "
Some of your files could not be tagged." if { [llength $files_to_commit] } { doc_body_append "
The following have local modifications that have not yet been committed. To commit them use:
" } if { [llength $files_to_add] } { doc_body_append "cd [acs_package_root_dir $package_key]\n" apm_write_shell_wrap [concat [list cvs commit] $files_to_commit] doc_body_append "
The following have not been added to the CVS repository. To add them use:
" } doc_body_append "ad [acs_package_root_dir $package_key]\n" apm_write_shell_wrap [concat [list cvs add] $files_to_add] doc_body_append "
After correcting the above problems you can reload this page or run the tagging operation again. This package won't be archivable until the tagging is completed with no errors." db_dml apm_all_files_untag {} } else { doc_body_append "
All files were tagged successfully." db_dml apm_all_files_tag {} } doc_body_append "
Return to the Package Manager. [ad_footer] " # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: