<commit_before>BOAR=$1
REPO=$2
CLONE=`mktemp -u EXCERCISE_CLONE_XXXX`

prefix="Repo excerciser:"
REPO_PATH=$REPO $BOAR verify || { echo $prefix "Verify failed"; exit 1; }
REPO_PATH=$REPO $BOAR ls || { echo $prefix "Ls failed"; exit 1; }
REPO_PATH=$REPO $BOAR list -m || { echo $prefix "List -m failed"; exit 1; }
REPO_PATH=$REPO $BOAR list --dump || { echo $prefix "List --dump failed"; exit 1; }
$BOAR clone $REPO $CLONE || { echo $prefix "Clone failed (Clone path: $CLONE)"; exit 1; }
$BOAR verify --repo=$CLONE || { echo $prefix "Clone verify failed (Clone path: $CLONE)"; exit 1; }
rm -r $CLONE || { echo $prefix "Couldn't remove clone (Clone path: $CLONE)"; exit 1; }<commit_msg>Testing checkout of every revision during excercise<commit_after>BOAR=$1
REPO=$2
CLONE=`mktemp -u EXCERCISE_CLONE_XXXX`

prefix="Repo excerciser:"
REPO_PATH=$REPO $BOAR verify || { echo $prefix "Verify failed"; exit 1; }
REPO_PATH=$REPO $BOAR ls || { echo $prefix "Ls failed"; exit 1; }
REPO_PATH=$REPO $BOAR list -m || { echo $prefix "List -m failed"; exit 1; }
REPO_PATH=$REPO $BOAR list --dump || { echo $prefix "List --dump failed"; exit 1; }

SESSIONS=$(REPO_PATH=$REPO $BOAR ls |grep -v Finished| sed -e 's/ (.*)$//g')
for session in $SESSIONS; do
    # Simple checkout of latest revision
    CO_NAME=`mktemp -u EXCERCISE_CO_XXXX`
    REPO_PATH=$REPO $BOAR co $session "$CO_NAME" || { echo $prefix "Co of session '$session' failed"; exit 1; }
    rm -r "$CO_NAME" || exit 1

    # Check out every revision of this session explicitly
    REVISIONS=$($BOAR --repo=$REPO list $session |grep "Revision id"|cut -d ' ' -f 3)
    for revision in $REVISIONS; do
	CO_NAME=`mktemp -u EXCERCISE_CO_XXXX`
	REPO_PATH=$REPO $BOAR co -r $revision $session "$CO_NAME" || { 
	    echo $prefix "Co of session '$session' revision $revision failed"; exit 1; }
	rm -r "$CO_NAME" || exit 1    
    done
done
exit 1

$BOAR clone $REPO $CLONE || { echo $prefix "Clone failed (Clone path: $CLONE)"; exit 1; }
$BOAR verify --repo=$CLONE || { echo $prefix "Clone verify failed (Clone path: $CLONE)"; exit 1; }
rm -r $CLONE || { echo $prefix "Couldn't remove clone (Clone path: $CLONE)"; exit 1; }
{'fraction_non_alphanumeric': 0.15933302454840204, 'fraction_numerical': 0.0111162575266327, 'mean_word_length': 4.255474452554744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5297138', 'n_tokens_mistral': 823, 'n_tokens_neox': 792, 'n_words': 273}