From: Jonathan Nieder Date: Thu, 27 Sep 2012 02:11:52 GMT Subject: Re: [PATCH 3/7] Extract, test and enhance the logic to collapse ../foo paths. Message-ID: <20120927021152.GE31456@elie.Belkin> In-Reply-To: <20120927001506.GA9515@dcvr.yhbt.net> Eric Wong wrote: > Ideally, yes. Is there an easy way to access that from Perl? (and > for the older versions of SVN folks people are running). Subversion's swig bindings only wrap a few apr functions and do not depend on fuller apr bindings. Something like svn_dirent_is_under_root() could be useful. It uses whatever base path you choose. I haven't tried using base_path="" yet. New in Subversion 1.7, but that would be ok --- an imperfect fallback for older Subversion versions would be fine. Unfortunately, from swig/core.i: "SWIG can't digest these functions yet, so ignore them for now. TODO: make them work." svn_client_args_to_target_array2() is exposed and would probably be perfect. I can't seem to find how to create an apr_array_header_t to pass as its first argument, alas. > Perhaps we can expose equivalent functionality in git via > git-rev-parse instead? It might be possible to add a git-svn--helper command that links to libsvn or apr, but ick. The trouble is it's not clear at all how Subversion's perl API was *designed* to be used. Hm. Jonathan