You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2011/01/19 18:52:44 UTC
svn commit: r1060885 -
/subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
Author: cmpilato
Date: Wed Jan 19 17:52:44 2011
New Revision: 1060885
URL: http://svn.apache.org/viewvc?rev=1060885&view=rev
Log:
On the 'uris-as-urls' branch, lose the code that implements the fspath
API functionality in terms of uris. (Huge thanks to whoever had the
foresight to implement this code both ways!)
* subversion/libsvn_subr/dirent_uri.c
Remove code inside #ifdef FSPATH_USE_URI blocks.
Modified:
subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
Modified: subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c?rev=1060885&r1=1060884&r2=1060885&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_subr/dirent_uri.c Wed Jan 19 17:52:44 2011
@@ -2428,11 +2428,7 @@ svn_fspath__is_child(const char *parent_
assert(svn_fspath__is_canonical(parent_fspath));
assert(svn_fspath__is_canonical(child_fspath));
-#ifdef FSPATH_USE_URI
- result = svn_uri_is_child(parent_fspath, child_fspath, pool);
-#else
result = svn_relpath_is_child(parent_fspath + 1, child_fspath + 1, pool);
-#endif
assert(result == NULL || svn_relpath_is_canonical(result, pool));
return result;
@@ -2446,14 +2442,10 @@ svn_fspath__skip_ancestor(const char *pa
assert(svn_fspath__is_canonical(parent_fspath));
assert(svn_fspath__is_canonical(child_fspath));
-#ifdef FSPATH_USE_URI
- result = svn_uri_skip_ancestor(parent_fspath, child_fspath);
-#else
if (svn_relpath_is_ancestor(parent_fspath + 1, child_fspath + 1))
result = svn_relpath_skip_ancestor(parent_fspath + 1, child_fspath + 1);
else
result = child_fspath;
-#endif
assert(svn_relpath_is_canonical(result, NULL)
|| strcmp(result, child_fspath) == 0);
@@ -2467,11 +2459,7 @@ svn_fspath__is_ancestor(const char *pare
assert(svn_fspath__is_canonical(parent_fspath));
assert(svn_fspath__is_canonical(child_fspath));
-#ifdef FSPATH_USE_URI
- return svn_uri_is_ancestor(parent_fspath, child_fspath);
-#else
return svn_relpath_is_ancestor(parent_fspath + 1, child_fspath + 1);
-#endif
}
@@ -2482,12 +2470,8 @@ svn_fspath__dirname(const char *fspath,
const char *result;
assert(svn_fspath__is_canonical(fspath));
-#ifdef FSPATH_USE_URI
- result = svn_uri_dirname(fspath, pool);
-#else
result = apr_pstrcat(pool, "/", svn_relpath_dirname(fspath + 1, pool),
(char *)NULL);
-#endif
assert(svn_fspath__is_canonical(result));
return result;
@@ -2501,11 +2485,7 @@ svn_fspath__basename(const char *fspath,
const char *result;
assert(svn_fspath__is_canonical(fspath));
-#ifdef FSPATH_USE_URI
- result = svn_uri_basename(fspath, pool);
-#else
result = svn_relpath_basename(fspath + 1, pool);
-#endif
assert(strchr(result, '/') == NULL);
return result;
@@ -2535,16 +2515,12 @@ svn_fspath__join(const char *fspath,
assert(svn_fspath__is_canonical(fspath));
assert(svn_relpath_is_canonical(relpath, result_pool));
-#ifdef FSPATH_USE_URI
- result = svn_uri_join(fspath, relpath, result_pool);
-#else
if (relpath[0] == '\0')
result = apr_pstrdup(result_pool, fspath);
else if (fspath[1] == '\0')
result = apr_pstrcat(result_pool, "/", relpath, (char *)NULL);
else
result = apr_pstrcat(result_pool, fspath, "/", relpath, (char *)NULL);
-#endif
assert(svn_fspath__is_canonical(result));
return result;
@@ -2559,15 +2535,11 @@ svn_fspath__get_longest_ancestor(const c
assert(svn_fspath__is_canonical(fspath1));
assert(svn_fspath__is_canonical(fspath2));
-#ifdef FSPATH_USE_URI
- result = svn_uri_get_longest_ancestor(fspath1, fspath2, result_pool);
-#else
result = apr_pstrcat(result_pool, "/",
svn_relpath_get_longest_ancestor(fspath1 + 1,
fspath2 + 1,
result_pool),
NULL);
-#endif
assert(svn_fspath__is_canonical(result));
return result;