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/05/02 21:56:45 UTC

svn commit: r1098768 - /subversion/trunk/subversion/libsvn_wc/adm_ops.c

Author: hwright
Date: Mon May  2 19:56:45 2011
New Revision: 1098768

URL: http://svn.apache.org/viewvc?rev=1098768&view=rev
Log:
Fix a couple of swig-rb changelist tests that have been failing since
r1096847.  I'm not quite sure why we have to apply the changelist filter a
second time in this context, but I figure we can worry about that after we
get the tests passing.

* subversion/libsvn_wc/adm_ops.c
  (get_cl_fn_baton): Add clhash member.
  (get_node_changelist): Perform additional changelist filtering.
  (svn_wc_get_changelists): Populate the clhash.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_ops.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1098768&r1=1098767&r2=1098768&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Mon May  2 19:56:45 2011
@@ -2420,6 +2420,7 @@ svn_wc__set_file_external_location(svn_w
 struct get_cl_fn_baton
 {
   svn_wc__db_t *db;
+  apr_hash_t *clhash;
   svn_changelist_receiver_t callback_func;
   void *callback_baton;
 };
@@ -2441,8 +2442,10 @@ get_node_changelist(const char *local_ab
                                b->db, local_abspath,
                                scratch_pool, scratch_pool));
 
-  SVN_ERR(b->callback_func(b->callback_baton, local_abspath,
-                           changelist, scratch_pool));
+  if (svn_wc__internal_changelist_match(b->db, local_abspath, b->clhash,
+                                        scratch_pool))
+    SVN_ERR(b->callback_func(b->callback_baton, local_abspath,
+                             changelist, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -2459,7 +2462,12 @@ svn_wc_get_changelists(svn_wc_context_t 
                        void *cancel_baton,
                        apr_pool_t *scratch_pool)
 {
-  struct get_cl_fn_baton gnb = { wc_ctx->db, callback_func, callback_baton };
+  struct get_cl_fn_baton gnb = { wc_ctx->db, NULL,
+                                 callback_func, callback_baton };
+
+  if (changelists)
+    SVN_ERR(svn_hash_from_cstring_keys(&gnb.clhash, changelists,
+                                       scratch_pool));
 
   return svn_error_return(
     svn_wc__internal_walk_children(wc_ctx->db, local_abspath, FALSE,