Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4805

swig ruby bindings: delta path editor binding broken for root path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • bindings_swig_ruby
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            julianfoad Julian Foad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: