[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: First-time user (Windows platform)

From: Walden H. Leverich <WaldenL_at_techsoftinc.com>
Date: 2006-10-13 17:37:24 CEST

Aarrgh... Should have gone to list....

We use the following post-commit script(s) to update a staging copy when
we check-in. I think your management is cripling your development by not
letting you run IIS locally, but hey, it's there call. What I'm doing
for a staging env you could do for development. Also note, this example
updates one of two different staging sites depending on which branch of
the trunk we checked into. If it's a checkin to something other than the
trunk we don't update the staging sites.

-----In Post-Commit.bat-----
@echo off
set repos=%1
set repos=%repos:/=\%
cd /d %repos%\hooks
call UpdateStaging "%1" "%2"
-----End Post-Commit.bat-----

-----In UpdateStaging.cmd----
@echo OFF
echo Update staging called for revision %~2 >> .\log\r%~2-log.txt

svnlook changed -r %2 %1 | find " FilingSite/trunk/FilingSite"
if errorlevel 1 goto skipFilingSite

echo FilingSite Staging area update required >> .\log\r%~2-log.txt svn
update --username SVNService --password secret --no-auth-cache
--non-interactive \\ws1\web\StagingSites\NYSTFiling\Content >>
.\log\r%~2-log.txt 2<&1 find "Updated to revision" .\log\r%~2-log.txt if
errorlevel 1 (
        blat .\log\r%~2-log.txt -to whocares@company.com -f
SVNService@company.com -subject "FAILURE: Filing Staging - Revision
r%~2"
        )

:skipFilingSite

svnlook changed -r %2 %1 | find " PublicSite/trunk/"
if errorlevel 1 goto skipPublicSite

echo PublicSite Staging area update required >> .\log\r%~2-log.txt svn
update --username SVNService --password secret --no-auth-cache
--non-interactive \\ws1\web\StagingSites\NYSTPublic\Content >>
.\log\r%~2-log.txt 2<&1 find "Updated to revision" .\log\r%~2-log.txt if
errorlevel 1 (
        blat .\log\r%~2-log.txt -to whocares@company.com -f
SVNService@company.com -subject "FAILURE: Public Staging - Revision
r%~2"
        )

:skipPublicSite

-----End UpdateStaging.cmd---

If you're not aware of it, blat is a commandline tool for sending files.
And we create a "log" directory in each of the repository's hooks
directory.

-Walden

--
Walden H Leverich III
Tech Software
(516) 627-3800 x3051
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com
Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 13 17:35:47 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.