<commit_before>::$Id$
@echo off
:: Batch script for extracting subversion revision number and writing to specified header define file in specified folder.
:: If folder is missing no file is written
:: Author: <NAME> <EMAIL>
:: Date:   2011-10-26
:: For use in Hopsan, requires TortoiseSVN installed

setlocal
:: TODO: Add more potential paths here
set PATH=%PATH%;"C:\Program Files\TortoiseSVN\bin"
set filename="svnrevnum.h"
set foldername="include"

:: -------------------------------------------
set version=""
set versionS=""
:: Find the revison number, the fith token from the line
for /f "tokens=5" %%i in ('SubWCRev .^|find "Last committed at revision"') do set version=%%i 
:: Remove trailing space
for /f "tokens=1 delims=/ " %%a in ("%version%") do set versionS=%%a

:: If the include folder exists write the svnrevnum.h file to that folder
if exist %foldername% (
  call :writeFile "%foldername%/%filename%" %versionS%
)

:: Determine what to report and what exit code to give
:: Exit with code 0 (sucess) or 1 (failed)
if %versionS%=="" (
  echo "Revision information not found"
  exit /b 1
) else (
  echo %versionS%
  exit /b 0
)


:writeFile
  echo //This file has been automatically generated by getSvnRevision.bat > %~1<commit_msg>Make sure we dont have spaces in the error info, As that could be a problem with define, if return code not accepted in qmake<commit_after>::$Id$
@echo off
:: Batch script for extracting subversion revision number and writing to specified header define file in specified folder.
:: If folder is missing no file is written
:: Author: <NAME> <EMAIL>
:: Date:   2011-10-26
:: For use in Hopsan, requires TortoiseSVN installed

setlocal
:: TODO: Add more potential paths here
set PATH=%PATH%;"C:\Program Files\TortoiseSVN\bin"
set filename="svnrevnum.h"
set foldername="include"

:: -------------------------------------------
set version=""
set versionS=""
:: Find the revison number, the fith token from the line
for /f "tokens=5" %%i in ('SubWCRev .^|find "Last committed at revision"') do set version=%%i 
:: Remove trailing space
for /f "tokens=1 delims=/ " %%a in ("%version%") do set versionS=%%a

:: If the include folder exists write the svnrevnum.h file to that folder
if exist %foldername% (
  call :writeFile "%foldername%/%filename%" %versionS%
)

:: Determine what to report and what exit code to give
:: Exit with code 0 (sucess) or 1 (failed)
if %versionS%=="" (
  echo "RevisionInformationNotFound"
  exit /b 1
) else (
  echo %versionS%
  exit /b 0
)


:writeFile
  echo //This file has been automatically generated by getSvnRevision.bat > %~1
{'fraction_non_alphanumeric': 0.14433781190019193, 'fraction_numerical': 0.011516314779270634, 'mean_word_length': 3.7904411764705883, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1331488', 'n_tokens_mistral': 815, 'n_tokens_neox': 772, 'n_words': 338}