Index: RosBE/RosBE-Windows/Root/sSVN.cmd =================================================================== --- RosBE/RosBE-Windows/Root/sSVN.cmd (revision 47340) +++ RosBE/RosBE-Windows/Root/sSVN.cmd (working copy) @@ -14,6 +14,17 @@ setlocal enabledelayedexpansion +:: Set branch to trunk if one is not already set +if not defined ROS_BRANCH ( + set _ROS_BRANCH=trunk +) else ( + set _ROS_BRANCH=branches/%ROS_BRANCH% +) +:: AMD64 architecture overrides branch that was previously set +if "%ROS_ARCH%" == "amd64" ( + set _ROS_BRANCH=branches/ros-amd64-bringup +) + set _ROSBE_SSVNSOURCEDIR=%CD% :: Receive the first parameter and decide what to do. @@ -50,17 +61,9 @@ dir /b 2>nul | findstr "." >nul if errorlevel 1 ( if not "%2" == "" ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos . - ) else ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/trunk/reactos . - ) + svn.exe checkout -r %2 http://svn.reactos.org/reactos/%_ROS_BRANCH%/reactos . ) else ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos . - ) else ( - svn.exe checkout http://svn.reactos.org/reactos/trunk/reactos . - ) + svn.exe checkout http://svn.reactos.org/reactos/%_ROS_BRANCH%/reactos . ) ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED @@ -83,11 +86,7 @@ cd "modules\rosapps" dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps . - ) else ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/trunk/rosapps . - ) + svn.exe checkout -r %2 http://svn.reactos.org/reactos/%_ROS_BRANCH%/rosapps . ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -105,11 +104,7 @@ cd "modules\rosapps" dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps . - ) else ( - svn.exe checkout http://svn.reactos.org/reactos/trunk/rosapps . - ) + svn.exe checkout http://svn.reactos.org/reactos/%_ROS_BRANCH%/rosapps . ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -134,11 +129,7 @@ cd "modules\rostests" dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests . - ) else ( - svn.exe checkout -r %2 http://svn.reactos.org/reactos/trunk/rostests . - ) + svn.exe checkout -r %2 http://svn.reactos.org/reactos/%_ROS_BRANCH%/rostests . ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -156,11 +147,7 @@ cd "modules\rostests" dir /b 2>nul | findstr "." >nul if errorlevel 1 ( - if "%ROS_ARCH%" == "amd64" ( - svn.exe checkout http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests . - ) else ( - svn.exe checkout http://svn.reactos.org/reactos/trunk/rostests . - ) + svn.exe checkout http://svn.reactos.org/reactos/%_ROS_BRANCH/rostests . ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) @@ -186,12 +173,8 @@ goto EOC :UP - for /f "usebackq tokens=2" %%i in (`"svn.exe info | find "Revision:""`) do set OFFSVN=%%i - if "%ROS_ARCH%" == "amd64" ( - for /f "usebackq tokens=2" %%j in (`"svn.exe info http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos | find "Revision:""`) do set ONSVN=%%j - ) else ( - for /f "usebackq tokens=2" %%j in (`"svn.exe info http://svn.reactos.org/reactos/trunk/reactos | find "Revision:""`) do set ONSVN=%%j - ) + for /f "usebackq tokens=4" %%i in (`"svn.exe info | find "Last Changed Rev:""`) do set OFFSVN=%%i + for /f "usebackq tokens=4" %%j in (`"svn.exe info http://svn.reactos.org/reactos/%_ROS_BRANCH%/reactos | find "Last Changed Rev:""`) do set ONSVN=%%j echo Local Revision: !OFFSVN! echo Online HEAD Revision: !ONSVN!