<commit_before>#!/bin/sh
#
# CIA bot client script for BitKeeper repositories, delivering via email
#   -- <NAME> <<EMAIL>>
#
# Based on ciabot_svn.sh by <NAME> <<EMAIL>>
#
# See http://cia.navi.cx
# for more information on what the CIA bot is and how it works.
#
############# There are some parameters for this script that you can customize:

# Project information
project_name="openembedded"
return_address="<EMAIL>"

# System
sendmail_command="/usr/sbin/sendmail -t"

############# Below this line you shouldn't have to change anything

# Script arguments
REV="$1"

# The email address CIA lives at
cia_address="<EMAIL>"

author=`echo $BK_USER | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
module=`basename $BKD_ROOT | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
tag=`bk changes -r"$REV" -d":TAG:" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
for file in `bk changes -n -v -r"$REV" -d"\\\$unless(:GFILE:=ChangeSet){:GFILE:}" | sort -u | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`; do
    files="$files<file>$file</file>"
done

# Send an email with the final XML message
(cat <<EOF
From: $return_address
To: $cia_address
Content-type: text/xml
Subject: DeliverXML

<message>
    <generator>
        <name>BitKeeper CIA Bot client shell script</name>
        <version>1.0</version>
    </generator>
    <source>
        <project>$project_name</project>
        <module>$module</module>
        <branch>$tag</branch>
    </source>
    <body>
        <commit>
            <revision>$REV</revision>
            <author>$author</author>
            <files>$files</files>
EOF
echo "            <log>"
bk changes -r"$REV" -d"\$if(:C:){\$each(:C:){:C:\\\\n}}" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
echo "            </log>"
cat <<EOF
        </commit>
    </body>
</message>
EOF
) | tee ~/sendmailcmd.$$ | $sendmail_command

### The End ###<commit_msg>ciabot_bk.sh:   Correct multiline ChangeSet comment handling for CIA notifications.   A second line for verification. :)<commit_after>#!/bin/sh
#
# CIA bot client script for BitKeeper repositories, delivering via email
#   -- <NAME> <<EMAIL>>
#
# Based on ciabot_svn.sh by <NAME> <<EMAIL>>
#
# See http://cia.navi.cx
# for more information on what the CIA bot is and how it works.
#
############# There are some parameters for this script that you can customize:

# Project information
project_name="openembedded"
return_address="<EMAIL>"

# System
sendmail_command="/usr/sbin/sendmail -t"

############# Below this line you shouldn't have to change anything

# Script arguments
REV="$1"

# The email address CIA lives at
cia_address="<EMAIL>"

author=`echo $BK_USER | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
module=`basename $BKD_ROOT | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
tag=`bk changes -r"$REV" -d":TAG:" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`
for file in `bk changes -n -v -r"$REV" -d"\\\$unless(:GFILE:=ChangeSet){:GFILE:}" | sort -u | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'`; do
    files="$files<file>$file</file>"
done

sendmail_command=cat
# Send an email with the final XML message
(cat <<EOF
From: $return_address
To: $cia_address
Content-type: text/xml
Subject: DeliverXML

<message>
    <generator>
        <name>BitKeeper CIA Bot client shell script</name>
        <version>1.0</version>
    </generator>
    <source>
        <project>$project_name</project>
        <module>$module</module>
        <branch>$tag</branch>
    </source>
    <body>
        <commit>
            <revision>$REV</revision>
            <author>$author</author>
            <files>$files</files>
EOF
echo "            <log>"
bk changes -r"$REV" -d'$if(:C:){$each(:C:){:C:\\\n}}' | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g'
echo "            </log>"
cat <<EOF
        </commit>
    </body>
</message>
EOF
) | $sendmail_command

### The End ###
{'fraction_non_alphanumeric': 0.2217573221757322, 'fraction_numerical': 0.0015690376569037657, 'mean_word_length': 3.090909090909091, 'pattern_counts': {'":': 2, '<': 97, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5300783', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1406, 'n_words': 335}