SVN: toys/stbr/stbr.tcl
shadzik
shadzik at pld-linux.org
Sat Oct 31 03:49:48 CET 2009
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 shadzik at 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."
More information about the pld-cvs-commit
mailing list