subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1428629 - /subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c
Date Thu, 03 Jan 2013 22:01:37 GMT
Author: cmpilato
Date: Thu Jan  3 22:01:36 2013
New Revision: 1428629

URL: http://svn.apache.org/viewvc?rev=1428629&view=rev
Log:
On the 'issue-3348-dev' branch, make `svn commit --cl ""` commit all
files not assigned to a changelist.

* subversion/libsvn_client/commit_util.c
  (harvest_status_callback): Handle the special-casing of the
    empty-string changelist name, taking care not to include directories
    in the list of committables which match that changelist filter.

Modified:
    subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c

Modified: subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c?rev=1428629&r1=1428628&r2=1428629&view=diff
==============================================================================
--- subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/issue-3348-dev/subversion/libsvn_client/commit_util.c Thu Jan  3 22:01:36
2013
@@ -636,11 +636,35 @@ harvest_status_callback(void *status_bat
                  || (! copy_mode && ! commit_relpath));
   SVN_ERR_ASSERT((copy_mode_root && copy_mode) || ! copy_mode_root);
 
-  /* Save the result for reuse. */
-  matches_changelists = ((changelists == NULL)
-                         || (status->changelist != NULL
-                             && apr_hash_get(changelists, status->changelist,
-                                             APR_HASH_KEY_STRING) != NULL));
+  /* Determine if this node match our changelist filter (if any). 
+
+     ### As in libsvn_client/status.c and libsvn_wc/diff_local.c, we
+     ### don't allow directories to match changelists, even the
+     ### special empty-string changelist name. */
+  if (changelists == NULL)
+    {
+      matches_changelists = TRUE;
+    }
+  else if (status->kind == svn_node_dir)
+    {
+      matches_changelists = FALSE;
+    }
+  else
+    {
+      matches_changelists = FALSE;
+      if (status->changelist)
+        {
+          if (apr_hash_get(changelists, status->changelist,
+                           APR_HASH_KEY_STRING) != NULL)
+            matches_changelists = TRUE;
+        }
+      else
+        {
+          if (apr_hash_get(changelists, "",
+                           APR_HASH_KEY_STRING) != NULL)
+            matches_changelists = TRUE;
+        }
+    }
 
   /* Early exit. */
   if (status->kind != svn_node_dir && ! matches_changelists)



Mime
View raw message