Update the BK CIA notification bits to not send notification about empty merge Change...
authorChris Larson <clarson@kergoth.com>
Mon, 19 Jan 2004 18:32:23 +0000 (18:32 +0000)
committerChris Larson <clarson@kergoth.com>
Mon, 19 Jan 2004 18:32:23 +0000 (18:32 +0000)
BKrev: 400c22b74UhNic17G2kQANgHxyPE4A

BitKeeper/triggers/post-outgoing.ciabot

index 3523e93..4f2ec0b 100644 (file)
@@ -25,14 +25,21 @@ check_sanity || exit 0
 # Convert numbers from the cset list into something useful
 nums=
 for s in `cat $BK_CSETLIST`; do
-    nums="`bk prs -h -d\"\\\$if(:DS: -eq $s){:REV:}\" ChangeSet` $nums"
+    # translate cset serial to cset #
+    n=`bk prs -h -d"\\$if(:DS: -eq $s){:REV:}" ChangeSet`
+    # dont send notifications about empty ChangeSets
+    if test -z `bk prs -h -r"$n" -d'$if(:LI: -eq 0){$if(:LD: -eq 0){:REV:}}' ChangeSet`; then
+       nums="$n $nums"
+    fi
 done
 
-# Send logs to CIA
-echo "Sending notification to CIA irc bot (cia.navi.cx)."
-(
-    for n in $nums; do
-        $BK_ROOT/BitKeeper/triggers/ciabot_bk.sh $n
-    done
-) &
+# Send notifications to CIA
+if test -n "$nums"; then
+    echo "Sending notification to CIA irc bot (cia.navi.cx)."
+    (
+        for n in $nums; do
+            $BK_ROOT/BitKeeper/triggers/ciabot_bk.sh $n
+        done
+    ) &
+fi
 exit 0