<commit_before>#!/bin/bash

#include config
source "../git-for-SAE/config"

sae_version=$1
svn_repo_url="https://svn.sinaapp.com/$svn_repo_name"
svn_dir_name="$svn_repo_name/$1"
init=$2

if [ $init == false ]
then
	mkdir .svn
	cd .svn
	svn checkout $svn_repo_url
	cd ..
fi

echo "remove all previous files..."
cd ".svn/$svn_dir_name"
mv config.yaml ../config.yaml
rm -rf *
mv ../config.yaml config.yaml
svn st | awk '{print $2}' | xargs svn delete
svn commit -m "clean"
cd ../../..

echo "copy git repo to SAE-svn..."
mv -f .svn ../.svn
cp -rf * "../.svn/$svn_dir_name"<commit_msg>自动判断.svn是否存在<commit_after>#!/bin/bash

#include config
source "../git-for-SAE/config"

sae_version=$1
svn_repo_url="https://svn.sinaapp.com/$svn_repo_name"
svn_dir_name="$svn_repo_name/$1"

#if [.svn] doesn't exist, checkout svn project
if [ ! -e ".svn" ]; then
	echo "initializing: checkout svn project..."
	mkdir .svn
	cd .svn
	svn checkout $svn_repo_url
	cd ..
fi

echo "remove all previous files..."
cd ".svn/$svn_dir_name"
mv config.yaml ../config.yaml
rm -rf *
mv ../config.yaml config.yaml
svn st | awk '{print $2}' | xargs svn delete
svn commit -m "clean"
cd ../../..

echo "copy git repo to SAE-svn..."
mv -f .svn ../.svn
cp -rf * "../.svn/$svn_dir_name"
{'fraction_non_alphanumeric': 0.18488745980707397, 'fraction_numerical': 0.005627009646302251, 'mean_word_length': 3.1778523489932886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '428075', 'n_tokens_mistral': 542, 'n_tokens_neox': 525, 'n_words': 136}