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

Re: [PATCH]: svn_io_start_cmd2 which can create pipes

From: Martin Furter <mf_at_rola.ch>
Date: 2007-03-26 20:45:29 CEST

On Mon, 26 Mar 2007, Martin Furter wrote:

>
>
> On Mon, 26 Mar 2007, David Glasser wrote:
>
>> On 3/26/07, Martin Furter <mf@rola.ch> wrote:
>>> After reading APR docs and playing around I found apr_procattr_io_set.
>>> First I copied svn_io_start_cmd and modified it to do what I want, and it
>>> works fine. So I thought let's write a patch...
>>>
>>> Then I found out that the only caller of svn_io_start_cmd does the same
>>> thing but in a different way. It is run_hook_cmd in libsvn_repos/hooks.c .
>>
>> I don't think it makes much sense to add a new API that we're not
>> using. Maybe you should include the change to run_hook_cmd in your
>> patch?
>
> Not using yet...
>
> If run_hook_cmd would use the new API about 15 lines of code could be removed
> there (creating and closing pipes).
>
> I stopped doing that because I wondered why it's done different there
> duplicating code which is already in APR and works fine here (APR 1.x and APR
> from Apache 2.0.55 on linux).
>
> Is there a known problem with apr_procattr_io_set ?
>
> If now I'll write a patch for run_hook_cmd and run the testsuite...

OK, I wrote that patch, but I can't test it now because of the
XFail(hook_test) in commit_tests.py . Will look into that later.

I just thought I'll show you what would be changed.

Hmm, there's another caller to apr_proc_create in
subversion/libsvn_ra_svn/client.c: make_tunnel.
Not sure if it makes sense to replace that with svn_io_start_cmd2 too.

[[[
Update run_hook_cmd to use svn_io_start_cmd2.

* subversion/libsvn_repos/hooks.c
   (run_hook_cmd): Remove pipes and use pipe_flags of svn_io_start_cmd2.
]]]

- Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Mar 26 20:45:46 2007

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.