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

Re: Post-update hook

From: Bryan Donlan <bdonlan_at_gmail.com>
Date: 2004-08-10 00:32:50 CEST

On Mon, 9 Aug 2004 09:04:49 -0400, Andy Berdan <berdandy@gmail.com> wrote:
> Is there a mechanism in place (or planned) for a client-side
> post-update (preferably server-stored) hook?

No such mechanism exists at this time.

> We have a situation here where our build system packages up entire
> directories (and doesn't support ignoring specific files or
> directories, such as .svn). We've had to resort to manually exporting
> the files ourselves, or simply doing local copies.
>
> I understand that we could package this into the build system (and are
> in the process of doing so), but it would be nice if there were a
> mechanism that could do the copy/export only when files have changed
> in svn.

Why not use svn ls -v to check if a commit has happened since the last
export? Something like this:

#!/bin/sh
URL=http://host/path/trunk

svn ls -v $URL > svn-ls
if [ -f svn-ls.old ] && diff svn-ls svn-ls.old > /dev/null; then
  # Up-to-date, do nothing
  true
else
  rm -rf export
  svn export $URL export
  do-build # Replace with the command to start the build process
fi
mv svn-ls svn-ls.old

Be sure not to run it twice at the same time though. Or you could
update a working copy, and make a copy of it minus the .svn
directories.

-- 
bd
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 10 00:33:39 2004

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