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

Re: patch msgs showing for merged files

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-01-31 17:40:25 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> I have a feeling this is related to the recent changes around
> svn_io_run_cmd... When "svn update" merges changes into locally
> modified files, patch's chattiness gets printed to the screen (not
> sure if to stderr or stdout).
>
> Is this a known issue? I couldn't find it in the issue tracker, but I
> recall there was still some mop-up work to do with subprocess
> invocation, perhaps involving APR changes. If this problem is stilll
> known to be outstanding, it's probably time to make an issue for it.
> Anyone know more of the history here?

Yes. I assume that patch is being invoked via svn_io_run_cmd without
providing an outfile parameter.

Previously svn_io_run_cmd created three pipes between the parent
process and the child process, one each for infile, outfile and
errfile. These pipes were essentially useless because the parent has
no access to the file descriptors, they were also never closed. Thus
when svn_io_run_cmd called patch, and outfile was null, any output
produced got written to the pipe, where it was invisible and
inaccessible, and it remained there until the parent process (svn)
exited.

Now svn_io_run_cmd only creates pipes for those of the infile,
outfile, errfile parameters that are non-null. Assuming svn_io_run_cmd
is calling patch without an output file, then no stdout pipe is
created, the child process inherits the parents stdout and the output
is visible.

APR handling of the pipes has improved recently, however it is still
not correct in my view

http://subversion.tigris.org/servlets/ReadMsg?msgId=54598&listName=dev

However, since I don't understand the rational for creating the pipe,
I don't really know what to suggest as an APR fix.

The root of the subversion problem is that if patch is producing
output it has got to go somewhere. If we don't want to see it either
we need to associate a file with patch's stdout, or I suppose we could
try adding '-s' to the patch invocation, in make_patch_open_tag() in
libsvn_wc/get_editor.c I would guess.

Another method would be for svn_io_run_cmd to associate temporary
files with those of infile, outfile, and errfile that are null, and
delete them after the child process has finished.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:01 2006

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.