Index: subversion/include/mod_dav_svn.h
===================================================================
--- subversion/include/mod_dav_svn.h	(revision 13831)
+++ subversion/include/mod_dav_svn.h	(working copy)
@@ -74,6 +74,13 @@
                                                  const char **repos_path);
 
 
+/* Given an apache request R and a ROOT_PATH to the svn location
+   block sets *REPOS_PATH to the path of the repository on disk.
+*/
+AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
+                                                      const char *root_path,
+                                                      const char **repos_path);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
Index: subversion/mod_dav_svn/mod_dav_svn.c
===================================================================
--- subversion/mod_dav_svn/mod_dav_svn.c	(revision 13831)
+++ subversion/mod_dav_svn/mod_dav_svn.c	(working copy)
@@ -32,6 +32,7 @@
 
 #include "dav_svn.h"
 
+#include <mod_dav_svn.h>
 
 /* This is the default "special uri" used for SVN's special resources
    (e.g. working resources, activities) */
@@ -248,7 +249,47 @@
     return conf->fs_parent_path;
 }
 
+AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r, 
+                                                      const char *root_path,
+                                                      const char **repos_path)
+{
 
+    const char *fs_path;        
+    const char *fs_parent_path; 
+    const char *repos_name;     /* name of the directory below parent path */
+    const char *ignored_path_in_repos;
+    const char *ignored_cleaned_uri;
+    const char *ignored_relative;
+    int ignored_had_slash;
+
+    dav_error *derr;
+    /* SVNPath was used. */
+    fs_path = dav_svn_get_fs_path(r);
+
+    if (fs_path != NULL)
+      {
+        *repos_path = fs_path;
+        return NULL;
+      }
+
+    /* If the SVNParentPath directive was used instead... */
+    fs_parent_path = dav_svn_get_fs_parent_path(r);
+
+    /* Split the svn uri to get the name of the repository below
+       the parent path. */
+    derr = dav_svn_split_uri(r, r->uri, root_path,
+                             &ignored_cleaned_uri, &ignored_had_slash,
+                             &repos_name,
+                             &ignored_relative, &ignored_path_in_repos);
+    if (derr)
+      return derr;
+
+    /* Construct the full path from the parent path base dir and the
+       repository name. */
+    *repos_path = svn_path_join(fs_parent_path, repos_name, r->pool);
+    return NULL;
+}
+
 const char *dav_svn_get_repo_name(request_rec *r)
 {
     dav_svn_dir_conf *conf;


