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/04/06 19:08:16 UTC

svn commit: r1089536 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Author: hwright
Date: Wed Apr  6 17:08:16 2011
New Revision: 1089536

URL: http://svn.apache.org/viewvc?rev=1089536&view=rev
Log:
When removing changelists, remove any empty ACTUAL nodes that resulted.

* subversion/libsvn_wc/wc_db.c
  (set_changelist_txn): Remove any empty actual nodes resulting from a removed
    changelist.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1089536&r1=1089535&r2=1089536&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed Apr  6 17:08:16 2011
@@ -3400,6 +3400,16 @@ set_changelist_txn(void *baton,
                             new_changelist));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
+  if (new_changelist == NULL)
+    {
+     /* When removing a changelist, we may have left an empty ACTUAL node, so
+        remove it.  */
+      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+                                        STMT_DELETE_ACTUAL_EMPTY));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+      SVN_ERR(svn_sqlite__step_done(stmt));
+    }
+
   /* Now, add a row to the CHANGELIST_LIST table, so we can later notify. */
   /* ### TODO: This could just as well be done with a trigger, but for right
      ### now, this is quick and dirty. */