You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/09 23:06:53 UTC

svn commit: r1090688 - /subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c

Author: rhuijben
Date: Sat Apr  9 21:06:53 2011
New Revision: 1090688

URL: http://svn.apache.org/viewvc?rev=1090688&view=rev
Log:
* subversion/libsvn_ra_local/ra_plugin.c
  (reporter_link_path): Use svn_uri_* functions instead of local
    simplified reimplementation.

Modified:
    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c

Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1090688&r1=1090687&r2=1090688&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Sat Apr  9 21:06:53 2011
@@ -189,18 +189,17 @@ reporter_link_path(void *reporter_baton,
 {
   reporter_baton_t *rbaton = reporter_baton;
   const char *fs_path = NULL;
-  const char *repos_url_decoded;
-  size_t repos_url_len;
+  const char *repos_url = rbaton->sess->repos_url;
 
-  url = svn_path_uri_decode(url, pool);
-  repos_url_decoded = svn_path_uri_decode(rbaton->sess->repos_url, pool);
-  repos_url_len = strlen(repos_url_decoded);
-  if (strncmp(url, repos_url_decoded, repos_url_len) != 0)
+  if (!svn_uri_is_ancestor(repos_url, url))
     return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                              _("'%s'\n"
                                "is not the same repository as\n"
                                "'%s'"), url, rbaton->sess->repos_url);
-  fs_path = url + repos_url_len;
+
+  fs_path = svn_path_uri_decode(svn_uri_skip_ancestor(repos_url, url),
+                                pool);
+
   return svn_repos_link_path3(rbaton->report_baton, path, fs_path, revision,
                               depth, start_empty, lock_token, pool);
 }