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 2012/02/24 19:29:43 UTC

svn commit: r1293375 - /subversion/trunk/subversion/libsvn_repos/replay.c

Author: hwright
Date: Fri Feb 24 18:29:43 2012
New Revision: 1293375

URL: http://svn.apache.org/viewvc?rev=1293375&view=rev
Log:
When replaying revisions, actually send real prop changes, rather than "dummy"
ones.  This is a general correctness fix of an abuse of the delta editor, but
this change also fixes an Ev2 test failure.

Current number of Ev2 test failures: 5

* subversion/libsvn_repos/replay.c
  (path_drive_cb_func): Always send bona fide prop mods.

Modified:
    subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1293375&r1=1293374&r2=1293375&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Feb 24 18:29:43 2012
@@ -597,45 +597,31 @@ path_driver_cb_func(void **dir_baton,
     {
       if (change->prop_mod)
         {
-          if (cb->compare_root)
-            {
-              apr_array_header_t *prop_diffs;
-              apr_hash_t *old_props;
-              apr_hash_t *new_props;
-              int i;
-
-              if (source_root)
-                SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
-                                             source_fspath, pool));
-              else
-                old_props = apr_hash_make(pool);
-
-              SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path, pool));
-
-              SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
-                                     pool));
-
-              for (i = 0; i < prop_diffs->nelts; ++i)
-                {
-                  svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
-                   if (change->node_kind == svn_node_dir)
-                     SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
-                                                     pc->value, pool));
-                   else if (change->node_kind == svn_node_file)
-                     SVN_ERR(editor->change_file_prop(file_baton, pc->name,
-                                                      pc->value, pool));
-                }
-            }
+          apr_array_header_t *prop_diffs;
+          apr_hash_t *old_props;
+          apr_hash_t *new_props;
+          int i;
+
+          if (source_root)
+            SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
+                                         source_fspath, pool));
           else
+            old_props = apr_hash_make(pool);
+
+          SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path, pool));
+
+          SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
+                                 pool));
+
+          for (i = 0; i < prop_diffs->nelts; ++i)
             {
-              /* Just do a dummy prop change to signal that there are *any*
-                 propmods. */
-              if (change->node_kind == svn_node_dir)
-                SVN_ERR(editor->change_dir_prop(*dir_baton, "", NULL,
-                                                pool));
-              else if (change->node_kind == svn_node_file)
-                SVN_ERR(editor->change_file_prop(file_baton, "", NULL,
-                                                 pool));
+              svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
+               if (change->node_kind == svn_node_dir)
+                 SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
+                                                 pc->value, pool));
+               else if (change->node_kind == svn_node_file)
+                 SVN_ERR(editor->change_file_prop(file_baton, pc->name,
+                                                  pc->value, pool));
             }
         }
 



RE: svn commit: r1293375 - /subversion/trunk/subversion/libsvn_repos/replay.c

Posted by Bert Huijben <be...@qqmail.nl>.
Note that this is not really an abuse of the delta editor. This is the
documented behavior of both this replay editor and the ra call behind 'svn
status -u': sending limited changes instead of full changes

 

Sending full results to both of them would be a major performance issue.

(I haven't verified if the same change was applied there)

 

                Bert

 

From: bert@qqmail.nl [mailto:bert@qqmail.nl] On Behalf Of Bert Huijben
Sent: dinsdag 14 mei 2013 18:05
To: dev@subversion.apache.org
Cc: commits@subversion.apache.org
Subject: Re: svn commit: r1293375 -
/subversion/trunk/subversion/libsvn_repos/replay.c

 

This change breaks the api contract of svn_ra_replay_range()

* If @a send_deltas is @c TRUE, the actual text and property changes in

* the revision will be sent, otherwise dummy text deltas and NULL property

* changes will be sent instead.

   Bert

On Fri, Feb 24, 2012 at 7:29 PM, <hwright@apache.org
<ma...@apache.org> > wrote:

Author: hwright
Date: Fri Feb 24 18:29:43 2012
New Revision: 1293375

URL: http://svn.apache.org/viewvc?rev=1293375
<http://svn.apache.org/viewvc?rev=1293375&view=rev> &view=rev
Log:
When replaying revisions, actually send real prop changes, rather than
"dummy"
ones.  This is a general correctness fix of an abuse of the delta editor,
but
this change also fixes an Ev2 test failure.

Current number of Ev2 test failures: 5

* subversion/libsvn_repos/replay.c
  (path_drive_cb_func): Always send bona fide prop mods.

Modified:
    subversion/trunk/subversion/libsvn_repos/replay.c

Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay
.c?rev=1293375
<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repla
y.c?rev=1293375&r1=1293374&r2=1293375&view=diff>
&r1=1293374&r2=1293375&view=diff
============================================================================
==
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Feb 24 18:29:43
2012
@@ -597,45 +597,31 @@ path_driver_cb_func(void **dir_baton,
     {
       if (change->prop_mod)
         {
-          if (cb->compare_root)
-            {
-              apr_array_header_t *prop_diffs;
-              apr_hash_t *old_props;
-              apr_hash_t *new_props;
-              int i;
-
-              if (source_root)
-                SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
-                                             source_fspath, pool));
-              else
-                old_props = apr_hash_make(pool);
-
-              SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path,
pool));
-
-              SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
-                                     pool));
-
-              for (i = 0; i < prop_diffs->nelts; ++i)
-                {
-                  svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i,
svn_prop_t);
-                   if (change->node_kind == svn_node_dir)
-                     SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
-                                                     pc->value, pool));
-                   else if (change->node_kind == svn_node_file)
-                     SVN_ERR(editor->change_file_prop(file_baton, pc->name,
-                                                      pc->value, pool));
-                }
-            }
+          apr_array_header_t *prop_diffs;
+          apr_hash_t *old_props;
+          apr_hash_t *new_props;
+          int i;
+
+          if (source_root)
+            SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
+                                         source_fspath, pool));
           else
+            old_props = apr_hash_make(pool);
+
+          SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path, pool));
+
+          SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
+                                 pool));
+
+          for (i = 0; i < prop_diffs->nelts; ++i)
             {
-              /* Just do a dummy prop change to signal that there are *any*
-                 propmods. */
-              if (change->node_kind == svn_node_dir)
-                SVN_ERR(editor->change_dir_prop(*dir_baton, "", NULL,
-                                                pool));
-              else if (change->node_kind == svn_node_file)
-                SVN_ERR(editor->change_file_prop(file_baton, "", NULL,
-                                                 pool));
+              svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
+               if (change->node_kind == svn_node_dir)
+                 SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
+                                                 pc->value, pool));
+               else if (change->node_kind == svn_node_file)
+                 SVN_ERR(editor->change_file_prop(file_baton, pc->name,
+                                                  pc->value, pool));
             }
         }




 


Re: svn commit: r1293375 - /subversion/trunk/subversion/libsvn_repos/replay.c

Posted by Bert Huijben <be...@vmoo.com>.
This change breaks the api contract of svn_ra_replay_range()

* If @a send_deltas is @c TRUE, the actual text and property changes in

* the revision will be sent, otherwise dummy text deltas and NULL property

* changes will be sent instead.

   Bert
On Fri, Feb 24, 2012 at 7:29 PM, <hw...@apache.org> wrote:

> Author: hwright
> Date: Fri Feb 24 18:29:43 2012
> New Revision: 1293375
>
> URL: http://svn.apache.org/viewvc?rev=1293375&view=rev
> Log:
> When replaying revisions, actually send real prop changes, rather than
> "dummy"
> ones.  This is a general correctness fix of an abuse of the delta editor,
> but
> this change also fixes an Ev2 test failure.
>
> Current number of Ev2 test failures: 5
>
> * subversion/libsvn_repos/replay.c
>   (path_drive_cb_func): Always send bona fide prop mods.
>
> Modified:
>     subversion/trunk/subversion/libsvn_repos/replay.c
>
> Modified: subversion/trunk/subversion/libsvn_repos/replay.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1293375&r1=1293374&r2=1293375&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_repos/replay.c (original)
> +++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Feb 24 18:29:43
> 2012
> @@ -597,45 +597,31 @@ path_driver_cb_func(void **dir_baton,
>      {
>        if (change->prop_mod)
>          {
> -          if (cb->compare_root)
> -            {
> -              apr_array_header_t *prop_diffs;
> -              apr_hash_t *old_props;
> -              apr_hash_t *new_props;
> -              int i;
> -
> -              if (source_root)
> -                SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
> -                                             source_fspath, pool));
> -              else
> -                old_props = apr_hash_make(pool);
> -
> -              SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path,
> pool));
> -
> -              SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
> -                                     pool));
> -
> -              for (i = 0; i < prop_diffs->nelts; ++i)
> -                {
> -                  svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i,
> svn_prop_t);
> -                   if (change->node_kind == svn_node_dir)
> -                     SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
> -                                                     pc->value, pool));
> -                   else if (change->node_kind == svn_node_file)
> -                     SVN_ERR(editor->change_file_prop(file_baton,
> pc->name,
> -                                                      pc->value, pool));
> -                }
> -            }
> +          apr_array_header_t *prop_diffs;
> +          apr_hash_t *old_props;
> +          apr_hash_t *new_props;
> +          int i;
> +
> +          if (source_root)
> +            SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
> +                                         source_fspath, pool));
>            else
> +            old_props = apr_hash_make(pool);
> +
> +          SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path,
> pool));
> +
> +          SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
> +                                 pool));
> +
> +          for (i = 0; i < prop_diffs->nelts; ++i)
>              {
> -              /* Just do a dummy prop change to signal that there are
> *any*
> -                 propmods. */
> -              if (change->node_kind == svn_node_dir)
> -                SVN_ERR(editor->change_dir_prop(*dir_baton, "", NULL,
> -                                                pool));
> -              else if (change->node_kind == svn_node_file)
> -                SVN_ERR(editor->change_file_prop(file_baton, "", NULL,
> -                                                 pool));
> +              svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
> +               if (change->node_kind == svn_node_dir)
> +                 SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
> +                                                 pc->value, pool));
> +               else if (change->node_kind == svn_node_file)
> +                 SVN_ERR(editor->change_file_prop(file_baton, pc->name,
> +                                                  pc->value, pool));
>              }
>          }
>
>
>
>

Re: svn commit: r1293375 - /subversion/trunk/subversion/libsvn_repos/replay.c

Posted by Bert Huijben <be...@vmoo.com>.
This change breaks the api contract of svn_ra_replay_range()

* If @a send_deltas is @c TRUE, the actual text and property changes in

* the revision will be sent, otherwise dummy text deltas and NULL property

* changes will be sent instead.

   Bert
On Fri, Feb 24, 2012 at 7:29 PM, <hw...@apache.org> wrote:

> Author: hwright
> Date: Fri Feb 24 18:29:43 2012
> New Revision: 1293375
>
> URL: http://svn.apache.org/viewvc?rev=1293375&view=rev
> Log:
> When replaying revisions, actually send real prop changes, rather than
> "dummy"
> ones.  This is a general correctness fix of an abuse of the delta editor,
> but
> this change also fixes an Ev2 test failure.
>
> Current number of Ev2 test failures: 5
>
> * subversion/libsvn_repos/replay.c
>   (path_drive_cb_func): Always send bona fide prop mods.
>
> Modified:
>     subversion/trunk/subversion/libsvn_repos/replay.c
>
> Modified: subversion/trunk/subversion/libsvn_repos/replay.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1293375&r1=1293374&r2=1293375&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_repos/replay.c (original)
> +++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Feb 24 18:29:43
> 2012
> @@ -597,45 +597,31 @@ path_driver_cb_func(void **dir_baton,
>      {
>        if (change->prop_mod)
>          {
> -          if (cb->compare_root)
> -            {
> -              apr_array_header_t *prop_diffs;
> -              apr_hash_t *old_props;
> -              apr_hash_t *new_props;
> -              int i;
> -
> -              if (source_root)
> -                SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
> -                                             source_fspath, pool));
> -              else
> -                old_props = apr_hash_make(pool);
> -
> -              SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path,
> pool));
> -
> -              SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
> -                                     pool));
> -
> -              for (i = 0; i < prop_diffs->nelts; ++i)
> -                {
> -                  svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i,
> svn_prop_t);
> -                   if (change->node_kind == svn_node_dir)
> -                     SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
> -                                                     pc->value, pool));
> -                   else if (change->node_kind == svn_node_file)
> -                     SVN_ERR(editor->change_file_prop(file_baton,
> pc->name,
> -                                                      pc->value, pool));
> -                }
> -            }
> +          apr_array_header_t *prop_diffs;
> +          apr_hash_t *old_props;
> +          apr_hash_t *new_props;
> +          int i;
> +
> +          if (source_root)
> +            SVN_ERR(svn_fs_node_proplist(&old_props, source_root,
> +                                         source_fspath, pool));
>            else
> +            old_props = apr_hash_make(pool);
> +
> +          SVN_ERR(svn_fs_node_proplist(&new_props, root, edit_path,
> pool));
> +
> +          SVN_ERR(svn_prop_diffs(&prop_diffs, new_props, old_props,
> +                                 pool));
> +
> +          for (i = 0; i < prop_diffs->nelts; ++i)
>              {
> -              /* Just do a dummy prop change to signal that there are
> *any*
> -                 propmods. */
> -              if (change->node_kind == svn_node_dir)
> -                SVN_ERR(editor->change_dir_prop(*dir_baton, "", NULL,
> -                                                pool));
> -              else if (change->node_kind == svn_node_file)
> -                SVN_ERR(editor->change_file_prop(file_baton, "", NULL,
> -                                                 pool));
> +              svn_prop_t *pc = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
> +               if (change->node_kind == svn_node_dir)
> +                 SVN_ERR(editor->change_dir_prop(*dir_baton, pc->name,
> +                                                 pc->value, pool));
> +               else if (change->node_kind == svn_node_file)
> +                 SVN_ERR(editor->change_file_prop(file_baton, pc->name,
> +                                                  pc->value, pool));
>              }
>          }
>
>
>
>