You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/11/21 21:06:46 UTC

svn commit: r1412264 - in /subversion/trunk/subversion: include/private/svn_diff_private.h include/svn_diff.h libsvn_client/diff.c svnlook/main.c

Author: julianfoad
Date: Wed Nov 21 20:06:45 2012
New Revision: 1412264

URL: http://svn.apache.org/viewvc?rev=1412264&view=rev
Log:
Move the declaration of the first private libsvn_diff API into its own
header.  A follow-up to r1412225.

Suggested by: Bert

* subversion/include/private/svn_diff_private.h
  New file, declaring svn_diff__display_prop_diffs().

* subversion/include/svn_diff.h
  (svn_diff__display_prop_diffs): Move to svn_diff_private.h.

* subversion/libsvn_client/diff.c,
  subversion/svnlook/main.c
    Include svn_diff_private.h.

Added:
    subversion/trunk/subversion/include/private/svn_diff_private.h   (with props)
Modified:
    subversion/trunk/subversion/include/svn_diff.h
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/svnlook/main.c

Added: subversion/trunk/subversion/include/private/svn_diff_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_diff_private.h?rev=1412264&view=auto
==============================================================================
--- subversion/trunk/subversion/include/private/svn_diff_private.h (added)
+++ subversion/trunk/subversion/include/private/svn_diff_private.h Wed Nov 21 20:06:45 2012
@@ -0,0 +1,80 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    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.
+ * ====================================================================
+ * @endcopyright
+ */
+
+
+#ifndef SVN_DIFF_PRIVATE_H
+#define SVN_DIFF_PRIVATE_H
+
+#include <apr_pools.h>
+#include <apr_tables.h>
+
+#include "svn_types.h"
+#include "svn_io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+/* Display property changes in pseudo-Unidiff format.
+ *
+ * Write to @a outstream the changes described by @a propchanges based on
+ * original properties @a original_props.
+ *
+ * Write all mark-up text (headers and so on) using the character encoding
+ * @a encoding.
+ *
+ *   ### I think the idea is: we want the output to use @a encoding, and
+ *       we will assume the text of the user's files and the values of any
+ *       user-defined properties are already using @a encoding, so we don't
+ *       want to re-code the *whole* output.
+ *       So, shouldn't we also convert all prop names and all 'svn:*' prop
+ *       values to @a encoding, since we know those are stored in UTF-8?
+ *
+ * @a original_props is a hash mapping (const char *) property names to
+ * (svn_string_t *) values.  @a propchanges is an array of svn_prop_t
+ * representing the new values for any of the properties that changed, with
+ * a NULL value to represent deletion.
+ *
+ * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo'
+ * property changes in a human-readable form that says what changes were
+ * merged or reverse merged; otherwise (or if the mergeinfo property values
+ * don't parse correctly) display them just like any other property.
+ *
+ * Use @a pool for temporary allocations.
+ */
+svn_error_t *
+svn_diff__display_prop_diffs(svn_stream_t *outstream,
+                             const char *encoding,
+                             const apr_array_header_t *propchanges,
+                             apr_hash_t *original_props,
+                             svn_boolean_t pretty_print_mergeinfo,
+                             apr_pool_t *pool);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_DIFF_PRIVATE_H */

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

Modified: subversion/trunk/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_diff.h?rev=1412264&r1=1412263&r2=1412264&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_diff.h (original)
+++ subversion/trunk/subversion/include/svn_diff.h Wed Nov 21 20:06:45 2012
@@ -842,42 +842,6 @@ svn_diff_mem_string_output_merge(svn_str
                                  svn_boolean_t display_resolved_conflicts,
                                  apr_pool_t *pool);
 
-/* Display property changes in pseudo-Unidiff format.
- *
- * Write to @a outstream the changes described by @a propchanges based on
- * original properties @a original_props.
- *
- * Write all mark-up text (headers and so on) using the character encoding
- * @a encoding.
- *
- *   ### I think the idea is: we want the output to use @a encoding, and
- *       we will assume the text of the user's files and the values of any
- *       user-defined properties are already using @a encoding, so we don't
- *       want to re-code the *whole* output.
- *       So, shouldn't we also convert all prop names and all 'svn:*' prop
- *       values to @a encoding, since we know those are stored in UTF-8?
- *
- * @a original_props is a hash mapping (const char *) property names to
- * (svn_string_t *) values.  @a propchanges is an array of svn_prop_t
- * representing the new values for any of the properties that changed, with
- * a NULL value to represent deletion.
- *
- * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo'
- * property changes in a human-readable form that says what changes were
- * merged or reverse merged; otherwise (or if the mergeinfo property values
- * don't parse correctly) display them just like any other property.
- *
- * Use @a pool for temporary allocations.
- */
-svn_error_t *
-svn_diff__display_prop_diffs(svn_stream_t *outstream,
-                             const char *encoding,
-                             const apr_array_header_t *propchanges,
-                             apr_hash_t *original_props,
-                             svn_boolean_t pretty_print_mergeinfo,
-                             apr_pool_t *pool);
-
-
 
 
 /* Diff parsing. If you want to apply a patch to a working copy

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1412264&r1=1412263&r2=1412264&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Wed Nov 21 20:06:45 2012
@@ -52,6 +52,7 @@
 #include "client.h"
 
 #include "private/svn_wc_private.h"
+#include "private/svn_diff_private.h"
 
 #include "svn_private_config.h"
 

Modified: subversion/trunk/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/main.c?rev=1412264&r1=1412263&r2=1412264&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/main.c (original)
+++ subversion/trunk/subversion/svnlook/main.c Wed Nov 21 20:06:45 2012
@@ -52,6 +52,7 @@
 #include "svn_version.h"
 #include "svn_xml.h"
 
+#include "private/svn_diff_private.h"
 #include "private/svn_cmdline_private.h"
 #include "private/svn_fspath.h"