Attempt to fix CIA trigger on recent bk versions.
authorChris Larson <clarson@kergoth.com>
Thu, 27 May 2004 19:13:36 +0000 (19:13 +0000)
committerChris Larson <clarson@kergoth.com>
Thu, 27 May 2004 19:13:36 +0000 (19:13 +0000)
BKrev: 40b63de0GFFIGjG-Yf0cB6jF69Gkiw

BitKeeper/triggers/post-outgoing.ciabot
test [deleted file]

index 8a71327..3fead58 100644 (file)
@@ -42,16 +42,22 @@ check_sanity () {
 # Check sanity - do we need to send anything?
 check_sanity || exit 0
 
-# Convert numbers from the cset list into something useful
-nums=
-for s in `cat $BK_CSETLIST`; do
-    # 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
+if (grep -q ':ChangeSet:' $BK_CSETLIST); then
+    # new, correct csets-out format
+    nums = `bk changes -d:REV: - < $BK_CSETLIST`
+else
+
+    # Convert numbers from the cset list into something useful
+    nums=
+    for s in `cat $BK_CSETLIST`; do
+        # 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
+fi
 
 # Send notifications to CIA
 if test -n "$nums"; then
diff --git a/test b/test
deleted file mode 100644 (file)
index e69de29..0000000