Changeset 138946 for trunk/base


Ignore:
Timestamp:
Jul 24, 2015, 9:26:53 PM (5 years ago)
Author:
raimue@…
Message:

macports1.0: Remove unused phase argument in ui_message

Location:
trunk/base/src/macports1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r138945 r138946  
    214214}
    215215
    216 proc ui_message {priority prefix phase args} {
     216proc ui_message {priority prefix args} {
    217217    global macports::channels ::debuglog macports::current_phase
    218218
     
    224224       2 {
    225225           if {[lindex $args 0] ne "-nonewline"} {
    226                set hint "error: when 5 arguments are given, 2nd last must be \"-nonewline\""
    227                error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
     226               set hint "error: when 4 arguments are given, 3rd must be \"-nonewline\""
     227               error "$hint\nusage: ui_message priority prefix ?-nonewline? string"
    228228           }
    229229       }
    230230       default {
    231231           set hint "error: too many arguments specified"
    232            error "$hint\nusage: ui_message priority prefix phase ?-nonewline? string"
     232           error "$hint\nusage: ui_message priority prefix ?-nonewline? string"
    233233       }
    234234    }
     
    279279        ::ui_init $priority $prefix $channels($priority) {*}$args
    280280    } catch * {
    281         interp alias {} ui_$priority {} ui_message $priority $prefix {}
     281        interp alias {} ui_$priority {} ui_message $priority $prefix
    282282    }
    283283}
  • trunk/base/src/macports1.0/tests/macports.test

    r136512 r138946  
    254254    set ::debuglog $fd2
    255255} -body {
    256     set res [ui_message 0 prefix phase args]
     256    set res [ui_message 0 prefix args]
    257257    close $fd
    258258    close $fd2
     
    260260    set line [read $fd2]
    261261    if {$line ne "prefixargs\n"} {
    262         return "FAIL: wrong message"
     262        return "FAIL: wrong message: $line"
    263263    }
    264264    close $fd2
     
    266266    set fd [open $pwd/message w+]
    267267    set fd2 [open $pwd/log w+]
    268     set res [ui_message debuglog prefix phase -nonewline arg]
     268    set res [ui_message debuglog prefix -nonewline arg]
    269269    close $fd
    270270    close $fd2
     
    272272    set line [read $fd2]
    273273    if {$line ne "prefixarg"} {
    274         return "FAIL: wrong message"
     274        return "FAIL: wrong message: $line"
    275275    }
    276276    close $fd2
Note: See TracChangeset for help on using the changeset viewer.