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

Re: [PATCH] #9 OS400/EBCDIC Port: Running Hook Scripts

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-03-17 22:05:52 CET

Philip Martin <philip@codematters.co.uk> wrote on 03/14/2006 02:31:37 PM:

> Paul Burba <paulb@softlanding.com> writes:
>
> >> > #ifdef AS400
> >> > #define SVN_UTF_UTOE_XLATE_HANDLE "svn-utf-utoe-xlate-handle"
> >> > +#define SVN_UTF_ETOU_XLATE_HANDLE "svn-utf-etou-xlate-handle"
> >>
> >> We already have one of those in libsvn_subr/cmdline.c
> >
> > Yes, but how does that help me in io.c? Unless you mean these should
be
> > made public...should svn_utf.h have all of these?
> >
> > #define SVN_UTF_NTOU_XLATE_HANDLE "svn-utf-ntou-xlate-handle"
> > #define SVN_UTF_UTON_XLATE_HANDLE "svn-utf-uton-xlate-handle"
>
> No, those are only used in one file.
>
> > #ifdef AS400
> > #define SVN_UTF_UTOE_XLATE_HANDLE "svn-utf-utoe-xlate-handle"
> > #define SVN_UTF_ETOU_XLATE_HANDLE "svn-utf-etou-xlate-handle"
> > #endif
>
> I'd suggest putting SVN_UTF_ETOU_XLATE_HANDLE into a libsvn_subr
> header, it doesn't need to be visible outside libsvn_subr.

Thanks, I understand now. Though for approach #3, both
SVN_UTF_UTOE_XLATE_HANDLE and SVN_UTF_ETOU_XLATE_HANDLE are now required
by libsvn_repos. So I placed these in svn_utf.h, is this the correct
approach?

> >> I feel a bit guilty about suggesting that since I seem to be asking
> >> for all your patches to be re-written :-/
> >
> > Heh, I'm not worried about that, I just want it done correctly. I see
3
> > possible options to solve this:
> >
> > 1. Tweak the existing patch to avoid the deadlock issue and call it a
day.
> >
> > 2. Figure out how to make apr_file_t and spawn() work together.
> >
> > 3. Move the patch entirely within hooks.c. Just add a second
definition
> > for run_hook_cmd() along with the existing implementation within a
#ifndef
> > AS400...#else...#endif block.
> >
> > FWIW I like option 3, it is certainly the smallest patch and
introduces no
> > new APIs.
>
> 3 is fine as far as I am concerned.

Julian Foad <julianfoad@btopenworld.com> wrote on 03/14/2006 12:47:53 PM:

> I'd be happy with whatever minimises the impact of these work-arounds on
our
> code base. (Not just for OS400 but any work-arounds for any stuff that
APR
> ought to handle.)

This patch implements option 3. I'm not sure if anyone noticed this or
not, but the previous patch didn't handle stdin to a hook. This was an
oversight on my part, the attached patch handles this now.

Thanks to both of you for the reviews, please let me know what you think
of this new patch.

Paul B.

======================================================================

[[[
OS400/EBCDIC Port:

This is one of several patches to allow Subversion to run on IBM's
OS400 V5R4. It provides a workaround for various limitations with
IBM's implementation of APR processes.

* subversion/include/svn_utf.h
   (SVN_UTF_UTOE_XLATE_HANDLE, SVN_UTF_ETOU_XLATE_HANDLE): New public
    xlate keys for EBCDIC <--> UTF-8 conversions.

* subversion/libsvn_repos/hooks.c
   Include spawn.h and fcntl.h
   (run_hook_cmd): New "APR-free" implementation for OS400.

* subversion/libsvn_subr/cmdline.c
   (SVN_UTF_ETOU_XLATE_HANDLE): Remove.

* subversion/libsvn_subr/io.c
   (SVN_UTF_UTOE_XLATE_HANDLE): Remove.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

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

Received on Fri Mar 17 22:06:26 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.