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

Deadlock on Post-Commit Script

From: Jake Stone <jake.the.stone_at_gmail.com>
Date: Mon, 24 Aug 2009 03:51:49 -0500

Hello!

I am running SVN over Apache on Windows Server 2003, and I am trying to
create a post-commit script for an ArgoUML repository. The repository
only holds their ".zargo" files, and there is a nice command-line method
to generate SVG diagrams from their UML projects, and I want to create a
hook to do so automatically.

I've created a checkout on the SVN server, but when I add "svn update
%REPOS%" to my post-commit hook, any commits to that repository
complete, but the post-commit hangs indefinitely. When I cancel the
commit, the server's checkout requires svn cleanup and svn update to
properly bring it up to date.

I'm sure that running an svn update on a repository you've just
committed to CAN work, since this person does it here:
http://blog.pengoworks.com/index.cfm/2008/2/5/SVN-postcommit-for-Windows
So I'm not sure what the problem is. Removing the svn update portion of
the hook allows it to run properly. Any ideas what could be causing this?

Incidentally, if there's a better way to be doing this, like querying
SVN directly for the latest copies of files rather than keeping my own
checkout, please let me know.

Attached is the hook script, though there's nothing else interesting.
Thanks in advance for your help!

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].

@ECHO OFF
REM *************************************************************
REM Generates SVG files for every argoUML .zargo project file.
REM Assumes the repository is only used for .zargo files.
REM To use this, copy this BAT to repository/hooks
REM Don't forget to set the location of the svnlook tool, etc.
REM *************************************************************
SET SVNDIR=
SET ARGOCHECKOUT=
SET UMLBAT=

REM *************************************************************
REM * this sets the arguments supplied by Subversion
REM *************************************************************
SET REPOS=%1
SET REV=%2

REM *************************************************************
REM * This creates a unique filename to store temporary output
REM *************************************************************
SET FILEOUT=%REPOS%\hooks\PostCommitUML.%REV%.txt

REM *************************************************************
REM * Updates the local SVN checkout.
REM * Needed to handle the .zargo files.
REM *************************************************************
%SVNDIR%\svn update %ARGOCHECKOUT%

REM *************************************************************
REM * Does the following:
REM * 1) Saves the list of changed files to a file.
REM * 2) For each file, runs the UMLtoSVG script.
REM * 3) Deletes the temporary file.
REM *************************************************************

REM %SVNDIR%\svnlook changed %REPOS% -r %REV% > %FILEOUT%
REM for /f "tokens=2" %%i in (%FILEOUT%) do %UMLBAT% %%i %%i.svg
REM for /f "tokens=2" %%i in (%FILEOUT%) echo %%i > %FILEOUT%.tt
REM del /f %FILEOUT%
Received on 2009-08-24 10:52:52 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.