-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
kbrannen@gte.net wrote:
>> $dif $geometry <(svn cat $file 2>/dev/null) $file
>>
>>
>> No need to create a temporary file which has to be destroyed. And
>> especially no need to create it in the working directory. Just imagine
>> you want to figure out what changes a coworker of yours changed.
>
>
> Good thought, but it unfortunately doesn't work for everyone. Some
> programs can take STDIN as an arg, others can't, so an actual file is
> required.
This is an actual file. Try it. What gets passed to the diff program
is on Linux someting like /dev/fd/62
> Putting it in the current WD seems as good a place as any,
> because if there was an error, it should be pretty obvious what that
> file is. If you're concerned about "hitting a real file", change the
> "_LasT" so something weirder. :-)
This is not what I'm concerned about. Read my comment again. The
script requires to be in the source directory. Now assume it is
somebody else's source directoy and you have no write access (but read
access). You should be allowed to use diff.
> BTW, the "<(svn cat $file 2>/dev/null)" construct does NOT work for me
> in either bash or ksh. Bash says: "Error: not an ordinary file or a
> directory",
I don't know what kind of version of bash you're using. It definitely
works in general. I use it every day. Does
cat <(cat /etc/issue)
work for you (assuming you have an /etc/issue file)? If not, you 're
either using your shell as /bin/sh it's broken or very old.
> Now this does work for some programs:
>
> svn cat $file | $dif $geometry $file -
You can do this. To be more portable, you should use /dev/stdin (that's
the POSIX mandated name many utilities have to know and on Linux it just
magically works).
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE99rdA2ijCOnn/RHQRAlkDAJ9/iXOK+osGPTQWktU66AtAKnlxVQCfTFyy
TQCmJUa2B8FZT0HZpQVcANY=
=qE7u
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 11 04:56:05 2002