You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andy Berdan <be...@gmail.com> on 2004/08/09 13:04:49 UTC
Post-update hook
Is there a mechanism in place (or planned) for a client-side
post-update (preferably server-stored) hook?
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.
Cheers,
Andy.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Post-update hook
Posted by Bryan Donlan <bd...@gmail.com>.
On Mon, 9 Aug 2004 09:04:49 -0400, Andy Berdan <be...@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