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

Re: Bug: stdin can't be used on Windows, because of missing EOF

From: Neiss, Guenter <GUENTER.NEISS_at_plarad.de>
Date: Fri, 4 Jul 2008 06:44:42 +0200

First a question of how to answer correctly to this list.
I tried to send my first reply to this thread (in reply to Karl Fogel)
directly to the list (recived via gname), but it seams, that doesn't
work (this message isn not shown till now).
Therefor I post is to 'dev_at_subversion.tigris.org' again, and this mesage
was shown, but a a seperate thread !?!
So can somebody tell how to answer correctly ?
So that an answer goes into the same thread ?

Ok, now to the problem itsef.

First I have to say 'me culpa', I was on 'the wood-way' (a word by word
translation of a german idiom, may be translated as 'I go straight
forward, in the wrong direction').

My fault was to (incorrectly) use CON: as a synonym for stdin.
While this may be used in the other direction (CON: is the stdin for
commands that are called without an input-redirection), this can't be
used on commands that uses a source-filename parameter to specify stdin
as the soure file.
So in fact my hook script 'hangs', because it is waiting for
Keyboard-Input (which can't ever happen on a process executed inside a
non interactive environment).
To append the content of stdin to a file I must use a filter command
(not shure if this is common terminology, under DOS a filter command is
a command that takes input from stdin, makes some mods and puts the
result into stdout).
The only example I found here inside the mailing list uses 'find' for
this purpose, because when supplied with the arguments </V ""> it realy
works as a 'non modifying' filter.
That was the 'big deal' under DOS (or the command shell of windows),
because there is no such 'natural' filter command.
There are only three filters: find, more and sort, non of them is realy
designed to 'pass-thru', the cheat whith find works, but isn't realy
'self explandory'.

OK; I hope I had a little bit explaind why I had have such toble, but
again, IT WAS ALL MY FAULT !

In the meanwhile I receive some answers to my original message:

Martin Fuller wrotes:
>...Wouldn't it be better to start the hook with a pipe as stdin...
IMHO the 'natural' solution. Stdin, stdout & stderr are designed to be
pipes.
And using pipes for communication with childs that uses stdin & stdout
is common practice.
All this can be done by using standard posix functions, whitch are
available und *nix and windows.

Liviu:
I had already answered directly to him.
I hope now it was clear, what was meant..
..and that it was all my fault :-((

Daniel Shahaf:
>Do you really need the entire archive locally?
Unfortunally, Yes
Whne using google or the link you supplied to search for the terms
'subversion hooks stdin', that gives
- googel: to many answers, non of the first 10..40 if have inspected are
relevant
- gname: The search engine is too limited
I found the post only after I search localy inside the mailing list with
a combination of 'hook' inside message titel and 'stdin' inside message
body.
Thta's the problem today: too many information awalable, hard to filter
out the relevant ones ;-)
Received on 2008-07-04 17:43:27 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.