Index: openacs-4/packages/acs-admin/www/apm/version-tag.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-tag.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/apm/version-tag.tcl 11 Apr 2018 20:52:01 -0000 1.9 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,135 +0,0 @@ -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 "
  • The selected version is not installed" - return -} - -set files [db_list apm_all_paths {}] - -if { [llength $files] == 0 } { - ad_return_complaint 1 "
  • No files in this package" - return -} - -# Create a legal CVS tag to mark the files by substituting -'s for all -# of the .'s in the version_name. The other rules for a legal version -# name are compatible with CVS. - -set version_tag [apm_package_version_release_tag $package_key $version_name] - -# Path to the CVS executable - -set cvs [parameter::get -package_id [ad_acs_kernel_id] -parameter CvsPath] - -doc_body_append [apm_header [list "version-view?version_id=$version_id" "$pretty_name $version_name"] [list "version-files?version_id=$version_id" "Files"] "Tag"] \ -"

    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: - -

    -
    -"
    -
    -# 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 "
    -
    -
    -" - -# Update the versions table to indicate whether or not this version -# was successfully tagged. - -if {$bad_file_count} { - - 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: -

    cd [acs_package_root_dir $package_key]\n"
    -	apm_write_shell_wrap [concat [list cvs commit] $files_to_commit]
    -	doc_body_append "
    " - } - - if { [llength $files_to_add] } { - doc_body_append " -

    The following have not been added to the CVS repository. To add them use: -

    ad [acs_package_root_dir $package_key]\n"
    -	apm_write_shell_wrap [concat [list cvs add] $files_to_add]
    -	doc_body_append "
    " - } - - 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: Index: openacs-4/packages/acs-admin/www/apm/version-tag.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-tag.xql,v diff -u -N --- openacs-4/packages/acs-admin/www/apm/version-tag.xql 4 Oct 2008 20:12:51 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,44 +0,0 @@ - - - - - - select pretty_name, version_name - from apm_package_version_info - where version_id = :version_id - - - - - - - - select path from apm_package_files where version_id = :version_id order by path - - - - - - - - - update apm_package_versions - set tagged_p = 'f' - where version_id = :version_id - - - - - - - - - update apm_package_versions - set tagged_p = 't' - where version_id = :version_id - - - - - -