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

Re: howto pass command-line option from svn client to repository....(new option --skip-post-commit)

From: Molle Bestefich <molle.bestefich_at_gmail.com>
Date: 2005-11-13 00:47:14 CET

Lucas van Staden wrote:
> Post-commit hook script checks to see a folder with the name of the branch
> exists, and if not creates it, and does an inplace checkout as described in
> the faq to make it an active svn workdir to the branch in the repository.
> It then copies all the source files (php/javascript/html templates) into this
> folder, and does a svn add on these, followed by a commit (can you see the
> issue yet?)

I can see another issue. Seems a waste of space in the repository.

Why not use svn:externals and modify the svn:externals property to be
fixated (-r xxx syntax) whenever a copy to a branch is made?

> It then copies the images etc that is not required to be in the repository to
> make the new folder a complete working website, and creates the required
> apache vhost settings and dns setting. The developer then just does an svn
> update on the branch folder on his pc, and all the files are ready for him to
> work on :)

Except for the images, I guess.

> The issue is that when the post-commit script does the commit, the commit
> itself triggers the post-commit script again. This can at times send the
> process into an endless loop, and also slow the process down, creating more
> new folders etc.
>
> Now I thought of creating a new option called --skip-post-commit for the svn
> client, which would then be included in the svn commit used by the
> post-commit script. (I come from a delphi/pascal background, never actually
> done any c....)

There's the option of setting a property on the top folder you're
working on. Before the p-c script does it's commit, it could set this
property on the WC, to indicate it's running. The other p-c script
should (before it starts doing anything, obviously) check for the
existence of this property in the transaction by using svnlook propget
and just 'exit 0' if it's there.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 13 00:48:19 2005

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