You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/01/25 18:46:38 UTC

svn commit: r1063375 - in /subversion/branches/ignore-mergeinfo-log/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/log.c svn/log-cmd.c

Author: hwright
Date: Tue Jan 25 17:46:38 2011
New Revision: 1063375

URL: http://svn.apache.org/viewvc?rev=1063375&view=rev
Log:
On the ignore-mergeinfo-log branch:
Expand the API capability beyond just ignoring the svn:mergeinfo property,
and instead allow callers to provide a hash of proeprty names.  The commandline
client will still only implement --ignore-mergeinfo.

* subversion/svn/log-cmd.c
  (svn_cl__log): Provide a hash with just the mergeinfo property in it to
    svn_client_log6().

* subversion/include/svn_client.h
  (svn_client_log6): Update docs, and parameter list to reflect the input hash.

* subversion/libsvn_client/deprecated.c
  (svn_client_log5): Update wrapper.
 
* subversion/libsvn_client/log.c
  (svn_client_log6): Update param list, and use a simplification for the call
    to the ra layer.

Modified:
    subversion/branches/ignore-mergeinfo-log/subversion/include/svn_client.h
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/deprecated.c
    subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/log.c
    subversion/branches/ignore-mergeinfo-log/subversion/svn/log-cmd.c

Modified: subversion/branches/ignore-mergeinfo-log/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/include/svn_client.h?rev=1063375&r1=1063374&r2=1063375&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/include/svn_client.h (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/include/svn_client.h Tue Jan 25 17:46:38 2011
@@ -2341,8 +2341,9 @@ svn_client_status(svn_revnum_t *result_r
  * If @a include_merged_revisions is set, log information for revisions
  * which have been merged to @a targets will also be returned.
  *
- * If @a ignore_mergeinfo_changes is set, log will ignore any changes to
- * the svn:mergeinfo property when determining which revisions to return.
+ * @a ignore_prop_mods is an optional hash of property names.  If
+ * non-NULL, log will ignore any changes to properties names as the keys
+ * of the hash when determining which revisions to return.
  *
  * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
  * revprops named in the array (i.e. retrieve none if the array is empty).
@@ -2369,7 +2370,7 @@ svn_client_log6(const apr_array_header_t
                 svn_boolean_t discover_changed_paths,
                 svn_boolean_t strict_node_history,
                 svn_boolean_t include_merged_revisions,
-                svn_boolean_t ignore_mergeinfo_changes,
+                const apr_hash_t *ignore_prop_mods,
                 const apr_array_header_t *revprops,
                 svn_log_entry_receiver_t receiver,
                 void *receiver_baton,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/deprecated.c?rev=1063375&r1=1063374&r2=1063375&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/deprecated.c Tue Jan 25 17:46:38 2011
@@ -1216,7 +1216,7 @@ svn_client_log5(const apr_array_header_t
 {
   return svn_client_log6(targets, peg_revision, revision_ranges, limit,
                          discover_changed_paths, strict_node_history,
-                         include_merged_revisions, FALSE, revprops,
+                         include_merged_revisions, NULL, revprops,
                          receiver, receiver_baton, ctx, pool);
 }
 

Modified: subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/log.c?rev=1063375&r1=1063374&r2=1063375&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/log.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/libsvn_client/log.c Tue Jan 25 17:46:38 2011
@@ -273,7 +273,7 @@ svn_client_log6(const apr_array_header_t
                 svn_boolean_t discover_changed_paths,
                 svn_boolean_t strict_node_history,
                 svn_boolean_t include_merged_revisions,
-                svn_boolean_t ignore_mergeinfo_changes,
+                const apr_hash_t *ignore_prop_mods,
                 const apr_array_header_t *revprops,
                 svn_log_entry_receiver_t real_receiver,
                 void *real_receiver_baton,
@@ -612,7 +612,7 @@ svn_client_log6(const apr_array_header_t
                               discover_changed_paths,
                               strict_node_history,
                               include_merged_revisions,
-                              ignore_mergeinfo_changes,
+                              ignore_prop_mods != NULL,
                               passed_receiver_revprops,
                               passed_receiver,
                               passed_receiver_baton,

Modified: subversion/branches/ignore-mergeinfo-log/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/svn/log-cmd.c?rev=1063375&r1=1063374&r2=1063375&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/svn/log-cmd.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/svn/log-cmd.c Tue Jan 25 17:46:38 2011
@@ -565,6 +565,7 @@ svn_cl__log(apr_getopt_t *os,
   svn_opt_revision_t peg_revision;
   const char *true_path;
   apr_array_header_t *revprops;
+  apr_hash_t *ignored_props = NULL;
 
   if (!opt_state->xml)
     {
@@ -664,6 +665,13 @@ svn_cl__log(apr_getopt_t *os,
   lb.merge_stack = apr_array_make(pool, 0, sizeof(svn_revnum_t));
   lb.pool = pool;
 
+  if (opt_state->ignore_mergeinfo)
+    {
+      ignored_props = apr_hash_make(pool);
+      apr_hash_set(ignored_props, SVN_PROP_MERGEINFO, APR_HASH_KEY_STRING,
+                   (void *) 0xdeadbeef);
+    }
+
   if (opt_state->xml)
     {
       /* If output is not incremental, output the XML header and wrap
@@ -713,7 +721,7 @@ svn_cl__log(apr_getopt_t *os,
                               opt_state->verbose,
                               opt_state->stop_on_copy,
                               opt_state->use_merge_history,
-                              opt_state->ignore_mergeinfo,
+                              ignored_props,
                               revprops,
                               log_entry_receiver_xml,
                               &lb,
@@ -737,7 +745,7 @@ svn_cl__log(apr_getopt_t *os,
                               opt_state->verbose,
                               opt_state->stop_on_copy,
                               opt_state->use_merge_history,
-                              opt_state->ignore_mergeinfo,
+                              ignored_props,
                               revprops,
                               log_entry_receiver,
                               &lb,



Re: svn commit: r1063375 - in /subversion/branches/ignore-mergeinfo-log/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/log.c svn/log-cmd.c

Posted by Philip Martin <ph...@wandisco.com>.
hwright@apache.org writes:

> Author: hwright
> Date: Tue Jan 25 17:46:38 2011
> New Revision: 1063375
>
> @@ -2341,8 +2341,9 @@ svn_client_status(svn_revnum_t *result_r
>   * If @a include_merged_revisions is set, log information for revisions
>   * which have been merged to @a targets will also be returned.
>   *
> - * If @a ignore_mergeinfo_changes is set, log will ignore any changes to
> - * the svn:mergeinfo property when determining which revisions to return.
> + * @a ignore_prop_mods is an optional hash of property names.  If
> + * non-NULL, log will ignore any changes to properties names as the keys
> + * of the hash when determining which revisions to return.

This should describe the C types used in the hash.

>   *
>   * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
>   * revprops named in the array (i.e. retrieve none if the array is empty).
> @@ -2369,7 +2370,7 @@ svn_client_log6(const apr_array_header_t
>                  svn_boolean_t discover_changed_paths,
>                  svn_boolean_t strict_node_history,
>                  svn_boolean_t include_merged_revisions,
> -                svn_boolean_t ignore_mergeinfo_changes,
> +                const apr_hash_t *ignore_prop_mods,
>                  const apr_array_header_t *revprops,
>                  svn_log_entry_receiver_t receiver,
>                  void *receiver_baton,
>

-- 
Philip