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

Re: Clarification on checkout and post-commit update hook

From: Dan King <dan.king106_at_yahoo.com>
Date: Tue, 25 Aug 2009 09:14:27 -0700 (PDT)

Thanks for the warm welcome. Based on the link provided in the email below, I put together a batch file. Unfortunately, when the code gets to the for loop, the following errors are displayed:

Error: post-commit hook failed (exit code 255) with output:
Error: DO was unexpected at this time.

Anyone know what is wrong with the following code?

@ECHO OFF
REM Set arguments supplied by Subversion
SET REPOS = %1
SET REV = %2

REM Set working directory path
SET WORKSPACE = D:\apache\htdocs

REM Assign changes to variable
SET CHANGES = svnlook changed %REPOS% -r %REV%

REM Log changed files
ECHO. %DATE% >> D:\svn_log.txt
ECHO. %TIME% >> D:\svn_log.txt
ECHO. %REPOS% >> D:\svn_log.txt
ECHO. %REV% >> D:\svn_log.txt
ECHO. %CHANGES% >> D:\svn_log.txt

REM Update only changed files
FOR /f %%a IN %CHANGES% DO svn update %%a

Thanks,
Dan

----- Original Message ----
From: Andrey Repin <anrdaemon_at_freemail.ru>
To: Dan King <dan.king106_at_yahoo.com>; Dan King <users_at_subversion.tigris.org>
Sent: Thursday, August 20, 2009 5:08:54 PM
Subject: Re: Clarification on checkout and post-commit update hook

Greetings, Dan King!

Run something like this in post-commit

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1582002

But take a note that it is not safe approach at deployment.
Accidental commit of malicious or destructive code could paralyze your work.

--
WBR,
Andrey Repin (anrdaemon_at_freemail.ru) 21.08.2009, <1:05>
Sorry for my terrible english...
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2387215
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 00:06:09 CEST

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.