<commit_before><#############################################################################
#  RestoreClangMainline.ps1
#  Note: Clang Auto Build Environment
#  Date:2016.01.02
#  Author:Force <<EMAIL>>
##############################################################################>
param(
    [Switch]$LLDB
)

$SelfFolder=$PSScriptRoot;
. "$SelfFolder/RepositoryCheckout.ps1"

$ClangbuilderRoot=Split-Path -Parent $SelfFolder
$BuildFolder="$ClangbuilderRoot/out"
$MainlineFolder="$BuildFolder/mainline"
Write-Output "Mainline Source Folder: $MainlineFolder"
$LLVMRepositoriesRoot="http://llvm.org/svn/llvm-project"

IF(!(Test-Path $BuildFolder)){
    mkdir -Force $BuildFolder
}
Push-Location $PWD
Set-Location $BuildFolder

Restore-Repository -URL "$LLVMRepositoriesRoot/llvm/trunk" -Folder "mainline"
if(!(Test-Path "$BuildFolder/mainline/tools")){
    Write-Error "Checkout LLVM Failed"
    Exit
}

Set-Location "$BuildFolder/mainline/tools"
Restore-Repository -URL "$LLVMRepositoriesRoot/cfe/trunk" -Folder "clang"
Restore-Repository -URL "$LLVMRepositoriesRoot/lld/trunk" -Folder "lld"

IF($LLDB){
    Restore-Repository -URL "$LLVMRepositoriesRoot/lldb/trunk" -Folder "lldb"
}else{
    if(Test-Path "$BuildFolder/mainline/tools/lldb"){
        Remove-Item -Force -Recurse "$BuildFolder/mainline/tools/lldb"
    }
}

if(!(Test-Path "$BuildFolder/mainline/tools/clang/tools")){
    Write-Error "Checkout Clang Failed"
    Exit
}

Set-Location "$BuildFolder/mainline/tools/clang/tools"
Restore-Repository -URL "$LLVMRepositoriesRoot/clang-tools-extra/trunk" -Folder "extra"
Set-Location "$BuildFolder/mainline/projects"
Restore-Repository -URL "$LLVMRepositoriesRoot/compiler-rt/trunk" -Folder "compiler-rt"

Pop-Location
<commit_msg>Update RestoreClangMainline.ps1<commit_after><#############################################################################
#  RestoreClangMainline.ps1
#  Note: Clang Auto Build Environment
#  Date:2016.01.02
#  Author:Force <<EMAIL>>
##############################################################################>
param(
    [Switch]$LLDB
)
. "$PSScriptRoot/RepositoryCheckout.ps1"

$ClangbuilderRoot=Split-Path -Parent $PSScriptRoot
$BuildFolder="$ClangbuilderRoot\out"
$MainlineFolder="$BuildFolder\mainline"
Write-Output "Mainline Source Folder: $MainlineFolder"
$LLVMRepositoriesRoot="http://llvm.org/svn/llvm-project"

IF(!(Test-Path $BuildFolder)){
    mkdir -Force $BuildFolder
}
Push-Location $PWD
Set-Location $BuildFolder

Restore-Repository -URL "$LLVMRepositoriesRoot/llvm/trunk" -Folder "mainline"
if(!(Test-Path "$BuildFolder/mainline/tools")){
    Write-Error "Checkout LLVM Failed"
    Exit
}

Set-Location "$BuildFolder/mainline/tools"
Restore-Repository -URL "$LLVMRepositoriesRoot/cfe/trunk" -Folder "clang"
Restore-Repository -URL "$LLVMRepositoriesRoot/lld/trunk" -Folder "lld"

IF($LLDB){
    Restore-Repository -URL "$LLVMRepositoriesRoot/lldb/trunk" -Folder "lldb"
}else{
    if(Test-Path "$BuildFolder/mainline/tools/lldb"){
        Remove-Item -Force -Recurse "$BuildFolder/mainline/tools/lldb"
    }
}

if(!(Test-Path "$BuildFolder/mainline/tools/clang/tools")){
    Write-Error "Checkout Clang Failed"
    Exit
}

Set-Location "$BuildFolder/mainline/tools/clang/tools"
Restore-Repository -URL "$LLVMRepositoriesRoot/clang-tools-extra/trunk" -Folder "extra"
Set-Location "$BuildFolder/mainline/projects"
Restore-Repository -URL "$LLVMRepositoriesRoot/compiler-rt/trunk" -Folder "compiler-rt"

Pop-Location

{'fraction_non_alphanumeric': 0.2196315486470927, 'fraction_numerical': 0.006044905008635579, 'mean_word_length': 5.963927855711423, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2106253', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1143, 'n_words': 186}