SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Aug 31 10:27:50 2010 New Revision: 11794 Modified: toys/stbr/stbr.tcl Log: - add support for ti-dev Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Aug 31 10:27:50 2010 @@ -12,7 +12,7 @@ set back set cntr 0 set cvsroot :pserver:c...@cvs.pld-linux.org:/cvsroot -set usage Usage: !stbr \[help\] \[url\] \[version\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] spec2\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] ... +set usage Usage: !stbr \[help\] \[url\] \[version\] th\|ti\|ti-dev \[no\]upgrade spec1\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] spec2\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] ... set nickpass stbr-bot set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt @@ -60,6 +60,7 @@ putlog STBR: Searching for status... putqueue ac putqueue ti + putqueue ti-dev putqueue th putqueue aidath } @@ -121,6 +122,9 @@ proc sendto {dist spec branch} { global cvsroot +if {([string match ti-dev $dist])} { + set dist ti +} set reqbook ./scripts/requesters-${dist}.txt if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} set splited [split $spec .] @@ -303,7 +307,7 @@ if {([string match dzieki $first]) || ([string match dziekuje $first]) || ([string match thx $first]) || ([string match tx $first]) || ([string match thnx $first]) || ([string match dzięki $first]) || ([string match dziękuję $first])} { set answ [rthx]; putserv privmsg $chan :$nick: $answ; return 0 } -if {!([string match th $first] || [string match ti $first])} { +if {!([string match th $first] || [string match ti $first] || [string match ti-dev $first])} { putserv privmsg $chan :$nick: $usage; return 0 } set dist $first @@ -400,7 +404,6 @@ if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] if {($isbanned == 0)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} -if {$cntr1} {incr cntr} {utimer 10 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (10sec). Please try later.; return 0} if {($bconds_with == ) ($bconds_without == ) ($defines == )} { lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: sparky Date: Sat Feb 6 17:17:49 2010 New Revision: 11127 Modified: toys/stbr/stbr.tcl Log: - limit to 3 requests / 60 seconds Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Feb 6 17:17:49 2010 @@ -113,7 +113,7 @@ } proc rthx {} { - set answer {luz luzik nie ma sprawy spoko no problem n/p dla ciebie zawsze z mila checia} + set answer {y/w luz luzik nie ma sprawy spoko no problem n/p dla ciebie zawsze z mila checia} set range [llength $answer] set whichone [expr {int(rand()*$range)}] return [lindex $answer $whichone] @@ -301,7 +301,6 @@ putserv privmsg $chan :$nick: $usage; return 0 } if {([string length $third]2)} {putserv privmsg $chan :$nick: $usage; return 0} -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { if {([string match */* $spec])} { @@ -387,6 +386,15 @@ lappend rspecs $spec; append rspecs :$branch (to $towho, options: $bconds_with $bconds_without $defines) lappend tspecs $spec; append tspecs :$branch (options: $bconds_with $bconds_without $defines) } + +if {$cntr3} { + incr cntr + utimer 60 incr cntr -1 +} { + putserv privmsg $chan :$nick: I reached my STBR time limit (3 requests in 60sec). Please try later. + return 0 +} + if {([string match test-build $second])} { if {[utimer 5 exec $makereq -d $dist -t $bconds_with $bconds_without $defines $spec:$branch /dev/null 21]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$second','$dist'); @@ -406,7 +414,6 @@ } { putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. A ready-build will be performed on PLD-$dist line. Visit http://stbr.pld-linux.org/?show=$nickdate=$day$space$hour to track your request. } -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } putlog $versionstr loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Feb 7 02:06:42 2010 New Revision: 11129 Modified: toys/stbr/stbr.tcl Log: - timer fixed(?) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Feb 7 02:06:42 2010 @@ -22,7 +22,7 @@ set actconfig stbr.conf set bindedmh 0 - DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ## + DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ### bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify @@ -113,7 +113,7 @@ } proc rthx {} { - set answer {y/w luz luzik nie ma sprawy spoko no problem n/p dla ciebie zawsze z mila checia} + set answer {luz luzik nie ma sprawy spoko no problem n/p dla ciebie zawsze z mila checia} set range [llength $answer] set whichone [expr {int(rand()*$range)}] return [lindex $answer $whichone] @@ -301,6 +301,7 @@ putserv privmsg $chan :$nick: $usage; return 0 } if {([string length $third]2)} {putserv privmsg $chan :$nick: $usage; return 0} +if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { if {([string match */* $spec])} { @@ -386,15 +387,6 @@ lappend rspecs $spec; append rspecs :$branch (to $towho, options: $bconds_with $bconds_without $defines) lappend tspecs $spec; append tspecs :$branch (options: $bconds_with $bconds_without $defines) } - -if {$cntr3} { - incr cntr - utimer 60 incr cntr -1 -} { - putserv privmsg $chan :$nick: I reached my STBR time limit (3 requests in 60sec). Please try later. - return 0 -} - if {([string match test-build $second])} { if {[utimer 5 exec $makereq -d $dist -t $bconds_with $bconds_without $defines $spec:$branch /dev/null 21]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$second','$dist'); ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Feb 7 02:29:46 2010 New Revision: 11130 Modified: toys/stbr/stbr.tcl Log: - add pub:setmaintenance procedure to ease my pain when setting bot in maintenance mode Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Feb 7 02:29:46 2010 @@ -239,6 +239,7 @@ bind pub * stbr, pub:stbr bind pub * !del pub:del bind pub * !stat pub:stat +bind pub * !maintenance pub:setmaintenance proc pub:del {nick host hand chan arg} { global logfile cancellation unfilled @@ -262,6 +263,26 @@ } } +proc pub:setmaintenance {nick host hand chan arg} { + global maintenance + if {([matchattr $hand S])} { + set usage Usage: !maintenance on|off \[comment\] + set przelacznik [lindex $arg 0] + set comment [lrange $arg 1 end] + if {([string match on $przelacznik])} { + set fp [open $maintenance w] + puts -nonewline $fp $comment + close $fp + putserv privmsg $chan :$nick: Maintenance Mode is On (reason: $comment) + } elseif {([string match off $przelacznik])} { + file delete $maintenance + putserv privmsg $chan :$nick: Maintenance Mode is Off + } else { + putserv privmsg $chan :$nick: $usage + } + } +} + proc pub:stbr {nick host hand chan arg} { global script back cntr logfile usage makereq cmdbook cmdtxt maintenance unfilled if {([file exists $maintenance]) (![matchattr $hand S])} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Feb 7 02:35:56 2010 New Revision: 11131 Modified: toys/stbr/stbr.tcl Log: - don't block too early Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Feb 7 02:35:56 2010 @@ -322,7 +322,6 @@ putserv privmsg $chan :$nick: $usage; return 0 } if {([string length $third]2)} {putserv privmsg $chan :$nick: $usage; return 0} -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { if {([string match */* $spec])} { @@ -401,6 +400,7 @@ if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] if {($isbanned == 0)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} +if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {($bconds_with == ) ($bconds_without == ) ($defines == )} { lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Feb 7 05:21:48 2010 New Revision: 11132 Modified: toys/stbr/stbr.tcl Log: - set timer to 10s Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Feb 7 05:21:48 2010 @@ -400,7 +400,7 @@ if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] if {($isbanned == 0)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} +if {$cntr1} {incr cntr} {utimer 10 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (10sec). Please try later.; return 0} if {($bconds_with == ) ($bconds_without == ) ($defines == )} { lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon Nov 23 00:25:59 2009 New Revision: 11000 Modified: toys/stbr/stbr.tcl Log: - rev 11000 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon Nov 23 00:25:59 2009 @@ -22,7 +22,7 @@ set actconfig stbr.conf set bindedmh 0 - DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ### + DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ## bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 17 00:22:34 2009 New Revision: 10972 Modified: toys/stbr/stbr.tcl Log: - also activate checkunfilled just on 1 bot Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 17 00:22:34 2009 @@ -143,10 +143,13 @@ random $reqbook } -bind time - 00 * * * * checkunfilled +if {([string match $actconfig $config])} { + bind time - 00 * * * * checkunfilled + putlog STBR: Checkunfilled activated +} proc checkunfilled {nick host hand chan arg} { - global unfilled resend queuechan + global unfilled resend queuechan logfile putcmdlog STBR: Looking for unfilled specs... set time [clock seconds] set unfilledreq [exec sqlite $unfilled select * from unfilled order by date;] ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Nov 7 22:06:07 2009 New Revision: 10960 Modified: toys/stbr/stbr.tcl Log: - default branch is HEAD in pub:stat Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Nov 7 22:06:07 2009 @@ -173,9 +173,12 @@ putserv privmsg $chan :$nick: I'm now in maintenance mode (reason: $reason). Only owners may perform real actions. return 0 } -if {[llength [lrange $arg 0 end]] 2} {putserv privmsg $chan :$nick: Usage: !stat spec branch;return 0} +if {[llength [lrange $arg 0 end]] 2} {putserv privmsg $chan :$nick: Usage: !stat spec \[BRANCH\];return 0} set spec [lindex $arg 0] set branch [lindex $arg 1] +if {[string length $branch]==0} { + set branch HEAD +} if {!([string match *.spec $spec])} { set pkg $spec append spec .spec ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Nov 7 22:18:34 2009 New Revision: 10961 Modified: toys/stbr/stbr.tcl Log: - change condition Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Nov 7 22:18:34 2009 @@ -173,7 +173,7 @@ putserv privmsg $chan :$nick: I'm now in maintenance mode (reason: $reason). Only owners may perform real actions. return 0 } -if {[llength [lrange $arg 0 end]] 2} {putserv privmsg $chan :$nick: Usage: !stat spec \[BRANCH\];return 0} +if {[llength [lrange $arg 0 end]] 1} {putserv privmsg $chan :$nick: Usage: !stat spec \[BRANCH\];return 0} set spec [lindex $arg 0] set branch [lindex $arg 1] if {[string length $branch]==0} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Nov 7 22:19:43 2009 New Revision: 10962 Modified: toys/stbr/stbr.tcl Log: - updated help Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Nov 7 22:19:43 2009 @@ -76,7 +76,7 @@ putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders putserv privmsg $nick :!stbr ti noupgrade spec1/+bcond1-bcond2 - sends noupgrade request for spec1 on branch HEAD with bcond1 enabled and bcond2 disabled putserv privmsg $nick :Other commands: - putserv privmsg $nick :!stat spec branch - checks if spec exists on branch + putserv privmsg $nick :!stat spec \[BRANCH\] - checks if spec exists on BRANCH, if BRANCH is not set HEAD is taken putserv privmsg $nick :!del spec date time - (for admins only) removes request and sends cancelation email putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Nov 7 22:32:37 2009 New Revision: 10963 Modified: toys/stbr/stbr.tcl Log: - enhanced help, show only esentials by default the user decides whether he want's to see 'more' Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Nov 7 22:32:37 2009 @@ -70,7 +70,12 @@ putserv privmsg $nick :!stbr help - shows this help putserv privmsg $nick :!stbr url - shows main URL on private chat putserv privmsg $nick :!stbr version - shows version on public channel - putserv privmsg $nick :Options in square brackets are optional. + putserv privmsg $nick :Type 'more' for more help and examples +} + +bind msg - more msg:more_help + +proc msg:more_help {nick uhost hand text} { putserv privmsg $nick :Examples: putserv privmsg $nick :!stbr th upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to TH developers putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Nov 8 03:12:45 2009 New Revision: 10964 Modified: toys/stbr/stbr.tcl Log: - try to be semi-inteligent and unbind 'more' after 120 of inactivity or after 'more' was called once, bind it when another user calls for help Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Nov 8 03:12:45 2009 @@ -20,6 +20,7 @@ set queueparser ./scripts/queue_parser.pl set queuechan #pld set actconfig stbr.conf +set bindedmh 0 DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ### @@ -64,18 +65,21 @@ } proc help {nick} { - global usage + global usage bindedmh putserv privmsg $nick :$usage putserv privmsg $nick :Options: putserv privmsg $nick :!stbr help - shows this help putserv privmsg $nick :!stbr url - shows main URL on private chat putserv privmsg $nick :!stbr version - shows version on public channel - putserv privmsg $nick :Type 'more' for more help and examples + putserv privmsg $nick :Type 'more' for more help and examples (you've got 120 seconds to do that) + bind msg - more msg:more_help + set bindedmh 1 + utimer 120 if {$bindedmh==1} {unbind msg - more msg:more_help; set bindedmh 0} } -bind msg - more msg:more_help proc msg:more_help {nick uhost hand text} { + global bindedmh putserv privmsg $nick :Examples: putserv privmsg $nick :!stbr th upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to TH developers putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders @@ -84,6 +88,10 @@ putserv privmsg $nick :!stat spec \[BRANCH\] - checks if spec exists on BRANCH, if BRANCH is not set HEAD is taken putserv privmsg $nick :!del spec date time - (for admins only) removes request and sends cancelation email putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. + if {$bindedmh==1} { + unbind msg - more msg:more_help + set bindedmh 0 + } } proc url {nick} { @@ -135,7 +143,7 @@ random $reqbook } -bind time - 0 * * * * checkunfilled +bind time - 00 * * * * checkunfilled proc checkunfilled {nick host hand chan arg} { global unfilled resend queuechan ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Nov 8 03:38:42 2009 New Revision: 10965 Modified: toys/stbr/stbr.tcl Log: - updated checkunfilled Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Nov 8 03:38:42 2009 @@ -170,8 +170,8 @@ set pkg [lindex $splited 0] } exec $resend $dist $pkg/$spec $branch $towho - exec sqlite $unfilled update unfilled set date='$time' where spec='$spec' and branch='$branch' and line='$dist'; - putserv privmsg $queuechan :I've found unfilled requests. Resent request for $spec to $towho. + exec sqlite $unfilled update unfilled set date='$time' where spec='$spec' and branch='$branch' and line='$dist'; + putserv privmsg $queuechan :Found requests unfilled for more than 2 days. Resent request for $spec to $towho. } } } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Nov 6 06:49:20 2009 New Revision: 10954 Modified: toys/stbr/stbr.tcl Log: - run just every hour Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Nov 6 06:49:20 2009 @@ -130,7 +130,7 @@ random $reqbook } -bind time - * * * * * checkunfilled +bind time - 0 * * * * checkunfilled proc checkunfilled {nick host hand chan arg} { global unfilled resend queuechan ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Nov 6 06:53:02 2009 New Revision: 10955 Modified: toys/stbr/stbr.tcl Log: - activate resend.sh script Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Nov 6 06:53:02 2009 @@ -156,7 +156,7 @@ } else { set pkg [lindex $splited 0] } - #exec $resend $dist $pkg/$spec $branch $towho + exec $resend $dist $pkg/$spec $branch $towho exec sqlite $unfilled update unfilled set date='$time' where spec='$spec' and branch='$branch' and line='$dist'; putserv privmsg $queuechan :I've found unfilled requests. Resent request for $spec to $towho. } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Oct 30 15:29:15 2009 New Revision: 10889 Modified: toys/stbr/stbr.tcl Log: - fix/workaround ac crapyness Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 15:29:15 2009 @@ -36,7 +36,9 @@ proc pub:buildstatus {nick host hand chan arg} { global queueparser - set acstat [exec $queueparser ac] + exec $queueparser ac ac.stat + set file [open ac.stat r] + gets $file acstat set tistat [exec $queueparser ti] set thstat [exec $queueparser th] putserv privmsg #pld :$acstat ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Oct 30 16:33:43 2009 New Revision: 10890 Modified: toys/stbr/stbr.tcl Log: - prevent running pub:buildstatus when not connected to IN Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 16:33:43 2009 @@ -32,7 +32,9 @@ putlog Sending Identify to NickServ } -bind time - * * * * * pub:buildstatus +if {([string match fu-berlin $server]) || ([string match tu-ilmenau $server])} { + bind time - * * * * * pub:buildstatus +} proc pub:buildstatus {nick host hand chan arg} { global queueparser ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: sparky Date: Fri Oct 30 19:30:58 2009 New Revision: 10892 Modified: toys/stbr/stbr.tcl Log: - handle multiple lines - added aidath Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 19:30:58 2009 @@ -36,17 +36,21 @@ bind time - * * * * * pub:buildstatus } -proc pub:buildstatus {nick host hand chan arg} { +proc putqueue {ver} { global queueparser - exec $queueparser ac ac.stat - set file [open ac.stat r] - gets $file acstat - set tistat [exec $queueparser ti] - set thstat [exec $queueparser th] - putserv privmsg #pld :$acstat - putserv privmsg #pld :$tistat - putserv privmsg #pld :$thstat - putlog Thrown stats to #pld: $acstat $tistat $thstat + set parsed [exec $queueparser $ver] + set lines [split $parsed \n] + foreach l $lines { + putserv privmsg #pld :$l + } + putlog Thrown stats to #pld: $ver: $parsed +} + +proc pub:buildstatus {nick host hand chan arg} { + putqueue ac + putqueue ti + putqueue th + putqueue aidath } proc help {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: sparky Date: Fri Oct 30 23:06:22 2009 New Revision: 10897 Modified: toys/stbr/stbr.tcl Log: - use intermediate file Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 23:06:22 2009 @@ -38,12 +38,12 @@ proc putqueue {ver} { global queueparser - set parsed [exec $queueparser $ver] - set lines [split $parsed \n] - foreach l $lines { + exec $queueparser $ver queue.txt + set qfile [open queue.txt r] + while {[gets $qfile l] = 0} { putserv privmsg #pld :$l + putlog Thrown stats to #pld: $ver: $l } - putlog Thrown stats to #pld: $ver: $parsed } proc pub:buildstatus {nick host hand chan arg} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Oct 30 23:09:54 2009 New Revision: 10898 Modified: toys/stbr/stbr.tcl Log: - put status to file, fixes ac issue Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 23:09:54 2009 @@ -38,12 +38,14 @@ proc putqueue {ver} { global queueparser - exec $queueparser $ver queue.txt - set qfile [open queue.txt r] - while {[gets $qfile l] = 0} { + exec $queueparser $ver ${ver}.stat + set file [open ${ver}.stat r] + gets $file parsed + set lines [split $parsed \n] + foreach l $lines { putserv privmsg #pld :$l - putlog Thrown stats to #pld: $ver: $l } + putlog Thrown stats to #pld: $ver: $parsed } proc pub:buildstatus {nick host hand chan arg} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: sparky Date: Fri Oct 30 23:15:07 2009 New Revision: 10899 Modified: toys/stbr/stbr.tcl Log: - reverted shadzik's change Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 23:15:07 2009 @@ -38,14 +38,12 @@ proc putqueue {ver} { global queueparser - exec $queueparser $ver ${ver}.stat - set file [open ${ver}.stat r] - gets $file parsed - set lines [split $parsed \n] - foreach l $lines { + exec $queueparser $ver queue.txt + set qfile [open queue.txt r] + while {[gets $qfile l] = 0} { putserv privmsg #pld :$l + putlog Thrown stats to #pld: $ver: $l } - putlog Thrown stats to #pld: $ver: $parsed } proc pub:buildstatus {nick host hand chan arg} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: sparky Date: Fri Oct 30 23:17:00 2009 New Revision: 10900 Modified: toys/stbr/stbr.tcl Log: - use separate intermediate files Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 30 23:17:00 2009 @@ -38,8 +38,8 @@ proc putqueue {ver} { global queueparser - exec $queueparser $ver queue.txt - set qfile [open queue.txt r] + exec $queueparser $ver ${ver}.stat + set qfile [open ${ver}.stat r] while {[gets $qfile l] = 0} { putserv privmsg #pld :$l putlog Thrown stats to #pld: $ver: $l ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 03:49:48 2009 New Revision: 10906 Modified: toys/stbr/stbr.tcl Log: - fixed bug where package name couldn't contain a dot - NOTE: package still shouldn't have more than one dot, if it has, the bug still exists Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 03:49:48 2009 @@ -1,6 +1,6 @@ # Send To Builder Request TCL by shad...@pld-linux.org -set versionstr Send To Builder Request TCL v0.9.1 by shadzik +set versionstr Send To Builder Request TCL v0.9.2 by shadzik set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db @@ -103,7 +103,13 @@ } if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} set splited [split $spec .] -set pkg [lindex $splited 0] +set lsize [llength $splited] +if {($lsize == 3)} { + set pkg [lrange $splited 0 1] + regsub -all $pkg . pkg +} else { + set pkg [lindex $splited 0] +} if {[catch {exec cvs -d $cvsroot rlog $cmd packages/$pkg/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} set file [open $reqbook r] gets $file lista @@ -129,7 +135,19 @@ if {[llength [lrange $arg 0 end]] 2} {putserv privmsg $chan :$nick: Usage: !stat spec branch;return 0} set spec [lindex $arg 0] set branch [lindex $arg 1] -if {!([string match *.spec $spec])} { set pkg $spec;append spec .spec } else { set splited [split $spec .]; set pkg [lindex $splited 0] } +if {!([string match *.spec $spec])} { + set pkg $spec + append spec .spec +} else { + set splited [split $spec .] + set lsize [llength $splited] + if {($lsize == 3)} { + set pkg [lrange $splited 0 1] + regsub -all $pkg . pkg + } else { + set pkg [lindex $splited 0] + } +} if {([string match HEAD $branch])} {set cmd -N} else {set cmd -r$branch} if {[catch {exec cvs -d $cvsroot rlog $cmd packages/$pkg/$spec} results]} { putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 03:25:20 2009 New Revision: 10905 Modified: toys/stbr/stbr.tcl Log: - yep. and who will close all these open files? ;) - fixes [03:21] Tcl error [pub:buildstatus]: couldn't create error file for command: too many open files - bug Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 03:25:20 2009 @@ -44,6 +44,7 @@ putserv privmsg #pld :$l putlog Thrown stats to #pld: $ver: $l } + close $qfile } proc pub:buildstatus {nick host hand chan arg} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 04:09:38 2009 New Revision: 10907 Modified: toys/stbr/stbr.tcl Log: - fixed build status activation Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 04:09:38 2009 @@ -32,8 +32,10 @@ putlog Sending Identify to NickServ } -if {([string match fu-berlin $server]) || ([string match tu-ilmenau $server])} { +putlog STBR: using config $config +if {([string match stbr.conf $config])} { bind time - * * * * * pub:buildstatus + putlog STBR: Buildstatus activated } proc putqueue {ver} { @@ -52,6 +54,7 @@ putqueue ti putqueue th putqueue aidath + putlog Searched for status } proc help {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 04:13:31 2009 New Revision: 10908 Modified: toys/stbr/stbr.tcl Log: - some cosmetics on party line messages Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 04:13:31 2009 @@ -16,6 +16,7 @@ set maintenance ./scripts/maintenance.txt set bannedspec ./scripts/bannedspec.txt set queueparser ./scripts/queue_parser.pl +set queuechan #pld bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify @@ -39,22 +40,22 @@ } proc putqueue {ver} { - global queueparser + global queueparser queuechan exec $queueparser $ver ${ver}.stat set qfile [open ${ver}.stat r] while {[gets $qfile l] = 0} { - putserv privmsg #pld :$l - putlog Thrown stats to #pld: $ver: $l + putserv privmsg $queuechan :$l + putlog STBR: Found status: $ver: $l } close $qfile } proc pub:buildstatus {nick host hand chan arg} { + putlog STBR: Searching for status... putqueue ac putqueue ti putqueue th putqueue aidath - putlog Searched for status } proc help {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 04:27:34 2009 New Revision: 10910 Modified: toys/stbr/stbr.tcl Log: - some configuration enhancements and a big fat warning for dummies Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 04:27:34 2009 @@ -17,6 +17,9 @@ set bannedspec ./scripts/bannedspec.txt set queueparser ./scripts/queue_parser.pl set queuechan #pld +set actconfig stbr.conf + + DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOURE DOING ### bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify @@ -34,7 +37,7 @@ } putlog STBR: using config $config -if {([string match stbr.conf $config])} { +if {([string match $actconfig $config])} { bind time - * * * * * pub:buildstatus putlog STBR: Buildstatus activated } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 04:39:56 2009 New Revision: 10911 Modified: toys/stbr/stbr.tcl Log: - enhanced pub:stat to show link if spec exists Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 04:39:56 2009 @@ -157,10 +157,11 @@ } if {([string match HEAD $branch])} {set cmd -N} else {set cmd -r$branch} if {[catch {exec cvs -d $cvsroot rlog $cmd packages/$pkg/$spec} results]} { - putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository. + putserv privmsg $chan :$nick: ${sp...@${branch} doesn't exist in PLD's repository. return 0 } - putserv privmsg $chan :$nick: Spec ($spec) exists on branch $branch in PLD's repository. + set link http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/$pkg/$spec?only_with_tag=$branch; + putserv privmsg $chan :$nick: ${sp...@${branch} exists in PLD's repository. Go see it at $link return 0 } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Oct 31 04:51:21 2009 New Revision: 10912 Modified: toys/stbr/stbr.tcl Log: - updated help a bit Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Oct 31 04:51:21 2009 @@ -64,16 +64,19 @@ proc help {nick} { global usage putserv privmsg $nick :$usage - putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. - putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. - putserv privmsg $nick :Options in square brackets are optional. putserv privmsg $nick :Options: putserv privmsg $nick :!stbr help - shows this help putserv privmsg $nick :!stbr url - shows main URL on private chat putserv privmsg $nick :!stbr version - shows version on public channel + putserv privmsg $nick :Options in square brackets are optional. putserv privmsg $nick :Examples: putserv privmsg $nick :!stbr th upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to TH developers putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders + putserv privmsg $nick :!stbr ti noupgrade spec1/+bcond1-bcond2 - sends noupgrade request for spec1 on branch HEAD with bcond1 enabled and bcond2 disabled + putserv privmsg $nick :Other commands: + putserv privmsg $nick :!stat spec branch - checks if spec exists on branch + putserv privmsg $nick :!del spec date time - (for admins only) removes request and sends cancelation email + putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. } proc url {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Thu Oct 29 23:04:45 2009 New Revision: 10880 Modified: toys/stbr/stbr.tcl Log: - added sparky's queue_parser.pl to throw out status every minute Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Thu Oct 29 23:04:45 2009 @@ -15,6 +15,7 @@ set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt set bannedspec ./scripts/bannedspec.txt +set queueparser ./scripts/queue_parser.pl bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify @@ -31,6 +32,17 @@ putlog Sending Identify to NickServ } +bind time - * * * * * pub:buildstatus + +proc pub:buildstatus {nick host hand chan arg} { + global queueparser + set tistat [exec $queueparser ti] + set thstat [exec $queueparser th] + putserv privmsg #pld :$tistat + putserv privmsg #pld :$thstat + putlog Thrown stats to #pld: $tistat $thstat +} + proc help {nick} { global usage putserv privmsg $nick :$usage ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Oct 13 13:40:50 2009 New Revision: 10773 Modified: toys/stbr/stbr.tcl Log: - don't show options when there's nothing to show Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Oct 13 13:40:50 2009 @@ -277,8 +277,13 @@ if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] if {($isbanned == 0)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} +if {($bconds_with == ) ($bconds_without == ) ($defines == )} { +lappend rspecs $spec; append rspecs :$branch (to $towho) +lappend tspecs $spec; append tspecs :$branch +} else { lappend rspecs $spec; append rspecs :$branch (to $towho, options: $bconds_with $bconds_without $defines) lappend tspecs $spec; append tspecs :$branch (options: $bconds_with $bconds_without $defines) +} if {([string match test-build $second])} { if {[utimer 5 exec $makereq -d $dist -t $bconds_with $bconds_without $defines $spec:$branch /dev/null 21]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$second','$dist'); ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Oct 7 18:42:49 2009 New Revision: 10714 Modified: toys/stbr/stbr.tcl Log: - fixed bugfix where spec with '-' in name was treated as a --without bcond - changed usage a bit to simplify cases Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Oct 7 18:42:49 2009 @@ -10,7 +10,7 @@ set back set cntr 0 set cvsroot :pserver:c...@cvs.pld-linux.org:/cvsroot -set usage Usage: !stbr \[help\] \[url\] \[version\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] spec2\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] ... +set usage Usage: !stbr \[help\] \[url\] \[version\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] spec2\[:BRANCH\]\[/\[+bcond+...\]\[-bcond-...\]\[%kernel%...\]\] ... set nickpass stbr-bot set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt @@ -201,81 +201,56 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { -if {([string match *:* $spec])} { - set splited [split $spec :] - set spec [lindex $splited 0] - set branchstr [lindex $splited 1] - if {([string match *+* $branchstr]) || ([string match *-* $branchstr]) || ([string match *%* $branchstr])} { - if {([string match *%* $branchstr])} { - set bsplited [split $branchstr %] - set branchstr [lindex $bsplited 0] - set defines [lrange $bsplited 1 end] - if {([string match *-* $branchstr])} { - set bsplited [split $branchstr -] - set branchstr [lindex $bsplited 0] - set bconds_without [lrange $bsplited 1 end] - if {([string match *+* $branchstr])} { - set bsplited [split $branchstr +] - set branch [lindex $bsplited 0] - set bconds_with [lrange $bsplited 1 end] - } else { - set branch $branchstr - } - } elseif {([string match *+* $branchstr])} { - set bsplited [split $branchstr +] - set branch [lindex $bslited 0] - set bconds_with [lrange $bsplited 1 end] - } - } elseif {([string match *-* $branchstr])} { - set bsplited [split $branchstr -] - set branchstr [lindex $bsplited 0] - set bconds_without [lrange $bsplited 1 end] - if {([string match *+* $branchstr])} { - set bsplited [split $branchstr +] - set branch [lindex $bsplited 0] - set bconds_with [lrange $bsplited 1 end] - } - } +if {([string match */* $spec])} { + set halfs [split $spec /] + set spechalf [lindex $halfs 0] + set bcondshalf [lindex $halfs 1] + if {([string match *:* $spechalf])} { + set halfs [split $spechalf :] + set spec [lindex $halfs 0] + set branch [lindex $halfs 1] } else { - set branch $branchstr + set spec $spechalf + set branch HEAD } -} else { - set branch HEAD - if {([string match *+* $spec]) || ([string match *-* $spec]) || ([string match *%* $spec])} { - if {([string match *%* $spec])} { - set bsplited [split $spec %] - set spec [lindex $bsplited 0] + if {([string match *+* $bcondhalf]) || ([string match *-* $bcondhalf]) || ([string match *%* $bcondhalf])} { + if {([string match *%* $bcondhalf])} { + set bsplited [split $bcondhalf %] + set bcondhalf [lindex $bsplited 0] set defines [lrange $bsplited 1 end] - if {([string match *-* $spec])} { - set bsplited [split $spec -] - set spec [lindex $bsplited 0] + if {([string match *-* $bcondhalf])} { + set bsplited [split $bcondhalf -] + set bcondhalf [lindex $bsplited 0] set bconds_without [lrange $bsplited 1 end] - if {([string match *+* $spec])} { -
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Oct 7 21:12:37 2009 New Revision: 10717 Modified: toys/stbr/stbr.tcl Log: - fix Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Oct 7 21:12:37 2009 @@ -204,7 +204,7 @@ if {([string match */* $spec])} { set halfs [split $spec /] set spechalf [lindex $halfs 0] - set bcondshalf [lindex $halfs 1] + set bcondhalf [lindex $halfs 1] if {([string match *:* $spechalf])} { set halfs [split $spechalf :] set spec [lindex $halfs 0] ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Oct 7 22:02:28 2009 New Revision: 10718 Modified: toys/stbr/stbr.tcl Log: - again fixes - 0.9.1 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Oct 7 22:02:28 2009 @@ -1,6 +1,6 @@ # Send To Builder Request TCL by shad...@pld-linux.org -set versionstr Send To Builder Request TCL v0.9 by shadzik +set versionstr Send To Builder Request TCL v0.9.1 by shadzik set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db @@ -224,23 +224,20 @@ set bconds_without [lrange $bsplited 1 end] if {([string match *+* $bcondhalf])} { set bsplited [split $bcondhalf +] - set bconds_with [lrange $bsplited 0 end] + set bconds_with [lrange $bsplited 1 end] } - } elseif {([string match *+* $bcondhalf])} { - set bsplited [split $bcondhalf +] - set bconds_with [lrange $bsplited 0 end] - } + } } elseif {([string match *-* $bcondhalf])} { set bsplited [split $bcondhalf -] set bcondhalf [lindex $bsplited 0] set bconds_without [lrange $bsplited 1 end] if {([string match *+* $bcondhalf])} { set bsplited [split $bcondhalf +] - set bconds_with [lrange $bsplited 0 end] + set bconds_with [lrange $bsplited 1 end] } - } else { + } elseif {([string match *+* $bcondhalf])} { set bsplited [split $bcondhalf +] - set bconds_with [lrange $bsplited 0 end] + set bconds_with [lrange $bsplited 1 end] } } } elseif {([string match *:* $spec])} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Oct 6 22:42:40 2009 New Revision: 10709 Modified: toys/stbr/stbr.tcl Log: - add bcond and alt_kernel functionality - version: 0.9 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Oct 6 22:42:40 2009 @@ -8,7 +8,7 @@ set back set cntr 0 set cvsroot :pserver:c...@cvs.pld-linux.org:/cvsroot -set usage Usage: !stbr \[help\] \[url\] th\|ti \[command \valid builder command\\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set usage Usage: !stbr \[help\] \[url\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] spec2\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] ... set nickpass stbr-bot set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt @@ -182,6 +182,9 @@ set specs ; append specs $third; append specs ; append specs [lrange $arg 3 end] set rspecs set tspecs +set defines +set bconds_with +set bconds_without if {!([string match noupgrade $second] || [string match upgrade $second])} { putserv privmsg $chan :$nick: $usage; return 0 } @@ -189,19 +192,117 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { -if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} +if {([string match *:* $spec])} { + set splited [split $spec :] + set spec [lindex $splited 0] + set branchstr [lindex $splited 1] + if {([string match *+* $branchstr]) || ([string match *-* $branchstr]) || ([string match *%* $branchstr])} { + if {([string match *%* $branchstr])} { + set bsplited [split $branchstr %] + set branchstr [lindex $bsplited 0] + set defines [lrange $bsplited 1 end] + if {([string match *-* $branchstr])} { + set bsplited [split $branchstr -] + set branchstr [lindex $bsplited 0] + set bconds_without [lrange $bsplited 1 end] + if {([string match *+* $branchstr])} { + set bsplited [split $branchstr +] + set branch [lindex $bsplited 0] + set bconds_with [lrange $bsplited 1 end] + } else { + set branch $branchstr + } + } elseif {([string match *+* $branchstr])} { + set bsplited [split $branchstr +] + set branch [lindex $bslited 0] + set bconds_with [lrange $bsplited 1 end] + } + } elseif {([string match *-* $branchstr])} { + set bsplited [split $branchstr -] + set branchstr [lindex $bsplited 0] + set bconds_without [lrange $bsplited 1 end] + if {([string match *+* $branchstr])} { + set bsplited [split $branchstr +] + set branch [lindex $bsplited 0] + set bconds_with [lrange $bsplited 1 end] + } + } + } else { + set branch $branchstr + } +} else { + set branch HEAD + if {([string match *+* $spec]) || ([string match *-* $spec]) || ([string match *%* $spec])} { + if {([string match *%* $spec])} { + set bsplited [split $spec %] + set spec [lindex $bsplited 0] + set defines [lrange $bsplited 1 end] + if {([string match *-* $spec])} { + set bsplited [split $spec -] + set spec [lindex $bsplited 0] + set bconds_without [lrange $bsplited 1 end] + if {([string match *+* $spec])} { + set bsplited [split $spec +] + set spec [lindex $bsplited 0] + set bconds_with [lrange $bsplited 1 end] + } else { + set spec $spec + } + } elseif {([string match *+* $spec])} { + set bsplited [split $spec +] + set spec [lindex $bslited 0] + set bconds_with [lrange $bsplited 1
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Oct 7 00:14:02 2009 New Revision: 10712 Modified: toys/stbr/stbr.tcl Log: - add version function - you need now global +S to !del or send request while in maintenance mode Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Oct 7 00:14:02 2009 @@ -1,5 +1,7 @@ # Send To Builder Request TCL by shad...@pld-linux.org +set versionstr Send To Builder Request TCL v0.9 by shadzik + set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db set script ./scripts/cvslog.sh @@ -8,7 +10,7 @@ set back set cntr 0 set cvsroot :pserver:c...@cvs.pld-linux.org:/cvsroot -set usage Usage: !stbr \[help\] \[url\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] spec2\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] ... +set usage Usage: !stbr \[help\] \[url\] \[version\] th\|ti \[no\]upgrade spec1\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] spec2\[:BRANCH\]\[+bcond+...\]\[-bcond-...\]\[%kernel%...\] ... set nickpass stbr-bot set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt @@ -38,6 +40,7 @@ putserv privmsg $nick :Options: putserv privmsg $nick :!stbr help - shows this help putserv privmsg $nick :!stbr url - shows main URL on private chat + putserv privmsg $nick :!stbr version - shows version on public channel putserv privmsg $nick :Examples: putserv privmsg $nick :!stbr th upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to TH developers putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders @@ -47,6 +50,11 @@ putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. } +proc version {chan nick} { + global versionstr + putserv privmsg $chan :$nick: $versionstr +} + proc random {book} { set file [open $book r] gets $file hands @@ -87,7 +95,7 @@ proc pub:stat {nick host hand chan arg} { global cvsroot maintenance -if {([file exists $maintenance]) (![matchattr $hand n|m])} { +if {([file exists $maintenance]) (![matchattr $hand S])} { set plik [open $maintenance r] gets $plik reason close $plik @@ -132,7 +140,7 @@ proc pub:del {nick host hand chan arg} { global logfile cancellation - if {([matchattr $hand n|m])} { + if {([matchattr $hand S])} { set usage Usage: !del spec date time set spec [lindex $arg 0] set day [lindex $arg 1] @@ -153,12 +161,12 @@ proc pub:stbr {nick host hand chan arg} { global script back cntr logfile usage makereq cmdbook cmdtxt maintenance -if {([file exists $maintenance]) (![matchattr $hand n|m])} { +if {([file exists $maintenance]) (![matchattr $hand S])} { set plik [open $maintenance r] gets $plik reason close $plik putcmdlog Maintenance mode active - putserv privmsg $chan :$nick: I'm now in maintenance mode (reason: $reason). Only owners may perform real actions. + putserv privmsg $chan :$nick: I'm now in maintenance mode (reason: $reason). Only privileged users may perform real actions. return 0 } putcmdlog #$hand# Noticed Send To Build Request Mail command; @@ -167,6 +175,7 @@ set first [lindex $arg 0] if {([string match help $first])} {help $nick; return 0} if {([string match url $first])} {url $nick; return 0} +if {([string match version $first])} {version $chan $nick; return 0} if {([string match dzieki $first]) || ([string match dziekuje $first]) || ([string match thx $first]) || ([string match tx $first]) || ([string match thnx $first]) || ([string match dzięki $first]) || ([string match dziękuję $first])} { set answ [rthx]; putserv privmsg $chan :$nick: $answ; return 0 } @@ -319,4 +328,4 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.9 by shadzik loaded. +putlog $versionstr loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Jun 13 10:13:27 2009 New Revision: 10394 Modified: toys/stbr/stbr.tcl Log: - call sqlite once when deleting - fixed issue where only application is deleted and not the requester Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Jun 13 10:13:27 2009 @@ -145,8 +145,7 @@ set developer [exec sqlite $logfile select recipient from application where spec='$spec' and date='$date';] set email ; append email $developer; append email @pld-linux.org putcmdlog Deleting entry for: $spec on $date. Sending mail to $developer - exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; - exec sqlite $logfile DELETE FROM stbr where date='$date'; + exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; DELETE FROM stbr where date='$date'; exec $cancellation $spec $email $hand putserv privmsg $chan :$nick: Request deleted. Cancellation e-mail sent to $developer } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Thu Apr 30 20:58:32 2009 New Revision: 10349 Modified: toys/stbr/stbr.tcl Log: - fixed two ugly bugs Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Thu Apr 30 20:58:32 2009 @@ -145,9 +145,9 @@ set developer [exec sqlite $logfile select recipient from application where spec='$spec' and date='$date';] set email ; append email $developer; append email @pld-linux.org putcmdlog Deleting entry for: $spec on $date. Sending mail to $developer - exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; - exec sqlite $logfile DELETE FROM stbr where date='$date'; - exec $cancellation $spec $email $hand + exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; + exec sqlite $logfile DELETE FROM stbr where date='$date'; + exec $cancellation $spec $email $hand putserv privmsg $chan :$nick: Request deleted. Cancellation e-mail sent to $developer } } @@ -202,7 +202,7 @@ if {[utimer 5 exec $makereq -d $dist -t $spec:$branch /dev/null 21]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$second','$dist'); } { - if {[exec $script $dist $nick $second $pkg/$spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} + if {[exec $script $dist $nick $second $pkg/$spec $branch $towho ]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$second','$dist'); } } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Apr 29 20:55:26 2009 New Revision: 10342 Modified: toys/stbr/stbr.tcl Log: - 0.8.1 - new CVS layout - !stat command - vips own request Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Apr 29 20:55:26 2009 @@ -56,6 +56,13 @@ return [lindex $hands $whichone] } +proc rthx {} { + set answer {luz luzik nie ma sprawy spoko no problem n/p dla ciebie zawsze z mila checia} + set range [llength $answer] + set whichone [expr {int(rand()*$range)}] + return [lindex $answer $whichone] +} + proc sendto {dist spec branch} { global cvsroot if {([string match ti $dist])} { @@ -64,7 +71,10 @@ set reqbook ./scripts/requesters.txt } if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} -if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} +set splited [split $spec .] +set pkg [lindex $splited 0] +exec cvs -d $cvsroot get $cmd packages/$pkg/$spec +if {[catch {exec cvs -d $cvsroot log $cmd packages/$pkg/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} set file [open $reqbook r] gets $file lista close $file @@ -76,6 +86,30 @@ random $reqbook } +proc pub:stat {nick host hand chan arg} { +global cvsroot maintenance +if {([file exists $maintenance]) (![matchattr $hand n|m])} { + set plik [open $maintenance r] + gets $plik reason + close $plik + putcmdlog Maintenance mode active + putserv privmsg $chan :$nick: I'm now in maintenance mode (reason: $reason). Only owners may perform real actions. + return 0 + } +if {[llength [lrange $arg 0 end]] 2} {putserv privmsg $chan :$nick: Usage: !stat spec branch;return 0} +set spec [lindex $arg 0] +set branch [lindex $arg 1] +if {!([string match *.spec $spec])} { set pkg $spec;append spec .spec } else { set splited [split $spec .]; set pkg [lindex $splited 0] } +if {([string match HEAD $branch])} {set cmd -N} else {set cmd -r$branch} +exec cvs -d $cvsroot get $cmd packages/$pkg/$spec +if {![file exists packages/$pkg/$spec]} { + putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository. + return 0 +} + putserv privmsg $chan :$nick: Spec ($spec) exists on branch $branch in PLD's repository. + return 0 +} + proc banned_spec {spec} { global bannedspec set file [open $bannedspec r] @@ -96,6 +130,7 @@ bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr bind pub * !del pub:del +bind pub * !stat pub:stat proc pub:del {nick host hand chan arg} { global logfile cancellation @@ -135,6 +170,9 @@ set first [lindex $arg 0] if {([string match help $first])} {help $nick; return 0} if {([string match url $first])} {url $nick; return 0} +if {([string match dzieki $first]) || ([string match dziekuje $first]) || ([string match thx $first]) || ([string match tx $first]) || ([string match thnx $first])} { + set answ [rthx]; putserv privmsg $chan :$nick: $answ; return 0 +} if {!([string match th $first] || [string match ti $first])} { putserv privmsg $chan :$nick: $usage; return 0 } @@ -155,7 +193,7 @@ if {([string match noupgrade $second])} {set second test-build} foreach spec $specs { if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} -if {!([string match *.spec $spec])} { append spec .spec} +if {!([string match *.spec $spec])} { set pkg $spec; append spec .spec} {set splited [split $spec .]; set pkg [lindex $splited 0]} set towho [sendto $dist $spec $branch] if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] @@ -166,7 +204,7 @@ if {[utimer 5 exec $makereq -d $dist -t $spec:$branch /dev/null 21]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$second','$dist'); } { - if {[exec $script $dist $nick $second $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} + if {[exec $script $dist $nick $second $pkg/$spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$second','$dist'); } } @@ -183,4 +221,4 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.8b by shadzik loaded. +putlog Send To Builder Request TCL
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Apr 29 22:42:46 2009 New Revision: 10343 Modified: toys/stbr/stbr.tcl Log: - add TODO about rlog Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Apr 29 22:42:46 2009 @@ -1,4 +1,6 @@ # Send To Builder Request TCL by shad...@pld-linux.org +# TODO +# use rlog instead of log in cvs (gets faster info then get log) set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db @@ -170,7 +172,7 @@ set first [lindex $arg 0] if {([string match help $first])} {help $nick; return 0} if {([string match url $first])} {url $nick; return 0} -if {([string match dzieki $first]) || ([string match dziekuje $first]) || ([string match thx $first]) || ([string match tx $first]) || ([string match thnx $first])} { +if {([string match dzieki $first]) || ([string match dziekuje $first]) || ([string match thx $first]) || ([string match tx $first]) || ([string match thnx $first]) || ([string match dzięki $first]) || ([string match dziękuję $first])} { set answ [rthx]; putserv privmsg $chan :$nick: $answ; return 0 } if {!([string match th $first] || [string match ti $first])} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Apr 29 23:18:18 2009 New Revision: 10344 Modified: toys/stbr/stbr.tcl Log: - fixed log issues - removed TODO Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Apr 29 23:18:18 2009 @@ -1,6 +1,4 @@ # Send To Builder Request TCL by shad...@pld-linux.org -# TODO -# use rlog instead of log in cvs (gets faster info then get log) set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db @@ -75,8 +73,7 @@ if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} set splited [split $spec .] set pkg [lindex $splited 0] -exec cvs -d $cvsroot get $cmd packages/$pkg/$spec -if {[catch {exec cvs -d $cvsroot log $cmd packages/$pkg/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} +if {[catch {exec cvs -d $cvsroot rlog $cmd packages/$pkg/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} set file [open $reqbook r] gets $file lista close $file @@ -103,8 +100,7 @@ set branch [lindex $arg 1] if {!([string match *.spec $spec])} { set pkg $spec;append spec .spec } else { set splited [split $spec .]; set pkg [lindex $splited 0] } if {([string match HEAD $branch])} {set cmd -N} else {set cmd -r$branch} -exec cvs -d $cvsroot get $cmd packages/$pkg/$spec -if {![file exists packages/$pkg/$spec]} { +if {[catch {exec cvs -d $cvsroot rlog $cmd packages/$pkg/$spec} results]} { putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository. return 0 } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Feb 22 15:36:11 2009 New Revision: 10143 Modified: toys/stbr/stbr.tcl Log: - fix obvious bug Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Feb 22 15:36:11 2009 @@ -83,9 +83,7 @@ close $file foreach bspec $lista { if {([string match $spec $bspec])} { - return true - } else { - return false + return 0 } } } @@ -161,7 +159,7 @@ set towho [sendto $dist $spec $branch] if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set isbanned [banned_spec $spec] -if {($isbanned == true)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} +if {($isbanned == 0)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch if {([string match test-build $second])} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Feb 21 17:25:24 2009 New Revision: 10136 Modified: toys/stbr/stbr.tcl Log: - add banned_spec function - 0.8b Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Feb 21 17:25:24 2009 @@ -12,6 +12,7 @@ set nickpass stbr-bot set cmdtxt ./scripts/cmd.txt set maintenance ./scripts/maintenance.txt +set bannedspec ./scripts/bannedspec.txt bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify @@ -75,6 +76,20 @@ random $reqbook } +proc banned_spec {spec} { +global bannedspec +set file [open $bannedspec r] +gets $file lista +close $file +foreach bspec $lista { + if {([string match $spec $bspec])} { + return true + } else { + return false + } +} +} + proc command {exe} { if {[catch {exec which $exe} results]} {return 0} } @@ -98,7 +113,7 @@ set date ; append date $day; append date ; append date $hour set developer [exec sqlite $logfile select recipient from application where spec='$spec' and date='$date';] set email ; append email $developer; append email @pld-linux.org - putcmdlog Deleting entry for: $spec on $date + putcmdlog Deleting entry for: $spec on $date. Sending mail to $developer exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; exec sqlite $logfile DELETE FROM stbr where date='$date'; exec $cancellation $spec $email $hand @@ -145,6 +160,8 @@ if {!([string match *.spec $spec])} { append spec .spec} set towho [sendto $dist $spec $branch] if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} +set isbanned [banned_spec $spec] +if {($isbanned == true)} {putserv privmsg $chan :$nick: $spec is banned from being STBRed.; return 0} lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch if {([string match test-build $second])} { @@ -168,4 +185,4 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.8a by shadzik loaded. +putlog Send To Builder Request TCL v0.8b by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon Nov 3 00:15:50 2008 New Revision: 9930 Modified: toys/stbr/stbr.tcl Log: - cancellation for spec functionality - ver. 0.8a Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon Nov 3 00:15:50 2008 @@ -3,6 +3,7 @@ set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db set script ./scripts/cvslog.sh +set cancellation ./scripts/cancellation.sh set makereq ./pld-builder.new/client/make-request.sh set back set cntr 0 @@ -84,7 +85,7 @@ bind pub * !del pub:del proc pub:del {nick host hand chan arg} { -global logfile +global logfile cancellation if {([matchattr $hand n|m])} { set usage Usage: !del spec date time set spec [lindex $arg 0] @@ -95,10 +96,13 @@ return 0 } set date ; append date $day; append date ; append date $hour + set developer [exec sqlite $logfile select recipient from application where spec='$spec' and date='$date';] + set email ; append email $developer; append email @pld-linux.org putcmdlog Deleting entry for: $spec on $date exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; exec sqlite $logfile DELETE FROM stbr where date='$date'; - putserv privmsg $chan :$nick: Done. + exec $cancellation $spec $email $hand + putserv privmsg $chan :$nick: Request deleted. Cancellation e-mail sent to $developer } } @@ -164,4 +168,4 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.8 by shadzik loaded. +putlog Send To Builder Request TCL v0.8a by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Oct 26 15:55:15 2008 New Revision: 9923 Modified: toys/stbr/stbr.tcl Log: - add !del, a rudementary function for deleting mistaken requests Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Oct 26 15:55:15 2008 @@ -81,6 +81,25 @@ bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr +bind pub * !del pub:del + +proc pub:del {nick host hand chan arg} { +global logfile + if {([matchattr $hand n|m])} { + set usage Usage: !del spec date time + set spec [lindex $arg 0] + set day [lindex $arg 1] + set hour [lindex $arg 2] + if {([string length $spec]2)} {putserv privmsg $chan :$nick: $usage; return 0} + if {([string length $day]!=10)} {putserv privmsg $chan :$nick: $usage; return 0} + if {([string length $hour]!=8)} {putserv privmsg $chan :$nick: $usage; return 0} + set date ; append date $day; append date ; append date $hour + putcmdlog Deleting entry for: $spec on $date + exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; + exec sqlite $logfile DELETE FROM stbr where date='$date'; + putserv privmsg $chan :$nick: Done. + } +} proc pub:stbr {nick host hand chan arg} { global script back cntr logfile usage makereq cmdbook cmdtxt maintenance ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Oct 26 15:58:51 2008 New Revision: 9924 Modified: toys/stbr/stbr.tcl Log: - better Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Oct 26 15:58:51 2008 @@ -90,9 +90,10 @@ set spec [lindex $arg 0] set day [lindex $arg 1] set hour [lindex $arg 2] - if {([string length $spec]2)} {putserv privmsg $chan :$nick: $usage; return 0} - if {([string length $day]!=10)} {putserv privmsg $chan :$nick: $usage; return 0} - if {([string length $hour]!=8)} {putserv privmsg $chan :$nick: $usage; return 0} + if {([string length $spec]2) || ([string length $day]!=10) || ([string length $hour]!=8)} { + putserv privmsg $chan :$nick: $usage + return 0 + } set date ; append date $day; append date ; append date $hour putcmdlog Deleting entry for: $spec on $date exec sqlite $logfile DELETE FROM application where spec='$spec' and date='$date'; ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Oct 3 01:19:56 2008 New Revision: 9889 Modified: toys/stbr/stbr.tcl Log: - adjust help info Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Oct 3 01:19:56 2008 @@ -37,8 +37,8 @@ putserv privmsg $nick :!stbr help - shows this help putserv privmsg $nick :!stbr url - shows main URL on private chat putserv privmsg $nick :Examples: - putserv privmsg $nick :!stbr upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to developers - putserv privmsg $nick :!stbr noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to builders + putserv privmsg $nick :!stbr th upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to TH developers + putserv privmsg $nick :!stbr ti noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to Titanium builders } proc url {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Sep 26 17:29:02 2008 New Revision: 9876 Modified: toys/stbr/stbr.tcl Log: - version 0.8 (RC2) - add maintenance mode - add Titanium functionality Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Sep 26 17:29:02 2008 @@ -1,31 +1,32 @@ # Send To Builder Request TCL by [EMAIL PROTECTED] -set reqbook ./scripts/requesters.txt +set cmdbook ./scripts/cmdbook.txt set logfile /home/users/stbr/db/stbrlog.db -set file ./scripts/cvslog.sh +set script ./scripts/cvslog.sh set makereq ./pld-builder.new/client/make-request.sh set back set cntr 0 set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot -set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set usage Usage: !stbr \[help\] \[url\] th\|ti \[command \valid builder command\\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... set nickpass stbr-bot +set cmdtxt ./scripts/cmd.txt +set maintenance ./scripts/maintenance.txt bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify proc man_identify { hand idx mask } { - global nickpass +global nickpass putserv PRIVMSG NickServ :identify $nickpass putlog Sending Identify to NickServ } proc identify { nick uhost hand text } { - global nickpass +global nickpass putserv PRIVMSG NickServ :identify $nickpass putlog Sending Identify to NickServ } - proc help {nick} { global usage putserv privmsg $nick :$usage @@ -44,9 +45,8 @@ putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. } -proc random {} { - global reqbook - set file [open $reqbook r] +proc random {book} { + set file [open $book r] gets $file hands set range [llength $hands] close $file @@ -54,19 +54,28 @@ return [lindex $hands $whichone] } -proc sendto {spec branch} { - global cvsroot reqbook - if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} - if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $6; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} - set file [open $reqbook r] - gets $file lista - close $file - foreach devil $results { - foreach requester $lista { - if {([string match $requester $devil])} {return $devil} +proc sendto {dist spec branch} { +global cvsroot +if {([string match ti $dist])} { + set reqbook ./scripts/requesters-ti.txt +} { + set reqbook ./scripts/requesters.txt } +if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} +if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} +set file [open $reqbook r] +gets $file lista +close $file +foreach devil $results { + foreach requester $lista { + if {([string match $requester $devil])} {return $devil} + } } -random +random $reqbook +} + +proc command {exe} { +if {[catch {exec which $exe} results]} {return 0} } bind pub * !stbr pub:stbr @@ -74,35 +83,52 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { - global file back cntr logfile usage makereq - putcmdlog #$hand# Noticed Send To Build Request Mail command; - set first [lindex $arg 0] - if {([string match help $first])} {help $nick; return 0} - if {([string match url $first])} {url $nick; return 0} - set second [lindex $arg 1] - set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] - set rspecs - set tspecs - if {!([string match th-ready $first] || [string match th-test $first] || [string match noupgrade $first] || [string match upgrade $first])} {putserv privmsg $chan :$nick: $usage; return 0} - if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} - if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} - if {([string match th-test $first] || [string match noupgrade $first])} {set first test-build} - if {([string match th-ready $first])} {set first upgrade} - set time [clock seconds] - set date [clock format $time -format %Y-%m-%d %H:%M:%S] - foreach spec $specs { - if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} - if {!([string match *.spec $spec])} { append spec .spec} - set towho [sendto $spec $branch] - if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Mar 4 12:59:49 2008 New Revision: 9565 Modified: toys/stbr/stbr.tcl Log: - fixed for new cvs version Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Mar 4 12:59:49 2008 @@ -57,7 +57,7 @@ proc sendto {spec branch} { global cvsroot reqbook if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} - if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} + if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $6; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} set file [open $reqbook r] gets $file lista close $file ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: adamg Date: Sat Dec 22 20:14:34 2007 New Revision: 9153 Modified: toys/stbr/stbr.tcl Log: - indentations Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Dec 22 20:14:34 2007 @@ -14,13 +14,13 @@ bind dcc n identify man_identify proc man_identify { hand idx mask } { -global nickpass + global nickpass putserv PRIVMSG NickServ :identify $nickpass putlog Sending Identify to NickServ } proc identify { nick uhost hand text } { -global nickpass + global nickpass putserv PRIVMSG NickServ :identify $nickpass putlog Sending Identify to NickServ } @@ -55,16 +55,16 @@ } proc sendto {spec branch} { -global cvsroot reqbook -if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} -if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} -set file [open $reqbook r] -gets $file lista -close $file -foreach devil $results { - foreach requester $lista { - if {([string match $requester $devil])} {return $devil} - } + global cvsroot reqbook + if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} + if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} + set file [open $reqbook r] + gets $file lista + close $file + foreach devil $results { + foreach requester $lista { + if {([string match $requester $devil])} {return $devil} +} } random } @@ -74,32 +74,32 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile usage makereq -putcmdlog #$hand# Noticed Send To Build Request Mail command; -set first [lindex $arg 0] -if {([string match help $first])} {help $nick; return 0} -if {([string match url $first])} {url $nick; return 0} -set second [lindex $arg 1] -set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] -set rspecs -set tspecs -if {!([string match th-ready $first] || [string match th-test $first] || [string match noupgrade $first] || [string match upgrade $first])} {putserv privmsg $chan :$nick: $usage; return 0} -if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} -if {([string match th-test $first] || [string match noupgrade $first])} {set first test-build} -if {([string match th-ready $first])} {set first upgrade} -set time [clock seconds] -set date [clock format $time -format %Y-%m-%d %H:%M:%S] -foreach spec $specs { -if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} -if {!([string match *.spec $spec])} { append spec .spec} -set towho [sendto $spec $branch] -if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} -lappend rspecs $spec; append rspecs :$branch (to $towho) -lappend tspecs $spec; append tspecs :$branch -if {([string match test-build $first])} { - if {[utimer 5 exec $makereq -t $spec:$branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} - exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$first'); + global file back cntr logfile usage makereq + putcmdlog #$hand# Noticed Send To Build Request Mail command; + set first [lindex $arg 0] + if {([string match help $first])} {help $nick; return 0} + if {([string match url $first])} {url $nick; return 0} + set second [lindex $arg 1] + set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] + set rspecs + set tspecs + if {!([string match th-ready $first] || [string match th-test $first] || [string match noupgrade $first] || [string match upgrade $first])} {putserv privmsg $chan :$nick: $usage; return 0} + if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} + if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} + if {([string match th-test $first] || [string match noupgrade $first])} {set first test-build} + if {([string match th-ready $first])} {set first upgrade} + set time [clock seconds] + set date [clock format $time -format %Y-%m-%d %H:%M:%S] + foreach spec $specs { + if {([string match *:* $spec])} {set splited [split $spec :];set spec
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed Nov 28 14:30:41 2007 New Revision: 9115 Modified: toys/stbr/stbr.tcl Log: - fix date in URL Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed Nov 28 14:30:41 2007 @@ -106,10 +106,14 @@ } } exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); +set date [split $date ] +set day [lindex $date 0] +set hour [lindex $date 1] +set space %20 if {([string match test-build $first])} { - putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. Visit http://stbr.pld-linux.org/?show=$nickdate=$date to track your request. + putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. Visit http://stbr.pld-linux.org/?show=$nickdate=$day$space$hour to track your request. } { - putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. Visit http://stbr.pld-linux.org/?show=$nickdate=$date to track your request. + putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. Visit http://stbr.pld-linux.org/?show=$nickdate=$day$space$hour to track your request. } if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 27 14:52:37 2007 New Revision: 9105 Modified: toys/stbr/stbr.tcl Log: - by a test-build request wait 5 seconds before sending it to builders (works around the issue when the queue status on page was still not filled although it was filled) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 27 14:52:37 2007 @@ -8,7 +8,7 @@ set cntr 0 set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... -set nickpass +set nickpass stbr-bot bind notc - *This nick is owned by someone else* identify bind dcc n identify man_identify @@ -88,7 +88,7 @@ lappend rspecs $spec; append rspecs :$branch (to $towho) lappend tspecs $spec; append tspecs :$branch if {([string match test-build $first])} { - if {[exec $makereq -t $spec:$branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} + if {[utimer 5 exec $makereq -t $spec:$branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$first'); } { if {[exec $file $nick $first $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 27 15:12:25 2007 New Revision: 9107 Modified: toys/stbr/stbr.tcl Log: - inform about where to find the request logs after a successful stbr Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 27 15:12:25 2007 @@ -97,9 +97,9 @@ } exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); if {([string match test-build $first])} { - putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. + putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. Visit http://stbr.pld-linux.org/ to track your request. } { - putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. + putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. Visit http://stbr.pld-linux.org/ to track your request. } if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 27 19:27:25 2007 New Revision: 9112 Modified: toys/stbr/stbr.tcl Log: - more precise URL for tracking Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 27 19:27:25 2007 @@ -97,9 +97,9 @@ } exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); if {([string match test-build $first])} { - putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. Visit http://stbr.pld-linux.org/ to track your request. + putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. Visit http://stbr.pld-linux.org/?show=$nickdate=$date to track your request. } { - putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. Visit http://stbr.pld-linux.org/ to track your request. + putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. Visit http://stbr.pld-linux.org/?show=$nickdate=$date to track your request. } if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 27 20:25:58 2007 New Revision: 9113 Modified: toys/stbr/stbr.tcl Log: - a much better help Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 27 20:25:58 2007 @@ -27,7 +27,17 @@ proc help {nick} { - putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://stbr.pld-linux.org/ to see the status of your request. Options in square brackets are optional. + global usage + putserv privmsg $nick :$usage + putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. + putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. + putserv privmsg $nick :Options in square brackets are optional. + putserv privmsg $nick :Options: + putserv privmsg $nick :!stbr help - shows this help + putserv privmsg $nick :!stbr url - shows main URL on private chat + putserv privmsg $nick :Examples: + putserv privmsg $nick :!stbr upgrade spec1 spec2:DEVEL - sends upgrade request for spec1 on branch HEAD and spec2 on branch DEVEL to developers + putserv privmsg $nick :!stbr noupgrade spec1 - sends noupgrade request for spec1 on branch HEAD directly to builders } proc url {nick} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue Nov 27 20:57:52 2007 New Revision: 9114 Modified: toys/stbr/stbr.tcl Log: - hopefully fixed identification Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue Nov 27 20:57:52 2007 @@ -10,7 +10,7 @@ set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... set nickpass stbr-bot -bind notc - *This nick is owned by someone else* identify +bind notc - *This nickname is owned by someone else* identify bind dcc n identify man_identify proc man_identify { hand idx mask } { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Oct 21 03:48:30 2007 New Revision: 8834 Modified: toys/stbr/stbr.tcl Log: - add freenode nick identification Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Oct 21 03:48:30 2007 @@ -8,6 +8,16 @@ set cntr 0 set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set nickpass + +bind notc B *This nickname is owned by someone else* identify + +proc identify { nick uhost hand text } { +global nickpass + putserv PRIVMSG nickserv :identify $nickpass + putlog Sending Identify to NickServ +} + proc help {nick} { putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://stbr.pld-linux.org/ to see the status of your request. Options in square brackets are optional. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun Oct 21 04:34:45 2007 New Revision: 8835 Modified: toys/stbr/stbr.tcl Log: - now better Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun Oct 21 04:34:45 2007 @@ -10,11 +10,18 @@ set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... set nickpass -bind notc B *This nickname is owned by someone else* identify +bind notc - *This nick is owned by someone else* identify +bind dcc n identify man_identify + +proc man_identify { hand idx mask } { +global nickpass + putserv PRIVMSG NickServ :identify $nickpass + putlog Sending Identify to NickServ +} proc identify { nick uhost hand text } { global nickpass - putserv PRIVMSG nickserv :identify $nickpass + putserv PRIVMSG NickServ :identify $nickpass putlog Sending Identify to NickServ } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sat Sep 15 00:21:27 2007 New Revision: 8723 Modified: toys/stbr/stbr.tcl Log: - don't send mails to developers when requesting a test-build, instead send the request directly to builder (we now have the rights to it) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Sep 15 00:21:27 2007 @@ -3,6 +3,7 @@ set reqbook ./scripts/requesters.txt set logfile /home/users/stbr/db/stbrlog.db set file ./scripts/cvslog.sh +set makereq ./pld-builder.new/client/make-request.sh set back set cntr 0 set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot @@ -46,7 +47,7 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile usage +global file back cntr logfile usage makereq putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] if {([string match help $first])} {help $nick; return 0} @@ -54,6 +55,7 @@ set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs +set tspecs if {!([string match th-ready $first] || [string match th-test $first] || [string match noupgrade $first] || [string match upgrade $first])} {putserv privmsg $chan :$nick: $usage; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} @@ -67,12 +69,22 @@ set towho [sendto $spec $branch] if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} lappend rspecs $spec; append rspecs :$branch (to $towho) -if {[exec $file $nick $first $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} -exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$first'); +lappend tspecs $spec; append tspecs :$branch +if {([string match test-build $first])} { + if {[exec $makereq -t $spec:$branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send test-build request for $spec to builders.; return 1} + exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','stbr','$first'); +} { + if {[exec $file $nick $first $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} + exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$first'); +} } exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); -putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. +if {([string match test-build $first])} { + putserv privmsg $chan :$nick: Sent $first request for $tspecs directly to builders. +} { + putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. +} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.5 by shadzik loaded. +putlog Send To Builder Request TCL v0.6 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Aug 10 20:34:32 2007 New Revision: 8693 Modified: toys/stbr/stbr.tcl Log: - new URL Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Aug 10 20:34:32 2007 @@ -9,11 +9,11 @@ set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... proc help {nick} { - putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://team.pld-linux.org/~stbr/ to see the status of your request. Options in square brackets are optional. + putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://stbr.pld-linux.org/ to see the status of your request. Options in square brackets are optional. } proc url {nick} { - putserv privmsg $nick :Visit http://team.pld-linux.org/~stbr/ to see the status of your request. + putserv privmsg $nick :Visit http://stbr.pld-linux.org/ to see the status of your request. } proc random {} { ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri Jun 22 20:25:19 2007 New Revision: 8647 Modified: toys/stbr/stbr.tcl Log: - on help and url send private message to user instead of channel Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri Jun 22 20:25:19 2007 @@ -8,12 +8,12 @@ set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... -proc help {chan nick} { - putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://team.pld-linux.org/~stbr/ to see the status of your request. Options in square brackets are optional. +proc help {nick} { + putserv privmsg $nick :Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://team.pld-linux.org/~stbr/ to see the status of your request. Options in square brackets are optional. } -proc url {chan nick} { - putserv privmsg $chan :$nick: Visit http://team.pld-linux.org/~stbr/ to see the status of your request. +proc url {nick} { + putserv privmsg $nick :Visit http://team.pld-linux.org/~stbr/ to see the status of your request. } proc random {} { @@ -49,8 +49,8 @@ global file back cntr logfile usage putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] -if {([string match help $first])} {help $chan $nick; return 0} -if {([string match url $first])} {url $chan $nick; return 0} +if {([string match help $first])} {help $nick; return 0} +if {([string match url $first])} {url $nick; return 0} set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: vip Date: Sat Jun 2 20:00:24 2007 New Revision: 8633 Modified: toys/stbr/stbr.tcl Log: - proper date format Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sat Jun 2 20:00:24 2007 @@ -60,7 +60,7 @@ if {([string match th-test $first] || [string match noupgrade $first])} {set first test-build} if {([string match th-ready $first])} {set first upgrade} set time [clock seconds] -set date [clock format $time -format %d.%m.%Y %H:%M:%S] +set date [clock format $time -format %Y-%m-%d %H:%M:%S] foreach spec $specs { if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue May 29 16:06:02 2007 New Revision: 8629 Modified: toys/stbr/stbr.tcl Log: - !stbr url - now available Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue May 29 16:06:02 2007 @@ -6,10 +6,14 @@ set back set cntr 0 set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot -set usage Usage: !stbr \[help\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set usage Usage: !stbr \[help\] \[url\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... proc help {chan nick} { - putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. + putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. Visit http://team.pld-linux.org/~stbr/ to see the status of your request. Options in square brackets are optional. +} + +proc url {chan nick} { + putserv privmsg $chan :$nick: Visit http://team.pld-linux.org/~stbr/ to see the status of your request. } proc random {} { @@ -46,6 +50,7 @@ putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] if {([string match help $first])} {help $chan $nick; return 0} +if {([string match url $first])} {url $chan $nick; return 0} set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri May 18 00:39:13 2007 New Revision: 8599 Modified: toys/stbr/stbr.tcl Log: - fix a bug where all request of a user were deleted if spec was not found in repo (thx to sparky for pointing this out) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri May 18 00:39:13 2007 @@ -40,11 +40,10 @@ if {([string match th-ready $first])} {set first upgrade} set time [clock seconds] set date [clock format $time -format %d.%m.%Y %H:%M:%S] -exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); foreach spec $specs { if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} -if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; exec sqlite $logfile delete from stbr where sender='$nick';; return 0} +if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} lappend rspecs $spec; append rspecs :$branch if {[exec $file $nick $first $spec $branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] @@ -52,6 +51,7 @@ close $tfile exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$person','$first'); } +exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); putserv privmsg $chan :$nick: Sent STBR Mail, an $first will be performed for $rspecs. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri May 18 05:11:40 2007 New Revision: 8603 Modified: toys/stbr/stbr.tcl Log: - add procedure sendto - version 0.5 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri May 18 05:11:40 2007 @@ -5,7 +5,6 @@ set file ./scripts/cvslog.sh set back set cntr 0 -set towho ./scripts/sent.txt set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot set usage Usage: !stbr \[help\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... @@ -21,12 +20,26 @@ putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. } +proc sendto {spec branch} { +global cvsroot reqbook +if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} +if {[catch {exec cvs -d $cvsroot log $cmd SPECS/$spec | awk {/author/{a = $5; sub(/;/, , a); if (!seen[a]) print a; seen[a] = 1}}} results]} {return 0} +set file [open $reqbook r] +gets $file lista +close $file +foreach devil $results { + foreach requester $lista { + if {([string match $requester $devil])} {return $devil} + } +} +} + bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile towho usage +global file back cntr logfile usage putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] if {([string match help $first])} {help $chan $nick; return 0} @@ -44,16 +57,14 @@ if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} -lappend rspecs $spec; append rspecs :$branch -if {[exec $file $nick $first $spec $branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} -set tfile [open $towho r] -gets $tfile person; append rspecs (to $person) -close $tfile -exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$person','$first'); +set towho [sendto $spec $branch] +lappend rspecs $spec; append rspecs :$branch (to $towho) +if {[exec $file $nick $first $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} +exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$first'); } exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); -putserv privmsg $chan :$nick: Sent STBR Mail, an $first will be performed for $rspecs. +putserv privmsg $chan :$nick: Sent STBR Mail for $rspecs. An $first will be performed. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.4 by shadzik loaded. +putlog Send To Builder Request TCL v0.5 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri May 18 05:39:16 2007 New Revision: 8604 Modified: toys/stbr/stbr.tcl Log: - pick a random developer with stbr rights and send the email to him/her when neither of the developers mentioned in cvs log have stbr rights Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri May 18 05:39:16 2007 @@ -20,6 +20,16 @@ putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. } +proc random {} { + global reqbook + set file [open $reqbook r] + gets $file hands + set range [llength $hands] + close $file + set whichone [expr {int(rand()*$range)}] + return [lindex $hands $whichone] +} + proc sendto {spec branch} { global cvsroot reqbook if {([string match HEAD $branch])} {set cmd -N} {set cmd -r$branch} @@ -32,6 +42,7 @@ if {([string match $requester $devil])} {return $devil} } } +random } bind pub * !stbr pub:stbr ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Fri May 18 05:57:41 2007 New Revision: 8605 Modified: toys/stbr/stbr.tcl Log: - increase performance by calling cvs log just once for each spec Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Fri May 18 05:57:41 2007 @@ -8,14 +8,6 @@ set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot set usage Usage: !stbr \[help\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... -proc cvs {spec branch} { - global cvsroot - if {[catch {exec cvs -d $cvsroot log -r$branch SPECS/$spec} results]} { - return 0 - } -return 1 -} - proc help {chan nick} { putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. } @@ -67,8 +59,8 @@ foreach spec $specs { if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} -if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} set towho [sendto $spec $branch] +if {($towho == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} lappend rspecs $spec; append rspecs :$branch (to $towho) if {[exec $file $nick $first $spec $branch $towho]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec to $towho.; return 1} exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$towho','$first'); ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Thu May 17 00:11:55 2007 New Revision: 8570 Modified: toys/stbr/stbr.tcl Log: - changed usage a bit (old one still works, will be removed by next version) - apopraite message change Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Thu May 17 00:11:55 2007 @@ -1,13 +1,13 @@ # Send To Builder Request TCL by [EMAIL PROTECTED] set reqbook ./scripts/requesters.txt -set logfile ./scripts/stbrlog.db +set logfile /home/users/stbr/db/stbrlog.db set file ./scripts/cvslog.sh set back set cntr 0 set towho ./scripts/sent.txt set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot -set usage Usage: !stbr \[help\] th-{ready|test} spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set usage Usage: !stbr \[help\] \[no\]upgrade spec1\[:BRANCH\] spec2\[:BRANCH\] ... proc cvs {spec branch} { global cvsroot @@ -18,7 +18,7 @@ } proc help {chan nick} { - putserv privmsg $chan :$nick: Most importand is that you understand what the difference between th-test and th-ready is. When you call a th-test build it's going to be just an test-build. When you call a th-ready build the package is going to be upgraded on builders and ftp. + putserv privmsg $chan :$nick: Most importand is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. } bind pub * !stbr pub:stbr @@ -33,9 +33,11 @@ set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs -if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: $usage; return 0} +if {!([string match th-ready $first] || [string match th-test $first] || [string match noupgrade $first] || [string match upgrade $first])} {putserv privmsg $chan :$nick: $usage; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} +if {([string match th-test $first] || [string match noupgrade $first])} {set first test-build} +if {([string match th-ready $first])} {set first upgrade} set time [clock seconds] set date [clock format $time -format %d.%m.%Y %H:%M:%S] exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); @@ -50,7 +52,7 @@ close $tfile exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$person','$first'); } -putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. +putserv privmsg $chan :$nick: Sent STBR Mail, an $first will be performed for $rspecs. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Thu May 17 00:15:48 2007 New Revision: 8572 Modified: toys/stbr/stbr.tcl Log: - typo ;) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Thu May 17 00:15:48 2007 @@ -18,7 +18,7 @@ } proc help {chan nick} { - putserv privmsg $chan :$nick: Most importand is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. + putserv privmsg $chan :$nick: Most important is that you understand what the difference between 'upgrade' and 'noupgrade' is. When you call 'noupgrade' it's going to be just an test-build. When you call 'upgrade' the package is going to be upgraded on builders and ftp. } bind pub * !stbr pub:stbr ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Thu May 17 01:39:55 2007 New Revision: 8577 Modified: toys/stbr/stbr.tcl Log: - add branch to database Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Thu May 17 01:39:55 2007 @@ -50,7 +50,7 @@ set tfile [open $towho r] gets $tfile person; append rspecs (to $person) close $tfile -exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$person','$first'); +exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$branch','$person','$first'); } putserv privmsg $chan :$nick: Sent STBR Mail, an $first will be performed for $rspecs. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Wed May 16 01:33:45 2007 New Revision: 8556 Modified: toys/stbr/stbr.tcl Log: - add help procedure Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Wed May 16 01:33:45 2007 @@ -7,7 +7,7 @@ set cntr 0 set towho ./scripts/sent.txt set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot -set usage Usage: !stbr th-{ready|test} spec1\[:BRANCH\] spec2\[:BRANCH\] ... +set usage Usage: !stbr \[help\] th-{ready|test} spec1\[:BRANCH\] spec2\[:BRANCH\] ... proc cvs {spec branch} { global cvsroot @@ -17,6 +17,10 @@ return 1 } +proc help {chan nick} { + putserv privmsg $chan :$nick: Most importand is that you understand what the difference between th-test and th-ready is. When you call a th-test build it's going to be just an test-build. When you call a th-ready build the package is going to be upgraded on builders and ftp. +} + bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr @@ -25,6 +29,7 @@ global file back cntr logfile towho usage putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] +if {([string match help $first])} {help $chan $nick; return 0} set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 17:18:06 2007 New Revision: 8523 Modified: toys/stbr/stbr.tcl Log: - add html colors to logfile Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 17:18:06 2007 @@ -6,32 +6,39 @@ set back set cntr 0 set towho ./scripts/sent.txt +set green font color='green' +set red font color='red' +set endc /font +set bold b +set endb /b bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile towho +global file back cntr logfile towho red green endc bold endb putcmdlog #$hand# Noticed Send To Build Request Mail command; if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set first [lindex $arg 0] set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs +set logspecs if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec +append logspecs $red; lappend logspecs $spec ; append logspecs $endc if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] -gets $tfile person; append rspecs (to $person) +gets $tfile person; append rspecs (to $person); append logspecs (to $green$person$endc) close $tfile } set lfile [open $logfile a] set time [clock seconds] -set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log br; +set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $logspecs to $bold$first$endb; append log br; puts $lfile $log close $lfile putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 17:32:29 2007 New Revision: 8524 Modified: toys/stbr/stbr.tcl Log: - link specs with cvsweb in logfile Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 17:32:29 2007 @@ -11,13 +11,16 @@ set endc /font set bold b set endb /b +set cvsurl a href='http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/; +set endcvs ' +set enda /a bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile towho red green endc bold endb +global file back cntr logfile towho red green endc bold endb cvsurl endcvs enda putcmdlog #$hand# Noticed Send To Build Request Mail command; if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set first [lindex $arg 0] @@ -30,7 +33,8 @@ foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec -append logspecs $red; lappend logspecs $spec ; append logspecs $endc +append logspecs $cvsurl; append logspecs $spec; append logspecs $endcvs +append logspecs $red; lappend logspecs $spec ; append logspecs $endc; append logspecs $enda if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] gets $tfile person; append rspecs (to $person); append logspecs (to $green$person$endc) ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 18:06:07 2007 New Revision: 8525 Modified: toys/stbr/stbr.tcl Log: - do not count help message to time limit Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 18:06:07 2007 @@ -22,13 +22,13 @@ proc pub:stbr {nick host hand chan arg} { global file back cntr logfile towho red green endc bold endb cvsurl endcvs enda putcmdlog #$hand# Noticed Send To Build Request Mail command; -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set first [lindex $arg 0] set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs set logspecs if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} +if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 21:24:18 2007 New Revision: 8529 Modified: toys/stbr/stbr.tcl Log: - fix time outing once again - add cvs proc to check if requested spec is in repository Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 21:24:18 2007 @@ -14,6 +14,15 @@ set cvsurl a href='http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/; set endcvs ' set enda /a +set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot + +proc cvs { spec } { + global cvsroot + if {[catch {exec cvs -d $cvsroot log SPECS/$spec} results]} { + return 0 + } +return 1 +} bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr @@ -28,10 +37,11 @@ set rspecs set logspecs if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} -if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} +if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} +if {([cvs $spec] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) in PLD's repository.; return 0} lappend rspecs $spec append logspecs $cvsurl; append logspecs $spec; append logspecs $endcvs append logspecs $red; lappend logspecs $spec ; append logspecs $endc; append logspecs $enda ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 21:58:52 2007 New Revision: 8530 Modified: toys/stbr/stbr.tcl Log: - remove logging to file - add sqlite logging function Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 21:58:52 2007 @@ -1,7 +1,7 @@ # Send To Builder Request TCL by [EMAIL PROTECTED] set reqbook ./scripts/requesters.txt -set logfile ./scripts/stbr.log +set logfile ./scripts/stbrlog.db set file ./scripts/cvslog.sh set back set cntr 0 @@ -35,26 +35,22 @@ set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs -set logspecs if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} +set time [clock seconds] +set date [clock format $time -format %d.%m.%Y %H:%M] foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} if {([cvs $spec] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) in PLD's repository.; return 0} lappend rspecs $spec -append logspecs $cvsurl; append logspecs $spec; append logspecs $endcvs -append logspecs $red; lappend logspecs $spec ; append logspecs $endc; append logspecs $enda if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] -gets $tfile person; append rspecs (to $person); append logspecs (to $green$person$endc) +gets $tfile person; append rspecs (to $person) close $tfile +exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); +exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$person','$first'); } -set lfile [open $logfile a] -set time [clock seconds] -set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $logspecs to $bold$first$endb; append log br; -puts $lfile $log -close $lfile putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 22:01:28 2007 New Revision: 8531 Modified: toys/stbr/stbr.tcl Log: - cleanup Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 22:01:28 2007 @@ -6,14 +6,6 @@ set back set cntr 0 set towho ./scripts/sent.txt -set green font color='green' -set red font color='red' -set endc /font -set bold b -set endb /b -set cvsurl a href='http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/; -set endcvs ' -set enda /a set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot proc cvs { spec } { @@ -29,7 +21,7 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile towho red green endc bold endb cvsurl endcvs enda +global file back cntr logfile towho putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] set second [lindex $arg 1] ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 22:12:07 2007 New Revision: 8532 Modified: toys/stbr/stbr.tcl Log: - fix logging (added seconds to prevent an sql error where date wasn't unique) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 22:12:07 2007 @@ -30,9 +30,9 @@ if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} -set time [clock seconds] -set date [clock format $time -format %d.%m.%Y %H:%M] foreach spec $specs { +set time [clock seconds] +set date [clock format $time -format %d.%m.%Y %H:%M:%S] if {!([string match *.spec $spec])} { append spec .spec} if {([cvs $spec] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) in PLD's repository.; return 0} lappend rspecs $spec ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 22:29:25 2007 New Revision: 8533 Modified: toys/stbr/stbr.tcl Log: - insert reqester to DB just once Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 22:29:25 2007 @@ -30,6 +30,7 @@ if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} +exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); foreach spec $specs { set time [clock seconds] set date [clock format $time -format %d.%m.%Y %H:%M:%S] @@ -40,7 +41,6 @@ set tfile [open $towho r] gets $tfile person; append rspecs (to $person) close $tfile -exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); exec sqlite $logfile INSERT INTO application VALUES('$date','$spec','$person','$first'); } putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Mon May 14 22:37:22 2007 New Revision: 8534 Modified: toys/stbr/stbr.tcl Log: - fix last change Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Mon May 14 22:37:22 2007 @@ -30,10 +30,10 @@ if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} -exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); -foreach spec $specs { set time [clock seconds] set date [clock format $time -format %d.%m.%Y %H:%M:%S] +exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); +foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} if {([cvs $spec] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) in PLD's repository.; return 0} lappend rspecs $spec ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue May 15 04:27:55 2007 New Revision: 8539 Modified: toys/stbr/stbr.tcl Log: - add branch option - version 0.4 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue May 15 04:27:55 2007 @@ -7,10 +7,11 @@ set cntr 0 set towho ./scripts/sent.txt set cvsroot :pserver:[EMAIL PROTECTED]:/cvsroot +set usage Usage: !stbr th-{ready|test} spec1\[:BRANCH\] spec2\[:BRANCH\] ... -proc cvs { spec } { +proc cvs {spec branch} { global cvsroot - if {[catch {exec cvs -d $cvsroot log SPECS/$spec} results]} { + if {[catch {exec cvs -d $cvsroot log -r$branch SPECS/$spec} results]} { return 0 } return 1 @@ -21,22 +22,23 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile towho +global file back cntr logfile towho usage putcmdlog #$hand# Noticed Send To Build Request Mail command; set first [lindex $arg 0] set second [lindex $arg 1] set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs -if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} -if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} +if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: $usage; return 0} +if {([string length $second]2)} {putserv privmsg $chan :$nick: $usage; return 0} if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set time [clock seconds] set date [clock format $time -format %d.%m.%Y %H:%M:%S] exec sqlite $logfile INSERT INTO stbr VALUES('$date','$nick'); foreach spec $specs { +if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} -if {([cvs $spec] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) in PLD's repository.; return 0} -lappend rspecs $spec +if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} +lappend rspecs $spec; append rspecs :$branch if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] gets $tfile person; append rspecs (to $person) @@ -47,4 +49,4 @@ if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.3 by shadzik loaded. +putlog Send To Builder Request TCL v0.4 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue May 15 04:49:24 2007 New Revision: 8540 Modified: toys/stbr/stbr.tcl Log: - don't log sender if spec doesn't exist at given branch or at all Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue May 15 04:49:24 2007 @@ -37,7 +37,7 @@ foreach spec $specs { if {([string match *:* $spec])} {set splited [split $spec :];set spec [lindex $splited 0]; set branch [lindex $splited 1]} {set branch HEAD} if {!([string match *.spec $spec])} { append spec .spec} -if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; return 0} +if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; exec sqlite $logfile delete from stbr where sender='$nick';; return 0} lappend rspecs $spec; append rspecs :$branch if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Tue May 15 05:04:13 2007 New Revision: 8541 Modified: toys/stbr/stbr.tcl Log: - pass branch to cvslog.sh Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Tue May 15 05:04:13 2007 @@ -39,7 +39,7 @@ if {!([string match *.spec $spec])} { append spec .spec} if {([cvs $spec $branch] == 0)} {putserv privmsg $chan :$nick: There is no such spec ($spec) on branch $branch in PLD's repository.; exec sqlite $logfile delete from stbr where sender='$nick';; return 0} lappend rspecs $spec; append rspecs :$branch -if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} +if {[exec $file $nick $first $spec $branch]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] gets $tfile person; append rspecs (to $person) close $tfile ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 18:01:55 2007 New Revision: 8517 Modified: toys/stbr/stbr.tcl Log: - show to which developer a reqest was sent Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 18:01:55 2007 @@ -5,13 +5,14 @@ set file ./scripts/cvslog.sh set back set cntr 0 +set towho ./scripts/sent.txt bind pub * !stbr pub:stbr bind pub * stbr: pub:stbr bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file back cntr logfile +global file back cntr logfile towho putcmdlog #$hand# Noticed Send To Build Request Mail command; if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set first [lindex $arg 0] @@ -24,14 +25,17 @@ if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec if {[exec $file $nick $first $spec $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} +set tfile [open $towho r] +gets $tfile person; append rspecs (to $person) +close $tfile } set lfile [open $logfile a] set time [clock seconds] -set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log ; +set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log br; puts $lfile $log close $lfile putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} } -putlog Send To Builder Request TCL v0.2 by shadzik loaded. +putlog Send To Builder Request TCL v0.3 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 18:31:44 2007 New Revision: 8519 Modified: toys/stbr/stbr.tcl Log: - better without at end of command Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 18:31:44 2007 @@ -24,7 +24,7 @@ foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec -if {[exec $file $nick $first $spec $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} +if {[exec $file $nick $first $spec]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} set tfile [open $towho r] gets $tfile person; append rspecs (to $person) close $tfile ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 03:16:54 2007 New Revision: 8506 Modified: toys/stbr/stbr.tcl Log: - english error message Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 03:16:54 2007 @@ -24,7 +24,7 @@ if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec } -if {[exec $file $nick $first $rspecs $back]==0} {putserv privmsg $chan :$nick: Blad, STBR nie zostal wyslany; return 1} +if {[exec $file $nick $first $rspecs $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail; return 1} putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs.; return 1} putlog Send To Builder Request TCL v0.1 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 04:01:14 2007 New Revision: 8507 Modified: toys/stbr/stbr.tcl Log: - add logging functionality - version 0.2 Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 04:01:14 2007 @@ -25,6 +25,11 @@ lappend rspecs $spec } if {[exec $file $nick $first $rspecs $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail; return 1} +set lfile [open $logfile a] +set time [clock seconds] +set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log ; +puts $lfile $log +close $lfile putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs.; return 1} -putlog Send To Builder Request TCL v0.1 by shadzik loaded. +putlog Send To Builder Request TCL v0.2 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 04:02:18 2007 New Revision: 8508 Modified: toys/stbr/stbr.tcl Log: - shortest spec is actually two characters long not three (ex. pl.spec) Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 04:02:18 2007 @@ -19,7 +19,7 @@ set specs ; append specs $second; append specs ; append specs [lrange $arg 2 end] set rspecs if {!([string match th-ready $first] || [string match th-test $first])} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} -if {([string length $second]=2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} +if {([string length $second]2)} {putserv privmsg $chan :$nick: Usage: !stbr th-{ready|test} spec1 spec2 ...; return 0} foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 07:00:44 2007 New Revision: 8514 Modified: toys/stbr/stbr.tcl Log: - remove unneeded global variable - execute cvslog.sh for each spec that was send through !stbr Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 07:00:44 2007 @@ -11,7 +11,7 @@ bind pub * stbr, pub:stbr proc pub:stbr {nick host hand chan arg} { -global file key back cntr logfile +global file back cntr logfile putcmdlog #$hand# Noticed Send To Build Request Mail command; if {$cntr1} {incr cntr} {utimer 30 set cntr 0; putserv privmsg $chan :$nick: I reached my STBR time limit (30sec). Please try later.; return 0} set first [lindex $arg 0] @@ -23,8 +23,8 @@ foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec +if {[exec $file $nick $first $spec $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mai; return 1} } -if {[exec $file $nick $first $rspecs $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail; return 1} set lfile [open $logfile a] set time [clock seconds] set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log ; ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 07:11:50 2007 New Revision: 8515 Modified: toys/stbr/stbr.tcl Log: - more informative error message Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 07:11:50 2007 @@ -23,7 +23,7 @@ foreach spec $specs { if {!([string match *.spec $spec])} { append spec .spec} lappend rspecs $spec -if {[exec $file $nick $first $spec $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mai; return 1} +if {[exec $file $nick $first $spec $back]==0} {putserv privmsg $chan :$nick: An error occured. Couldn't send STBR Mail for $spec.; return 1} } set lfile [open $logfile a] set time [clock seconds] ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
SVN: toys/stbr/stbr.tcl
Author: shadzik Date: Sun May 13 07:23:29 2007 New Revision: 8516 Modified: toys/stbr/stbr.tcl Log: - fix time limit, now works properly Modified: toys/stbr/stbr.tcl == --- toys/stbr/stbr.tcl (original) +++ toys/stbr/stbr.tcl Sun May 13 07:23:29 2007 @@ -30,6 +30,8 @@ set log [clock format $time -format %d.%m.%Y %H:%M]; lappend log $nick requested build for $rspecs to $first; append log ; puts $lfile $log close $lfile -putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs.; return 1} +putserv privmsg $chan :$nick: Sent STBR Mail to $first for $rspecs. +if {$cntr1} {incr cntr} {utimer 30 set cntr 0; return 1} +} putlog Send To Builder Request TCL v0.2 by shadzik loaded. ___ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit