Index: openacs-4/packages/acs-admin/www/apm/version-generate-diffs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-generate-diffs.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/apm/version-generate-diffs.tcl 7 Aug 2017 23:47:45 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,76 +0,0 @@ -ad_page_contract { - - Generates diffs for a version of a package. - - @param version_id The package to be processed. - @param context_p Set to 0 if you don't want the diffs to be listed with context. - @author Jon Salz [jsalz@arsdigita.com] - @creation-date 9 May 2000 - @cvs-id $Id: version-generate-diffs.tcl,v 1.5 2017/08/07 23:47:45 gustafn Exp $ -} { - {version_id:integer} - {context_p:boolean 1} -} - -db_1row apm_package_by_version_id {} - -set analyze_dir [ns_mktemp "[acs_root_dir]/apm-workspace/diffs-XXXXXX"] - -doc_body_append "[apm_header "Create Diffs for $pretty_name $version_name"] - -\n" -doc_body_flush - -set no_changes [list] - -foreach file [apm_get_package_files -package_key $package_key] { - if { ![file isfile "[acs_root_dir]/$file"] } { - doc_body_append "

$file

\n
This file has been locally added.
\n" - continue - } - if { ![file isfile "$analyze_dir/$file"] } { - doc_body_append "

$file

\n
This file has been locally removed.
\n" - continue - } - - if {[set diff [util::which diff]] eq ""} { - error "'diff' command not found on the system" - } - set cmd [list exec $diff] - if { $context_p } { - lappend cmd "-c" - } - lappend cmd "[acs_root_dir]/$file" $analyze_dir/$file - set errno [catch $cmd diffs] - if { $errno == 0 } { - lappend no_changes $file - } else { - set status [lindex $::errorCode 2] - if { $status == 1 } { - regsub {child process exited abnormally$} $diffs "" diffs - doc_body_append "

$file

\n
[ns_quotehtml $diffs]
\n" - } else { - doc_body_append "

$file

\n
$diffs
\n" - } - } - doc_body_flush -} - -if { [llength $no_changes] > 0 } { - doc_body_append "

No changes to:

\n" -} - -doc_body_append [ad_footer] - - -# Local variables: -# mode: tcl -# tcl-indent-level: 4 -# indent-tabs-mode: nil -# End: