[70668] branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl

and.damore at macports.org and.damore at macports.org
Mon Aug 16 11:31:49 PDT 2010


Revision: 70668
          http://trac.macports.org/changeset/70668
Author:   and.damore at macports.org
Date:     2010-08-16 11:31:48 -0700 (Mon, 16 Aug 2010)
Log Message:
-----------
Added actual diff output

Modified Paths:
--------------
    branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl

Modified: branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl
===================================================================
--- branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-16 18:20:35 UTC (rev 70667)
+++ branches/gsoc10-configfiles/base/src/registry2.0/portimage.tcl	2010-08-16 18:31:48 UTC (rev 70668)
@@ -842,19 +842,21 @@
     global UI_PREFIX
     variable config_upgrade_completed
 
+    set newimagedir [$requested location]
+    set oldimagedir [$active location]
     set actions_list [list]
     foreach file $changed_files {
-        ui_debug "File $file has changed"
+        ui_msg "$UI_PREFIX [format [msgcat::mc "File %s has changed"] $file]"
         set choice ""
         while {[lsearch "keep new" $choice] < 0} { 
             if {$choice eq "current"} {
-                #catch {exec /usr/bin/diff -u [] []} a
-                #set result [string range $a 0 [expr [string length $a]-33]]
-                #ui_msg "$result"
+                catch {exec /usr/bin/diff -u $oldimagedir$file $file} a
+                set result [string range $a 0 [expr [string length $a]-33]]
+                ui_msg "\n$result\n"
             } elseif {$choice eq "upgraded"} {
-                #catch {exec /usr/bin/diff -u [] []} a
-                #set result [string range $a 0 [expr [string length $a]-33]]
-                #ui_msg "$result"                
+                catch {exec /usr/bin/diff -u $file $newimagedir$file} a
+                set result [string range $a 0 [expr [string length $a]-33]]
+                ui_msg "\n$result\n"                
             }
             ui_msg "$UI_PREFIX [format [msgcat::mc "Please choose one of (keep) current, install (new), show diff original-(current), show diff current-(upgraded):"] ]"
             #puts "\nPlease choose one of (keep) current, install (new), show diff original-(current), show diff current-(upgraded):"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100816/8f1f9a01/attachment.html>


More information about the macports-changes mailing list