subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1695872 - in /subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer: log.c mergeinfo-normalizer.h
Date Fri, 14 Aug 2015 12:05:10 GMT
Author: stefan2
Date: Fri Aug 14 12:05:10 2015
New Revision: 1695872

URL: http://svn.apache.org/r1695872
Log:
On the svn-mergeinfo-normalizer branch:
Turn an internal API into a static function.

* tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
  (svn_min__print_log_stats): Remove declaration here.

* tools/client-side/svn-mergeinfo-normalizer/log.c
  (print_log_stats): Renamed from svn_min__print_log_stats and moved here.
  (svn_min__log): Update caller.
  (svn_min__print_log_stats): Remove here.

Modified:
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/log.c
    subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/log.c?rev=1695872&r1=1695871&r2=1695872&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/log.c
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/log.c
Fri Aug 14 12:05:10 2015
@@ -226,6 +226,33 @@ log_entry_receiver(void *baton,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+print_log_stats(svn_min__log_t *log,
+                apr_pool_t *scratch_pool)
+{
+  int change_count = 0;
+
+  int i;
+  for (i = 0; i < log->entries->nelts; ++i)
+    {
+      const log_entry_t *entry = APR_ARRAY_IDX(log->entries, i,
+                                               const log_entry_t *);
+      change_count += entry->paths->nelts;
+    }
+
+  SVN_ERR(svn_cmdline_printf(scratch_pool,
+                             _("    Received %d revisions from %ld to %ld.\n"),
+                             log->entries->nelts, log->first_rev,
+                             log->head_rev));
+  SVN_ERR(svn_cmdline_printf(scratch_pool,
+                             _("    Received %d path changes.\n"),
+                             change_count));
+  SVN_ERR(svn_cmdline_printf(scratch_pool,
+                             _("    Pool has %u different paths.\n\n"),
+                             apr_hash_count(log->unique_paths)));
+
+  return SVN_NO_ERROR;
+}
 
 /* This implements the `svn_opt_subcommand_t' interface. */
 svn_error_t *
@@ -295,7 +322,7 @@ svn_min__log(svn_min__log_t **log,
   if (!baton->opt_state->quiet)
     {
       SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
-      SVN_ERR(svn_min__print_log_stats(result, scratch_pool));
+      SVN_ERR(print_log_stats(result, scratch_pool));
     }
 
   result->unique_paths = NULL;
@@ -812,31 +839,3 @@ svn_min__history_ranges(apr_array_header
 
   return result;
 }
-
-svn_error_t *
-svn_min__print_log_stats(svn_min__log_t *log,
-                         apr_pool_t *scratch_pool)
-{
-  int change_count = 0;
-
-  int i;
-  for (i = 0; i < log->entries->nelts; ++i)
-    {
-      const log_entry_t *entry = APR_ARRAY_IDX(log->entries, i,
-                                               const log_entry_t *);
-      change_count += entry->paths->nelts;
-    }
-
-  SVN_ERR(svn_cmdline_printf(scratch_pool,
-                             _("    Received %d revisions from %ld to %ld.\n"),
-                             log->entries->nelts, log->first_rev,
-                             log->head_rev));
-  SVN_ERR(svn_cmdline_printf(scratch_pool,
-                             _("    Received %d path changes.\n"),
-                             change_count));
-  SVN_ERR(svn_cmdline_printf(scratch_pool,
-                             _("    Pool has %u different paths.\n\n"),
-                             apr_hash_count(log->unique_paths)));
-
-  return SVN_NO_ERROR;
-}

Modified: subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h?rev=1695872&r1=1695871&r2=1695872&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
(original)
+++ subversion/branches/svn-mergeinfo-normalizer/tools/client-side/svn-mergeinfo-normalizer/mergeinfo-normalizer.h
Fri Aug 14 12:05:10 2015
@@ -237,18 +237,22 @@ svn_rangelist_t *
 svn_min__history_ranges(apr_array_header_t *history,
                         apr_pool_t *result_pool);
 
-svn_error_t *
-svn_min__print_log_stats(svn_min__log_t *log,
-                         apr_pool_t *scratch_pool);
-
 svn_min__branch_lookup_t *
 svn_min__branch_lookup_create(svn_ra_session_t *session,
                               apr_pool_t *result_pool);
 
+/* Allocate a new path lookup object in RESULT_POOL and set the list of
+ * missing paths to PATHS.  This object will never contact the repository. */
 svn_min__branch_lookup_t *
 svn_min__branch_lookup_from_paths(apr_array_header_t *paths,
                                   apr_pool_t *result_pool);
 
+/* Set *DELETED to TRUE, if we can confirm using LOOKUP that BRANCH does
+ * not exist @HEAD.  If LOCAL_ONLY is set or if LOOKUP has not been created
+ * with a repository session, base that judgement on information in LOOKUP
+ * alone and report FALSE for unknonw path.  Otherwise contact the
+ * repository for unknown paths and store the result in LOOKUP.
+ * Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_min__branch_lookup(svn_boolean_t *deleted,
                        svn_min__branch_lookup_t *lookup,
@@ -256,11 +260,17 @@ svn_min__branch_lookup(svn_boolean_t *de
                        svn_boolean_t local_only,
                        apr_pool_t *scratch_pool);
 
+/* Return an array of const char *, allocated in RESULT_POOL, of all deleted
+ * FS paths we encountered using LOOKUP.  We only return the respective
+ * top-most missing paths - not any of their sub-nodes.  Use SCRATCH_POOL
+ * for temporary allocations. */
 apr_array_header_t *
 svn_min__branch_deleted_list(svn_min__branch_lookup_t *lookup,
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
+/* Run our common processing code shared between all sub-commands.
+ * Take the sub-command behaviour from the flags in BATON. */
 svn_error_t *
 svn_min__run_normalize(void *baton,
                        apr_pool_t *pool);



Mime
View raw message