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

Re: Program to start long running hooks in Windows for Subversion >= 1.3

From: Matthew S. Moore <mmoore_at_asf.alaska.edu>
Date: 2006-07-15 03:45:52 CEST

si wrote:
> Hi Ryan,
>
>> That bug says it is "resolved" and "works for me."
>
> Correct, apparently it works fine on Linux, which seemed to
> be the o/s used by the person who replied to the bug report.
>
>> Are you saying it still does not work?
>
> Perhaps a better way of saying it is I've yet to see a way to
> spawn processes in Windows using standard commands
> whilst ensuring the stdout and stderr streams where closed.
>
> In a nutshell, svn < 1.3.0 running "start /b <cmd>" worked in
> spawning post commit hooks, but in svn >= 1.3.0 it doesn't.
>
> The difference seems to be with Linux you just have to place
> an ampersand on the end of a command to spawn it, whereas
> in Windows you have to use another command, so the redirection
> rules may be changed (not sure), but I tried many combinations
> and couldn't get it any to work.
>
>> Does the bug need to be reopened?
>
> If someone can demonstrate how to do it in Windows,
> then no, otherwise perhaps it should be. If it does get
> resolved, it's probably a faq worthy entry.

   I have been having similar problems running under Cygwin on a Win2000 system.
  I wrote my post-commit scripts to send email and to perform per-commit backups
(incremental, hot, and full depending on the rev number). They are perl scripts
called with & at the end from inside the post-commit shell script. This has
worked just fine for a long time.

   Then I upgraded to v1.3.0 using the current Cygwin package. I eventually
noticed that the commits were not returning immediately for the full/hot backup
revs. I did a little research and found references to the bug you mention
below. So, I used Subversion source package for Cygwin with the v1.3.2 source
and built my own updated Cygwin patch. It installed fine and seems to work for
the most part.

   However, it was mentioned in the bug report that with the fixed post-commit
behavior, you must redirect stout/stderr. When I do this:

backup.pl ... &>/dev/null &

   The commit does seem to come back OK, except now my email and backup scripts
don't produce any output. Both scripts also redirect stdout/stderr to log files
  which don't get written. If I take off the redirection to /dev/null above,
then the scripts produce output correctly, but don't background and the commit
on the client side has to wait for the scripts to finish.

   Is this just a Windows(/Cygwin) problem, or has anyone seen this on Linux
systems, too?

   Thanks,

Matthew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jul 15 03:47:02 2006

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.