Author: brane
Date: Mon Jan  7 05:31:58 2019
New Revision: 1850611

URL: http://svn.apache.org/viewvc?rev=1850611&view=rev
Log:
Follow up to r1849080: move a private function out of a public header.

* subversion/include/svn_dirent_uri.h: Update file-level docstrin.
  (svn_relpath__internal_style): Removed.

* subversion/include/private/svn_dirent_uri_private.h: New file.
  (svn_relpath__make_internal): Renamed from svn_relpath__internal_style.

* subversion/libsvn_subr/dirent_uri.c,
  subversion/svndumpfilter/svndumpfilter.c,
  subversion/tests/libsvn_subr/dirent_uri-test.c,
  subversion/bindings/javahl/native/Path.cpp:
   Include private/svn_dirent_uri_private.h and use svn_relpath__make_internal
   instead of svn_relpath__internal_style.

* subversion/bindings/swig/python/svn/core.py
  (__all__): Remove mention of svn_relpath__internal_style from the comment.

Added:
    subversion/trunk/subversion/include/private/svn_dirent_uri_private.h   
(with props)
Modified:
    subversion/trunk/subversion/bindings/javahl/native/Path.cpp
    subversion/trunk/subversion/bindings/swig/python/svn/core.py
    subversion/trunk/subversion/include/svn_dirent_uri.h
    subversion/trunk/subversion/libsvn_subr/dirent_uri.c
    subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
    subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c

Modified: subversion/trunk/subversion/bindings/javahl/native/Path.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/Path.cpp?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/Path.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/Path.cpp Mon Jan  7 
05:31:58 2019
@@ -28,11 +28,12 @@
 #include "Path.h"
 #include "svn_path.h"
 #include "svn_dirent_uri.h"
+#include "private/svn_dirent_uri_private.h"
 #include "JNIUtil.h"
 #include "JNIStringHolder.h"
 #include "Pool.h"
 #include "svn_private_config.h"
-
+ 
 /**
  * Constructor
  *
@@ -165,6 +166,5 @@ svn_error_t*
 Relpath::initfunc(const char*& path, SVN::Pool& pool)
 {
   apr_pool_t *const p = pool.getPool();
-  return svn_error_trace(
-      svn_relpath__internal_style(&path, path, p, p));
+  return svn_error_trace(svn_relpath__make_internal(&path, path, p, p));
 }

Modified: subversion/trunk/subversion/bindings/swig/python/svn/core.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/python/svn/core.py?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/python/svn/core.py (original)
+++ subversion/trunk/subversion/bindings/swig/python/svn/core.py Mon Jan  7 
05:31:58 2019
@@ -317,7 +317,7 @@ def run_app(func, *args, **kw):
 # 'apr_pool_clear' 'apr_pool_destroy' 'apr_pool_t'
 # 'apr_time_ansi_put'
 # 'run_app'
-# 'svn_relpath__internal_style' 'svn_uri__is_ancestor'
+# 'svn_uri__is_ancestor'
 # 'svn_tristate__from_word' 'svn_tristate__to_word'
 __all__ = filter(lambda s: (s.startswith('svn_')
                             or s.startswith('SVN_')

Added: subversion/trunk/subversion/include/private/svn_dirent_uri_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_dirent_uri_private.h?rev=1850611&view=auto
==============================================================================
--- subversion/trunk/subversion/include/private/svn_dirent_uri_private.h (added)
+++ subversion/trunk/subversion/include/private/svn_dirent_uri_private.h Mon 
Jan  7 05:31:58 2019
@@ -0,0 +1,53 @@
+/*
+ * svn_dirent_uri_private.h : private definitions for dirents and URIs
+ *
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ */
+
+#ifndef SVN_DIRENT_URI_PRIVATE_H
+#define SVN_DIRENT_URI_PRIVATE_H
+
+#include <apr_pools.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * Convert @a relpath from the local style to the canonical internal style.
+ * "Local style" means native path separators and "." for the empty path.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.7 (as svn_relpath__internal_style()).
+ * @since Name and signature changed in 1.12.
+ */
+svn_error_t *
+svn_relpath__make_internal(const char **internal_style_relpath,
+                           const char *relpath,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_DIRENT_URI_PRIVATE_H */

Propchange: subversion/trunk/subversion/include/private/svn_dirent_uri_private.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/trunk/subversion/include/svn_dirent_uri.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_dirent_uri.h?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_dirent_uri.h (original)
+++ subversion/trunk/subversion/include/svn_dirent_uri.h Mon Jan  7 05:31:58 
2019
@@ -66,7 +66,6 @@
  *    - @c svn_relpath_canonicalize()
  *    - @c svn_relpath_canonicalize_safe()
  *    - @c svn_relpath_is_canonical()
- *    - @c svn_relpath__internal_style()
  *    - @c svn_uri_canonicalize()
  *    - @c svn_uri_canonicalize_safe()
  *    - @c svn_uri_is_canonical()
@@ -200,22 +199,6 @@ const char *
 svn_dirent_local_style(const char *dirent,
                        apr_pool_t *result_pool);
 
-/**
- * Convert @a relpath from the local style to the canonical internal style.
- * "Local style" means native path separators and "." for the empty path.
- *
- * Allocates the results in @a result_pool. Uses @a scratch_pool for
- * temporary allocations.
- *
- * @since New in 1.7.
- * @since Signature changed in 1.12.
- */
-svn_error_t *
-svn_relpath__internal_style(const char **internal_style_relpath,
-                            const char *relpath,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool);
-
 /** Join a base dirent (@a base) with a component (@a component).
  *
  * If either @a base or @a component is the empty string, then the other

Modified: subversion/trunk/subversion/libsvn_subr/dirent_uri.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dirent_uri.c?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Mon Jan  7 05:31:58 
2019
@@ -37,6 +37,7 @@
 #include "svn_ctype.h"
 
 #include "dirent_uri.h"
+#include "private/svn_dirent_uri_private.h"
 #include "private/svn_fspath.h"
 #include "private/svn_cert.h"
 
@@ -935,10 +936,10 @@ svn_dirent_local_style(const char *diren
 }
 
 svn_error_t *
-svn_relpath__internal_style(const char **internal_style_relpath,
-                            const char *relpath,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool)
+svn_relpath__make_internal(const char **internal_style_relpath,
+                           const char *relpath,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(
       svn_relpath_canonicalize_safe(internal_style_relpath, NULL,

Modified: subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/svndumpfilter.c?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/trunk/subversion/svndumpfilter/svndumpfilter.c Mon Jan  7 
05:31:58 2019
@@ -43,6 +43,7 @@
 #include "svn_mergeinfo.h"
 #include "svn_version.h"
 
+#include "private/svn_dirent_uri_private.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_mergeinfo_private.h"
 #include "private/svn_cmdline_private.h"
@@ -1467,7 +1468,7 @@ sub_main(int *exit_code, int argc, const
           /* Ensure that each prefix is UTF8-encoded, in internal
              style, and absolute. */
           SVN_ERR(svn_utf_cstring_to_utf8(&prefix, os->argv[i], pool));
-          SVN_ERR(svn_relpath__internal_style(&prefix, prefix, pool, pool));
+          SVN_ERR(svn_relpath__make_internal(&prefix, prefix, pool, pool));
           if (prefix[0] != '/')
             prefix = apr_pstrcat(pool, "/", prefix, SVN_VA_NULL);
           APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;

Modified: subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1850611&r1=1850610&r2=1850611&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Mon Jan  7 
05:31:58 2019
@@ -36,6 +36,7 @@
 
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
+#include "private/svn_dirent_uri_private.h"
 #include "private/svn_fspath.h"
 #include "private/svn_cert.h"
 
@@ -2332,11 +2333,11 @@ test_relpath_internal_style(apr_pool_t *
   for (i = 0; i < COUNT_OF(tests); i++)
     {
       const char *internal;
-      SVN_ERR(svn_relpath__internal_style(&internal, tests[i].path, pool, 
pool));
+      SVN_ERR(svn_relpath__make_internal(&internal, tests[i].path, pool, 
pool));
 
       if (strcmp(internal, tests[i].result))
         return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-                                 "svn_relpath__internal_style(\"%s\") returned 
"
+                                 "svn_relpath__make_internal(\"%s\") returned "
                                  "\"%s\" expected \"%s\"",
                                  tests[i].path, internal, tests[i].result);
     }


Reply via email to