Author: dreimer
Date: Tue May 4 12:03:05 2010
New Revision: 47101
URL:
http://svn.reactos.org/svn/reactos?rev=47101&view=rev
Log:
Feature request by Olaf Siejka.
The sSVN parameters "rosapps" and "rostests" were originally made for
just creating rosapps / rostests repositories in the modules folder. Now it detects an
existant repository and just updates that one. If theres no repository or even no folder
for the repository it first generates it and continues. Additionally you can set the
revision you wanna checkout or update to.
"create" accepts a revision as second parameter now, too.
NOT FULLY TESTED YET.
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/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] Tue May 4 12:03:05
2010
@@ -232,8 +232,8 @@
" 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."
+ " rosapps - Creates / Updates a ReactOS RosApps source tree."
+ " rostests - Creates / Updates a ReactOS RosTests source tree."
" cleanup - Cleans up and fixes errors in the source tree."
" status - Show the current local and online revision numbers."
}
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] Tue May 4 12:03:05
2010
@@ -34,14 +34,14 @@
if ("$_BUILDBOT_SVNSKIPMAINTRUNK" -ne "1") {
IEX "& svn.exe update -r $temparg"
}
- if (Test-Path "modules\rosapps\.") {
- Set-Location modules\rosapps
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.") {
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
"Updating RosApps..."
IEX "& svn.exe update -r $temparg"
Set-Location "$_ROSBE_ROSSOURCEDIR"
}
- if (Test-Path "modules\rostests\.") {
- Set-Location modules\rostests
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.") {
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
"Updating RosTests..."
IEX "& svn.exe update -r $temparg"
Set-Location "$_ROSBE_ROSSOURCEDIR"
@@ -50,14 +50,14 @@
if ("$_BUILDBOT_SVNSKIPMAINTRUNK" -ne "1") {
IEX "& svn.exe update"
}
- if (Test-Path "modules\rosapps\.") {
- Set-Location modules\rosapps
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.") {
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
"Updating RosApps..."
IEX "& svn.exe update"
Set-Location "$_ROSBE_ROSSOURCEDIR"
}
- if (Test-Path "modules\rostests\.") {
- Set-Location modules\rostests
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.") {
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
"Updating RosTests..."
IEX "& svn.exe update"
Set-Location "$_ROSBE_ROSSOURCEDIR"
@@ -105,10 +105,18 @@
$null = (Remove-Item "$_ROSBE_LOGDIR" -recurse -force)
$dir = get-childitem
if ("$dir" -eq "") {
- if ("$ENV:ROS_ARCH" -eq "amd64") {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos ."
- } else {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/reactos ."
+ if ("$($args[1])" -ne "") {
+ if ("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe -r $($args[1]) checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos ."
+ } else {
+ IEX "& svn.exe -r $($args[1]) checkout
http://svn.reactos.org/reactos/trunk/reactos ."
+ }
+ } else {
+ if ("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/reactos ."
+ } else {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/reactos ."
+ }
}
} else {
"ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
@@ -118,23 +126,49 @@
# 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\.")) {
+ if ("$($args[1])" -ne "") {
+ if (!(Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.")) {
new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rosapps -type
directory
}
- Set-Location modules\rosapps
- $dir = get-childitem
- if ("$dir" -eq "") {
- if ("$ENV:ROS_ARCH" -eq "amd64") {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps ."
- } else {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/rosapps ."
- }
- } else {
- "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.svn\.") {
+ $host.ui.RawUI.WindowTitle = "SVN RosApps Updating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
+ IEX "& svn.exe update -r $($args[1])"
+ } else {
+ $host.ui.RawUI.WindowTitle = "SVN RosApps Creating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
+ $dir = get-childitem
+ if ("$dir" -eq "") {
+ if("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe checkout -r $($args[1])
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps ."
+ } else {
+ IEX "& svn.exe checkout -r $($args[1])
http://svn.reactos.org/reactos/trunk/rosapps ."
+ }
+ } else {
+ "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ }
+ }
+ } else {
+ if (!(Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.")) {
+ new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rosapps -type
directory
+ }
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rosapps\.svn\.") {
+ $host.ui.RawUI.WindowTitle = "SVN RosApps Updating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
+ IEX "& svn.exe update"
+ } else {
+ $host.ui.RawUI.WindowTitle = "SVN RosApps Creating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rosapps"
+ $dir = get-childitem
+ if ("$dir" -eq "") {
+ if ("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rosapps ."
+ } else {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/rosapps ."
+ }
+ } else {
+ "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ }
}
}
Set-Location "$_ROSBE_ROSSOURCEDIR"
@@ -142,23 +176,49 @@
# 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\.")) {
+ if ("$($args[1])" -ne "") {
+ if (!(Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.")) {
new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rostests -type
directory
}
- Set-Location modules\rostests
- $dir = get-childitem
- if ("$dir" -eq "") {
- if ("$ENV:ROS_ARCH" -eq "amd64") {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests ."
- } else {
- IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/rostests ."
- }
- } else {
- "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.svn\.") {
+ $host.ui.RawUI.WindowTitle = "SVN RosTests Updating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
+ IEX "& svn.exe update -r $($args[1])"
+ } else {
+ $host.ui.RawUI.WindowTitle = "SVN RosTests Creating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
+ $dir = get-childitem
+ if ("$dir" -eq "") {
+ if("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe checkout -r $($args[1])
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests ."
+ } else {
+ IEX "& svn.exe checkout -r $($args[1])
http://svn.reactos.org/reactos/trunk/rostests ."
+ }
+ } else {
+ "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ }
+ }
+ } else {
+ if (!(Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.")) {
+ new-item -path "$_ROSBE_ROSSOURCEDIR\modules" -name rostests -type
directory
+ }
+ if (Test-Path "$_ROSBE_ROSSOURCEDIR\modules\rostests\.svn\.") {
+ $host.ui.RawUI.WindowTitle = "SVN RosTests Updating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
+ IEX "& svn.exe update"
+ } else {
+ $host.ui.RawUI.WindowTitle = "SVN RosTests Creating..."
+ Set-Location "$_ROSBE_ROSSOURCEDIR\modules\rostests"
+ $dir = get-childitem
+ if ("$dir" -eq "") {
+ if ("$ENV:ROS_ARCH" -eq "amd64") {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/branches/ros-amd64-bringup/rostests ."
+ } else {
+ IEX "& svn.exe checkout
http://svn.reactos.org/reactos/trunk/rostests ."
+ }
+ } else {
+ "ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
+ }
}
}
Set-Location "$_ROSBE_ROSSOURCEDIR"
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Hel…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Tue May 4 12:03:05 2010
@@ -238,8 +238,8 @@
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 rosapps - Creates / Updates a ReactOS RosApps source tree.
+ echo rostests - Creates / Updates a 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.
)
Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSV…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Tue May 4 12:03:05 2010
@@ -47,10 +47,18 @@
rd /s /q "%_ROSBE_LOGDIR%" 1> NUL 2> NUL
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/reactos .
- ) else (
- svn.exe checkout
http://svn.reactos.org/reactos/trunk/reactos .
+ 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 .
+ )
+ ) 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 .
+ )
)
) else (
echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors.
ABORTED
@@ -60,24 +68,50 @@
:: 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 (
- 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 .
- )
- ) else (
- echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors.
ABORTED
+ if not "%2" == "" (
+ if not exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\." (
+ md "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
+ )
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\.svn\." (
+ title SVN RosApps Updating...
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
+ svn.exe update -r %2
+ ) else (
+ title SVN RosApps Creating...
+ cd "%_ROSBE_ROSSOURCEDIR%\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
.
+ )
+ ) else (
+ echo ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED
+ )
+ )
+ ) else (
+ if not exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\." (
+ md "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
+ )
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\.svn\." (
+ title SVN RosApps Updating...
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
+ svn.exe update
+ ) else (
+ title SVN RosApps Creating...
+ cd "%_ROSBE_ROSSOURCEDIR%\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 .
+ )
+ ) else (
+ echo ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED
+ )
+ )
)
cd "%_ROSBE_ROSSOURCEDIR%"
goto :EOC
@@ -85,24 +119,50 @@
:: 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 (
- 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 .
- )
- ) else (
- echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors.
ABORTED
+ if not "%2" == "" (
+ if not exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\." (
+ md "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
+ )
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\.svn\." (
+ title SVN RosTests Updating...
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
+ svn.exe update -r %2
+ ) else (
+ title SVN RosTests Creating...
+ cd "%_ROSBE_ROSSOURCEDIR%\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
.
+ )
+ ) else (
+ echo ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED
+ )
+ )
+ ) else (
+ if not exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\." (
+ md "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
+ )
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\.svn\." (
+ title SVN RosTests Updating...
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
+ svn.exe update
+ ) else (
+ title SVN RosTests Creating...
+ cd "%_ROSBE_ROSSOURCEDIR%\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 .
+ )
+ ) else (
+ echo ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED
+ )
+ )
)
cd "%_ROSBE_ROSSOURCEDIR%"
goto :EOC
@@ -145,14 +205,14 @@
if not "%_BUILDBOT_SVNSKIPMAINTRUNK%" == "1" (
svn.exe update -r %2
)
- if exist "modules\rosapps\." (
- cd modules\rosapps
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\." (
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
echo Updating RosApps...
svn.exe update -r %2
cd "%_ROSBE_ROSSOURCEDIR%"
)
- if exist "modules\rostests\." (
- cd modules\rostests
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\." (
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
echo Updating RosTests...
svn.exe update -r %2
cd "%_ROSBE_ROSSOURCEDIR%"
@@ -161,14 +221,14 @@
if not "%_BUILDBOT_SVNSKIPMAINTRUNK%" == "1" (
svn.exe update
)
- if exist "modules\rosapps\." (
- cd modules\rosapps
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rosapps\." (
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rosapps"
echo Updating RosApps...
svn.exe update
cd "%_ROSBE_ROSSOURCEDIR%"
)
- if exist "modules\rostests\." (
- cd modules\rostests
+ if exist "%_ROSBE_ROSSOURCEDIR%\modules\rostests\." (
+ cd "%_ROSBE_ROSSOURCEDIR%\modules\rostests"
echo Updating RosTests...
svn.exe update
cd "%_ROSBE_ROSSOURCEDIR%"