[138946] trunk/base/src/macports1.0
raimue at macports.org
raimue at macports.org
Fri Jul 24 14:26:53 PDT 2015
Revision: 138946
https://trac.macports.org/changeset/138946
Author: raimue at macports.org
Date: 2015-07-24 14:26:53 -0700 (Fri, 24 Jul 2015)
Log Message:
-----------
macports1.0: Remove unused phase argument in ui_message
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
trunk/base/src/macports1.0/tests/macports.test
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2015-07-24 20:54:54 UTC (rev 138945)
+++ trunk/base/src/macports1.0/macports.tcl 2015-07-24 21:26:53 UTC (rev 138946)
@@ -213,7 +213,7 @@
}
}
-proc ui_message {priority prefix phase args} {
+proc ui_message {priority prefix args} {
global macports::channels ::debuglog macports::current_phase
#
@@ -223,13 +223,13 @@
0 - 1 {}
2 {
if {[lindex $args 0] ne "-nonewline"} {
- set hint "error: when 5 arguments are given, 2nd last must be \"-nonewline\""
- error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
+ set hint "error: when 4 arguments are given, 3rd must be \"-nonewline\""
+ error "$hint\nusage: ui_message priority prefix ?-nonewline? string"
}
}
default {
set hint "error: too many arguments specified"
- error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
+ error "$hint\nusage: ui_message priority prefix ?-nonewline? string"
}
}
@@ -278,7 +278,7 @@
try {
::ui_init $priority $prefix $channels($priority) {*}$args
} catch * {
- interp alias {} ui_$priority {} ui_message $priority $prefix {}
+ interp alias {} ui_$priority {} ui_message $priority $prefix
}
}
Modified: trunk/base/src/macports1.0/tests/macports.test
===================================================================
--- trunk/base/src/macports1.0/tests/macports.test 2015-07-24 20:54:54 UTC (rev 138945)
+++ trunk/base/src/macports1.0/tests/macports.test 2015-07-24 21:26:53 UTC (rev 138946)
@@ -253,25 +253,25 @@
set macports::current_phase test
set ::debuglog $fd2
} -body {
- set res [ui_message 0 prefix phase args]
+ set res [ui_message 0 prefix args]
close $fd
close $fd2
set fd2 [open $pwd/message r]
set line [read $fd2]
if {$line ne "prefixargs\n"} {
- return "FAIL: wrong message"
+ return "FAIL: wrong message: $line"
}
close $fd2
set fd [open $pwd/message w+]
set fd2 [open $pwd/log w+]
- set res [ui_message debuglog prefix phase -nonewline arg]
+ set res [ui_message debuglog prefix -nonewline arg]
close $fd
close $fd2
set fd2 [open $pwd/log r]
set line [read $fd2]
if {$line ne "prefixarg"} {
- return "FAIL: wrong message"
+ return "FAIL: wrong message: $line"
}
close $fd2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150724/8a06b4bf/attachment.html>
More information about the macports-changes
mailing list