You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@subversion.apache.org by "Julian Foad (JIRA)" <ji...@apache.org> on 2019/01/31 16:24:00 UTC

[jira] [Commented] (SVN-4805) swig ruby bindings: delta path editor binding broken for root path

    [ https://issues.apache.org/jira/browse/SVN-4805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757439#comment-16757439 ] 

Julian Foad commented on SVN-4805:
----------------------------------

AttachedĀ [^swig-rb-delta-path-driver-1.patch], a non-working start to fixing it. Help needed!

> swig ruby bindings: delta path editor binding broken for root path
> ------------------------------------------------------------------
>
>                 Key: SVN-4805
>                 URL: https://issues.apache.org/jira/browse/SVN-4805
>             Project: Subversion
>          Issue Type: Bug
>          Components: bindings_swig_ruby
>            Reporter: Julian Foad
>            Priority: Major
>         Attachments: swig-rb-delta-path-driver-1.patch
>
>
> The Ruby binding for delta path-driver is broken.
> r1852536 fixed a bug in handling of slash-prefixed paths, whereby a "/" path was handled as a regular path not as a root path. That exposed the bug in the bindings for the path-driver: it assumes the callback always gets a non-null "parent_dir_baton", but that's not so for the root path.
> The relevant function is 'svn_swig_rb_delta_path_driver_cb_func' which dereferences 'ib' (the parent_baton argument), but the problem extends to the whole delta-editor bindings because this function tries to return a dir-baton that includes 'ib->editor', and if it can't do that, it looks like the other editor methods won't be able to work.
> Fixing it looks too difficult for me.
> In principle, it's Just a matter of passing the required info through the "callback_baton" argument instead, but that's currently coded as a standard type shared by many callback types.
> Better... The new svn_delta_path_driver3() passes the 'editor' and 'edit_baton' directly to the svn_delta_path_driver_cb_func2_t callback type. The 'edit_baton' of the existing Ruby binding of the delta-editor contains the required information, it appears.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)