projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed shh to use different location for shh touchfile
[clearscm.git]
/
lib
/
Speak.pm
diff --git
a/lib/Speak.pm
b/lib/Speak.pm
index
c18c2f7
..
7003f20
100644
(file)
--- a/
lib/Speak.pm
+++ b/
lib/Speak.pm
@@
-103,11
+103,12
@@
Returns:
=cut
=cut
- if (-f "$FindBin::Bin/shh") {
+ if (-f "$FindBin::Bin/../data/shh") {
+ $msg .= ' [silent shh]';
if ($log) {
if ($log) {
- $log->msg(
"Not speaking because we were asked to be quiet - $msg"
);
+ $log->msg(
$msg
);
} else {
} else {
- verbose
"Not speaking because we were asked to be quiet - $msg"
;
+ verbose
$msg
;
} # if
return;
} # if
return;
@@
-123,10
+124,12
@@
Returns:
# backoff a little and try again.
my $attempts = 0;
my $maxretries = 3;
# backoff a little and try again.
my $attempts = 0;
my $maxretries = 3;
- my $backoff = 2;
my ($status, @output);
my ($status, @output);
+ # Log message to log file if $log was passed in.
+ $log->msg($msg) if $log;
+
while ($attempts++ < $maxretries) {
($status, @output) = Execute "/usr/local/bin/gt \"$msg\"";
while ($attempts++ < $maxretries) {
($status, @output) = Execute "/usr/local/bin/gt \"$msg\"";
@@
-139,9
+142,9
@@
Returns:
error $errmsg;
} # if
error $errmsg;
} # if
- sleep
$backoff++
;
+ sleep
int rand 10
;
} else {
} else {
- return;
# We said our piece...
+ return;
} # if
} # while
} # if
} # while