<commit_before>@echo off
setlocal

if [%SHARED_WORKSPACE%]==[] (
    set SHARED_WORKSPACE=%WORKSPACE%\..\shared\%EXECUTOR_NUMBER%
)

call :forceCD "%SHARED_WORKSPACE%"
call :syncRepo pf-main
call :forceCD "%WORKSPACE%"
call :syncRepo SDKGenerator
pushd SDKGenerator\JenkinsConsoleUtility
nuget restore JenkinsConsoleUtility.sln
popd
call :syncRepo API_Specs
call :forcePushD sdks
call :syncRepo %SdkName%
popd

call :cleanArcPatches
call :applyArcPatch

pushd pf-main\Server
nuget restore Server.sln
popd

endlocal
exit %errorLevel%


rem USAGE: call :forcePushD <path>
:forcePushD
pushd %1
if %errorLevel% EQU 1 (
    mkdir %1
    pushd %1
)
goto :EOF

rem USAGE: call :forceCD <path>
:forceCD
cd %1
if %errorLevel% EQU 1 (<commit_msg>Fix pushd path<commit_after>@echo off
setlocal

if [%SHARED_WORKSPACE%]==[] (
    set SHARED_WORKSPACE=%WORKSPACE%\..\shared\%EXECUTOR_NUMBER%
)

call :forceCD "%SHARED_WORKSPACE%"
call :syncRepo pf-main
call :forceCD "%WORKSPACE%"
call :syncRepo SDKGenerator
pushd SDKGenerator\JenkinsConsoleUtility
nuget restore JenkinsConsoleUtility.sln
popd
call :syncRepo API_Specs
call :forcePushD sdks
call :syncRepo %SdkName%
popd

call :cleanArcPatches
call :applyArcPatch

pushd %SHARED_WORKSPACE%\pf-main\Server
nuget restore Server.sln
popd

endlocal
exit %errorLevel%


rem USAGE: call :forcePushD <path>
:forcePushD
pushd %1
if %errorLevel% EQU 1 (
    mkdir %1
    pushd %1
)
goto :EOF

rem USAGE: call :forceCD <path>
:forceCD
cd %1
if %errorLevel% EQU 1 (
{'fraction_non_alphanumeric': 0.09986595174262734, 'fraction_numerical': 0.00804289544235925, 'mean_word_length': 5.491304347826087, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '971961', 'n_tokens_mistral': 580, 'n_tokens_neox': 578, 'n_words': 158}