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

Problem with stdin and pre-rev-prop-change hook [Issue 952]

From: Curtis Konelsky <captaincurt75_at_hotmail.com>
Date: 2004-07-15 22:34:11 CEST

RE: [Issue 952] Pass stdin to pre-rev-prop-change hook script.

This issue is closed since r9211 implemented this feature (passing new
property value to the hook via stdin) but it does not seem to work for me on
Windows XP. Can anyone confirm or deny that this works on Windows XP? I
have the latest svn version (1.0.5) and have tried it on two different
machines.

Here is my (super-simplified) batch file:

@REM pre-revprop-change.bat hook begin
@echo New property value: 1>&2
@type 1>&2
@quit -1
@REM pre-revprop-change.bat hook end

All I'm trying to do here is output the new property value to the screen.
type reads from stdin if present (though please note I also wrote a simple
stdin echoer in C# and it reads nothing on stdin either when I use it
instead).
[Note the 1>&2 that redirects stdout to stderr, because for whatever reason
the hook's stdout just gets eaten and doesn't appear.]
[Also note that the hook has to return nonzero in order to get its output
written to the screen.]
You could just as readily simply redirect to a file if you don't believe me
(type > output.txt).

You can test this hook at the command line and see it actually does what it
is supposed to do:

[C:\svn\test\hooks]echo Some pretend property value to echo |
pre-revprop-change.bat
New property value:
Some pretend property value to echo

But when I actually do a propset, it echoes the "New" message but not
anything from stdin:

[C:\temp\test]svn propset svn:log --revprop -r HEAD "Changing the log!"
svn: 'pre-revprop-change' hook failed with error output:
New property value:

Can anyone shed some light on this?

_________________________________________________________________
MSN Premium with Virus Guard and Firewall* from McAfeeŽ Security : 2 months
FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 15 22:40:19 2004

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