Author: dreimer Date: Thu Sep 3 15:44:45 2009 New Revision: 42984
URL: http://svn.reactos.org/svn/reactos?rev=42984&view=rev Log: Added rosapps and rostests support to ssvn. Request by JaixBly
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershel... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] Thu Sep 3 15:44:45 2009 @@ -190,11 +190,13 @@ " Creates, updates or cleans up your ReactOS source tree or shows the revision" " number of the local and online trees." "" - " update - Updates to HEAD revision or to a specific one when the second" - " parameter specifies one." - " create - Creates a new ReactOS source tree." - " cleanup - Cleans up and fixes errors in the source tree." - " status - Show the current local and online revision numbers." + " update - Updates to HEAD revision or to a specific one when the second" + " parameter specifies one." + " create - Creates a new ReactOS source tree." + " rosapps - Creates a new ReactOS RosApps source tree." + " rostests - Creates a new ReactOS RosTests source tree." + " cleanup - Cleans up and fixes errors in the source tree." + " status - Show the current local and online revision numbers." } } elseif ("$args" -eq "options") { if (Test-Path "$_ROSBE_BASEDIR\options.ps1") {
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershel... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] Thu Sep 3 15:44:45 2009 @@ -29,8 +29,28 @@ if ("$($arg[1])" -ne "") { $temparg = $arg[1] IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update -r $temparg" + if (Test-Path "modules\rosapps.") { + Set-Location modules\rosapps + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update -r $temparg" + Set-Location "$_ROSBE_ROSSOURCEDIR" + } + if (Test-Path "modules\rostests.") { + Set-Location modules\rostests + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update -r $temparg" + Set-Location "$_ROSBE_ROSSOURCEDIR" + } } else { IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update" + if (Test-Path "modules\rosapps.") { + Set-Location modules\rosapps + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update" + Set-Location "$_ROSBE_ROSSOURCEDIR" + } + if (Test-Path "modules\rostests.") { + Set-Location modules\rostests + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update" + Set-Location "$_ROSBE_ROSSOURCEDIR" + } } "Do you want to see the changelog?" $CL = Read-Host "Please enter 'yes' or 'no': " @@ -81,6 +101,46 @@ } }
+# Check if the folder is empty. If not, output an error. +elseif ("$($args[0])" -eq "rosapps") { + $host.ui.RawUI.WindowTitle = "SVN RosApps Creating..." + if (Test-Path "modules\rosapps.svn.") { + "ERROR: Folder already contains a RosApps repository." + } else { + if (!(Test-Path "modules\rosapps.")) { + new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rosapps -type directory + } + Set-Location modules\rosapps + $dir = get-childitem + if ("$dir" -eq "") { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout svn://svn.reactos.org/reactos/trunk/rosapps ." + } else { + "ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED" + } + } + Set-Location "$_ROSBE_ROSSOURCEDIR" +} + +# Check if the folder is empty. If not, output an error. +elseif ("$($args[0])" -eq "rostests") { + $host.ui.RawUI.WindowTitle = "SVN RosTests Creating..." + if (Test-Path "modules\rostests.svn.") { + "ERROR: Folder already contains a RosTests repository." + } else { + if (!(Test-Path "modules\rostests.")) { + new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rostests -type directory + } + Set-Location modules\rostests + $dir = get-childitem + if ("$dir" -eq "") { + IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout svn://svn.reactos.org/reactos/trunk/rostests ." + } else { + "ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED" + } + } + Set-Location "$_ROSBE_ROSSOURCEDIR" +} + # Output the revision of the local and online trees and tell the user if # its up to date or not. elseif ("$($args[0])" -eq "status") {
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Help... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Thu Sep 3 15:44:45 2009 @@ -196,11 +196,13 @@ echo Creates, updates or cleans up your ReactOS source tree or shows the revision echo number of the local and online trees. echo. - echo update - Updates to HEAD revision or to a specific one when the second - echo parameter specifies one. - echo create - Creates a new ReactOS source tree. - echo cleanup - Cleans up and fixes errors in the source tree. - echo status - Show the current local and online revision numbers. + echo update - Updates to HEAD revision or to a specific one when the second + echo parameter specifies one. + echo create - Creates a new ReactOS source tree. + echo rosapps - Creates a new ReactOS RosApps source tree. + echo rostests - Creates a new ReactOS RosTests source tree. + echo cleanup - Cleans up and fixes errors in the source tree. + echo status - Show the current local and online revision numbers. ) ) else if /i "%1" == "options" ( if exist "%_ROSBE_BASEDIR%\options.cmd" (
Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSVN... ============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Thu Sep 3 15:44:45 2009 @@ -51,7 +51,48 @@ ) else ( echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED ) + goto :EOC +)
+:: Check if the folder is empty. If not, output an error. +if /i "%1" == "rosapps" ( + title SVN RosApps Creating... + if exist "modules\rosapps.svn." ( + echo ERROR: Folder already contains a RosApps repository. + goto :EOC + ) + if not exist "modules\rosapps." ( + md modules\rosapps + ) + cd modules\rosapps + dir /b 2>nul | findstr "." >nul + if errorlevel 1 ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout svn://svn.reactos.org/reactos/trunk/rosapps . + ) else ( + echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED + ) + cd "%_ROSBE_ROSSOURCEDIR%" + goto :EOC +) + +:: Check if the folder is empty. If not, output an error. +if /i "%1" == "rostests" ( + title SVN RosTests Creating... + if exist "modules\rostests.svn." ( + echo ERROR: Folder already contains a RosTests repository. + goto :EOC + ) + if not exist "modules\rostests." ( + md modules\rostests + ) + cd modules\rostests + dir /b 2>nul | findstr "." >nul + if errorlevel 1 ( + "%_ROSBE_BASEDIR%\Tools\svn.exe" checkout svn://svn.reactos.org/reactos/trunk/rostests . + ) else ( + echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED + ) + cd "%_ROSBE_ROSSOURCEDIR%" goto :EOC )
@@ -86,8 +127,28 @@ if "!_ROSBE_SSVN_JOB!" == "update" ( if not "%2" == "" ( "%_ROSBE_BASEDIR%\Tools\svn.exe" update -r %2 + if exist "modules\rosapps." ( + cd modules\rosapps + "%_ROSBE_BASEDIR%\Tools\svn.exe" update -r %2 + cd "%_ROSBE_ROSSOURCEDIR%" + ) + if exist "modules\rostests." ( + cd modules\rostests + "%_ROSBE_BASEDIR%\Tools\svn.exe" update -r %2 + cd "%_ROSBE_ROSSOURCEDIR%" + ) ) else ( "%_ROSBE_BASEDIR%\Tools\svn.exe" update + if exist "modules\rosapps." ( + cd modules\rosapps + "%_ROSBE_BASEDIR%\Tools\svn.exe" update + cd "%_ROSBE_ROSSOURCEDIR%" + ) + if exist "modules\rostests." ( + cd modules\rostests + "%_ROSBE_BASEDIR%\Tools\svn.exe" update + cd "%_ROSBE_ROSSOURCEDIR%" + ) ) ) echo Do you want to see the changelog?