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

Weird export behaviour on Win2K in post-commit hook

From: <tom_at_opgenorth.net>
Date: 2004-04-15 00:03:10 CEST

I've encountered a weird problem, and while I think it is
probably more Windows related than an issue with Subversion,
I figured I would ask here. What my client wants is
something very similar to the shadow directory concept in
Visual Source Safe: When a file is checked in, a copy of
that file is pushed out to a directory on a disk somewhere.
This is for access to the file by non-technical users who
are used to just copying the file from somewhere. I figured
that this would be easy enough to emulate with Subversion
using a post-commit hook.

I wrote a little program in C# that is called by
post-commit.bat, and will svnlook at the commit and see if
any directories of interest have been modified. If they
have, then the directory will be exported to a drive on the
network (using svn export). I control which directories are
watched and where they are supposed to be exported to by the
applications .config file.

So in short, I've basically got a little post-commit hook
that does this:

Find out what files have changed in the commit -
svnlook changed C:/svnrepo 200

Check output, find out what directories have changed. For
each target directory that has changed export it -
svn export --username user --password passwd --force -r
http://123.45.67.890:8080/svn/trunk/Model
R:/Fcs/Model/Operational

The Subversion server (v1.0.1) is running on a Win2K Pro
box, using Apache 2.0.49 for client access. On each commit,
files are supposed to be exported to a directory on the
network. Thanks to log4net, what I see happening is that
the application is successfully retrieving a list of changed
files via svnlook changed.

Now when the application tries to use svn export to export
the directory to the network drive, nothing happens. If I
tweak my .config file to have the directory to a local
drive, then the export works.

Oddly enough, if I run my program from the command-line,
passing it the values it would get from post-commit.bat, it
works. Just something odd about when the Subversion server
tries to do things that is causing it to not work properly.

Any suggestion/tips/advice? I appreciate any help I get.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 15 00:04:38 2004

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.