You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/10 13:12:08 UTC

svn commit: r983929 - in /subversion/branches/atomic-revprop: ./ notes/ subversion/bindings/javahl/native/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_wc/ subversion/svn/ subversion/svnsync/ subversion/tests/cmdline/

Author: danielsh
Date: Tue Aug 10 11:12:07 2010
New Revision: 983929

URL: http://svn.apache.org/viewvc?rev=983929&view=rev
Log:
On the 'atomic-revprop' branch, merge r983274 through r983925 from trunk.

Added:
    subversion/branches/atomic-revprop/subversion/libsvn_wc/cleanup.c
      - copied unchanged from r983925, subversion/trunk/subversion/libsvn_wc/cleanup.c
Removed:
    subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h
Modified:
    subversion/branches/atomic-revprop/   (props changed)
    subversion/branches/atomic-revprop/notes/   (props changed)
    subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/atomic-revprop/subversion/include/svn_wc.h
    subversion/branches/atomic-revprop/subversion/libsvn_client/repos_diff.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/merge.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/upgrade.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.h
    subversion/branches/atomic-revprop/subversion/svn/propedit-cmd.c
    subversion/branches/atomic-revprop/subversion/svnsync/main.c
    subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py

Propchange: subversion/branches/atomic-revprop/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 10 11:12:07 2010
@@ -34,4 +34,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:965046-983273
+/subversion/trunk:965046-983925

Propchange: subversion/branches/atomic-revprop/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 10 11:12:07 2010
@@ -35,4 +35,4 @@
 /subversion/branches/tc_url_rev/notes:874351-874483
 /subversion/branches/tree-conflicts/notes:868291-873154
 /subversion/branches/tree-conflicts-notify/notes:873926-874008
-/subversion/trunk/notes:965046-983273
+/subversion/trunk/notes:965046-983925

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/native/SVNClient.cpp Tue Aug 10 11:12:07 2010
@@ -68,6 +68,52 @@
 #include <iostream>
 #include <sstream>
 
+class CommitNotifier
+{
+  public:
+    CommitNotifier(SVN::Pool &inPool)
+        : pool(inPool), info(NULL)
+    {
+        ;
+    }
+
+    static svn_error_t *callback(const svn_commit_info_t *commit_info,
+                                 void *baton,
+                                 apr_pool_t *pool)
+    {
+      if (baton)
+        return ((CommitNotifier *)baton)->stashInfo(commit_info);
+
+      return SVN_NO_ERROR;
+    }
+
+    long getRevnum()
+    {
+        if (info && SVN_IS_VALID_REVNUM(info->revision))
+            return info->revision;
+
+        return SVN_INVALID_REVNUM;
+    }
+
+    /* Special operator new to allocate this thing in a pool. */
+    void * operator new(size_t sz, SVN::Pool &pool)
+    {
+        void *ptr = apr_pcalloc(pool.pool(), sizeof(CommitNotifier));
+        return ptr;
+    }
+
+  protected:
+    svn_error_t *stashInfo(const svn_commit_info_t *commit_info)
+    {
+        info = svn_commit_info_dup(commit_info, pool.pool());
+        return SVN_NO_ERROR;
+    }
+
+  private:
+    SVN::Pool &pool;
+    svn_commit_info_t *info;
+};
+
 struct log_msg_baton
 {
     const char *message;
@@ -314,7 +360,6 @@ void SVNClient::setProgressListener(Prog
 void SVNClient::remove(Targets &targets, const char *message, bool force,
                        bool keep_local, RevpropTable &revprops)
 {
-    svn_commit_info_t *commit_info = NULL;
     SVN::Pool requestPool;
     svn_client_ctx_t *ctx = getContext(message);
     if (ctx == NULL)
@@ -323,7 +368,7 @@ void SVNClient::remove(Targets &targets,
     const apr_array_header_t *targets2 = targets.array(requestPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
-    SVN_JNI_ERR(svn_client_delete3(&commit_info, targets2, force, keep_local,
+    SVN_JNI_ERR(svn_client_delete4(targets2, force, keep_local,
                                    revprops.hash(requestPool), ctx,
                                    requestPool.pool()), );
 }
@@ -411,24 +456,20 @@ jlong SVNClient::commit(Targets &targets
                         StringArray &changelists, RevpropTable &revprops)
 {
     SVN::Pool requestPool;
-    svn_commit_info_t *commit_info = NULL;
     const apr_array_header_t *targets2 = targets.array(requestPool);
     SVN_JNI_ERR(targets.error_occured(), -1);
     svn_client_ctx_t *ctx = getContext(message);
     if (ctx == NULL)
         return SVN_INVALID_REVNUM;
 
-    SVN_JNI_ERR(svn_client_commit4(&commit_info, targets2, depth,
+    SVN_JNI_ERR(svn_client_commit5(targets2, depth,
                                    noUnlock, keepChangelist,
                                    changelists.array(requestPool),
                                    revprops.hash(requestPool), ctx,
                                    requestPool.pool()),
                 SVN_INVALID_REVNUM);
 
-    if (commit_info && SVN_IS_VALID_REVNUM(commit_info->revision))
-        return commit_info->revision;
-
-    return SVN_INVALID_REVNUM;
+    return ((CommitNotifier *)ctx->commit_baton)->getRevnum();
 }
 
 void SVNClient::copy(CopySources &copySources, const char *destPath,
@@ -452,8 +493,7 @@ void SVNClient::copy(CopySources &copySo
     if (ctx == NULL)
         return;
 
-    svn_commit_info_t *commit_info;
-    SVN_JNI_ERR(svn_client_copy5(&commit_info, srcs, destinationPath.c_str(),
+    SVN_JNI_ERR(svn_client_copy6(srcs, destinationPath.c_str(),
                                  copyAsChild, makeParents, ignoreExternals,
                                  revprops.hash(requestPool), ctx,
                                  requestPool.pool()), );
@@ -475,8 +515,7 @@ void SVNClient::move(Targets &srcPaths, 
     if (ctx == NULL)
         return;
 
-    svn_commit_info_t *commit_info;
-    SVN_JNI_ERR(svn_client_move5(&commit_info, (apr_array_header_t *) srcs,
+    SVN_JNI_ERR(svn_client_move6((apr_array_header_t *) srcs,
                                  destinationPath.c_str(), force, moveAsChild,
                                  makeParents, revprops.hash(requestPool), ctx,
                                  requestPool.pool()), );
@@ -486,7 +525,6 @@ void SVNClient::mkdir(Targets &targets, 
                       RevpropTable &revprops)
 {
     SVN::Pool requestPool;
-    svn_commit_info_t *commit_info = NULL;
     svn_client_ctx_t *ctx = getContext(message);
     if (ctx == NULL)
         return;
@@ -494,7 +532,7 @@ void SVNClient::mkdir(Targets &targets, 
     const apr_array_header_t *targets2 = targets.array(requestPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
-    SVN_JNI_ERR(svn_client_mkdir3(&commit_info, targets2, makeParents,
+    SVN_JNI_ERR(svn_client_mkdir4(targets2, makeParents,
                                   revprops.hash(requestPool), ctx,
                                   requestPool.pool()), );
 }
@@ -606,14 +644,12 @@ void SVNClient::doImport(const char *pat
     Path intUrl(url);
     SVN_JNI_ERR(intUrl.error_occured(), );
 
-    svn_commit_info_t *commit_info = NULL;
     svn_client_ctx_t *ctx = getContext(message);
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_import3(&commit_info, intPath.c_str(),
-                                   intUrl.c_str(), depth, noIgnore,
-                                   ignoreUnknownNodeTypes,
+    SVN_JNI_ERR(svn_client_import4(intPath.c_str(), intUrl.c_str(), depth,
+                                   noIgnore, ignoreUnknownNodeTypes,
                                    revprops.hash(requestPool), ctx,
                                    requestPool.pool()), );
 }
@@ -932,7 +968,6 @@ void SVNClient::propertySet(const char *
     else
       val = svn_string_create(value, requestPool.pool());
 
-    svn_commit_info_t *commit_info = NULL;
     Path intPath(path);
     SVN_JNI_ERR(intPath.error_occured(), );
 
@@ -940,7 +975,7 @@ void SVNClient::propertySet(const char *
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_propset3(&commit_info, name, val, intPath.c_str(),
+    SVN_JNI_ERR(svn_client_propset4(name, val, intPath.c_str(),
                                     depth, force, SVN_INVALID_REVNUM,
                                     changelists.array(requestPool),
                                     revprops.hash(requestPool),
@@ -1144,7 +1179,8 @@ SVNClient::diffSummarize(const char *tar
 
 svn_client_ctx_t *SVNClient::getContext(const char *message)
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+    SVN::Pool *requestPool = JNIUtil::getRequestPool();
+    apr_pool_t *pool = requestPool->pool();
     svn_auth_baton_t *ab;
     svn_client_ctx_t *ctx;
     SVN_JNI_ERR(svn_client_create_context(&ctx, pool), NULL);
@@ -1240,6 +1276,9 @@ svn_client_ctx_t *SVNClient::getContext(
     ctx->progress_func = ProgressListener::progress;
     ctx->progress_baton = m_progressListener;
 
+    ctx->commit_callback2 = CommitNotifier::callback;
+    ctx->commit_baton = new (*requestPool) CommitNotifier(*requestPool);
+
     if (m_conflictResolver)
     {
         ctx->conflict_func = ConflictResolverCallback::resolveConflict;

Modified: subversion/branches/atomic-revprop/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_wc.h?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_wc.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_wc.h Tue Aug 10 11:12:07 2010
@@ -7041,15 +7041,17 @@ svn_wc_create_tmp_file(apr_file_t **fp,
  * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
  * if @c SVN_WC_TRANSLATE_FROM_NF is specified.
  *
- * Output files are created in the temp file area belonging to
- * @a versioned_file.  By default they will be deleted at pool cleanup.
- *
- * If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the default
- * pool cleanup handler to remove @a *xlated_path is not registered.
+ * If a new output file is created, it is created in the temp file area
+ * belonging to @a versioned_file.  By default it will be deleted at pool
+ * cleanup.  If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the
+ * default pool cleanup handler to remove @a *xlated_path is not registered.
+ * If the input file is returned as the output, its lifetime is not
+ * specified.
  *
  * If an error is returned, the effect on @a *xlated_path is undefined.
  *
  * @since New in 1.4
+ * @deprecated Provided for compatibility with the 1.6 API
  */
 SVN_DEPRECATED
 svn_error_t *
@@ -7090,6 +7092,7 @@ svn_wc_translated_file(const char **xlat
  * svn_wc_translated_file().
  *
  * @since New in 1.5.
+ * @deprecated Provided for compatibility with the 1.6 API.
  */
 SVN_DEPRECATED
 svn_error_t *

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/repos_diff.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/repos_diff.c Tue Aug 10 11:12:07 2010
@@ -89,6 +89,17 @@ struct edit_baton {
   svn_wc_notify_func2_t notify_func;
   void *notify_baton;
 
+  /* TRUE if the operation needs to walk deleted dirs on the "old" side.
+     FALSE otherwise. */
+  svn_boolean_t walk_deleted_repos_dirs;
+
+  /* A callback used to see if the client wishes to cancel the running
+     operation. */
+  svn_cancel_func_t cancel_func;
+
+  /* A baton to pass to the cancellation callback. */
+  void *cancel_baton;
+
   apr_pool_t *pool;
 };
 
@@ -443,6 +454,90 @@ open_root(void *edit_baton,
   return SVN_NO_ERROR;
 }
 
+/* Recursively walk tree rooted at DIR (at REVISION) in the repository,
+ * reporting all files as deleted.  Part of a workaround for issue 2333.
+ *
+ * DIR is a repository path relative to the URL in RA_SESSION.  REVISION
+ * may be NULL, in which case it defaults to HEAD.  EDIT_BATON is the
+ * overall crawler editor baton.  If CANCEL_FUNC is not NULL, then it
+ * should refer to a cancellation function (along with CANCEL_BATON).
+ */
+/* ### TODO: Handle depth. */
+static svn_error_t *
+diff_deleted_dir(const char *dir,
+                 svn_revnum_t revision,
+                 svn_ra_session_t *ra_session,
+                 void *edit_baton,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
+                 apr_pool_t *pool)
+{
+  struct edit_baton *eb = edit_baton;
+  apr_hash_t *dirents;
+  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_hash_index_t *hi;
+
+  if (cancel_func)
+    SVN_ERR(cancel_func(cancel_baton));
+
+  SVN_ERR(svn_ra_get_dir2(ra_session,
+                          &dirents,
+                          NULL, NULL,
+                          dir,
+                          revision,
+                          SVN_DIRENT_KIND,
+                          pool));
+  
+  for (hi = apr_hash_first(pool, dirents); hi;
+       hi = apr_hash_next(hi))
+    {
+      const char *path;
+      const char *name = svn__apr_hash_index_key(hi);
+      svn_dirent_t *dirent = svn__apr_hash_index_val(hi);
+
+      svn_pool_clear(iterpool);
+
+      path = svn_relpath_join(dir, name, iterpool);
+
+      if (dirent->kind == svn_node_file)
+        {
+          struct file_baton *b;
+          const char *mimetype1, *mimetype2;
+          svn_wc_notify_state_t state = svn_wc_notify_state_inapplicable;
+          svn_boolean_t tree_conflicted = FALSE;
+
+          /* Compare a file being deleted against an empty file */
+          b = make_file_baton(path, FALSE, eb, iterpool);
+          SVN_ERR(get_file_from_ra(b, revision));
+
+          SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision)));
+      
+          get_file_mime_types(&mimetype1, &mimetype2, b);
+
+          SVN_ERR(eb->diff_callbacks->file_deleted
+                  (NULL, &state, &tree_conflicted, b->wcpath,
+                   b->path_start_revision,
+                   b->path_end_revision,
+                   mimetype1, mimetype2,
+                   b->pristine_props,
+                   b->edit_baton->diff_cmd_baton,
+                   pool));
+        }
+ 
+      if (dirent->kind == svn_node_dir)
+        SVN_ERR(diff_deleted_dir(path,
+                                 revision,
+                                 ra_session,
+                                 eb,
+                                 cancel_func,
+                                 cancel_baton,
+                                 iterpool));
+    }
+
+  svn_pool_destroy(iterpool);
+  return SVN_NO_ERROR;
+}
+
 /* An editor function.  */
 static svn_error_t *
 delete_entry(const char *path,
@@ -500,6 +595,20 @@ delete_entry(const char *path,
                     (local_dir_abspath, &state, &tree_conflicted,
                      svn_dirent_join(eb->target, path, pool),
                      eb->diff_cmd_baton, pool));
+ 
+            if (eb->walk_deleted_repos_dirs)
+              {
+                /* A workaround for issue 2333.  The "old" dir will be
+                skipped by the repository report.  Crawl it recursively,
+                diffing each file against the empty file. */
+                SVN_ERR(diff_deleted_dir(path,
+                                         eb->revision,
+                                         eb->ra_session,
+                                         eb,
+                                         eb->cancel_func,
+                                         eb->cancel_baton,
+                                         pool));
+              }
             break;
           }
         default:
@@ -1213,6 +1322,9 @@ svn_client__get_diff_editor(const char *
   eb->pool = subpool;
   eb->notify_func = notify_func;
   eb->notify_baton = notify_baton;
+  eb->walk_deleted_repos_dirs = TRUE;
+  eb->cancel_func = cancel_func;
+  eb->cancel_baton = cancel_baton;
 
   tree_editor->set_target_revision = set_target_revision;
   tree_editor->open_root = open_root;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_crawler.c Tue Aug 10 11:12:07 2010
@@ -146,6 +146,8 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
                                  _("The node '%s' can not be restored."),
                                  svn_dirent_local_style(local_abspath,
                                                         scratch_pool));
+      default:
+        break;
     }
 
   if (kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_symlink)

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c Tue Aug 10 11:12:07 2010
@@ -52,7 +52,6 @@
 #include "svn_sorts.h"
 
 #include "wc.h"
-#include "log.h"
 #include "adm_files.h"
 #include "entries.h"
 #include "lock.h"
@@ -248,6 +247,11 @@ svn_wc__process_committed_internal(svn_w
 {
   svn_wc__db_kind_t kind;
 
+  SVN_ERR_ASSERT((md5_checksum == NULL && sha1_checksum == NULL)
+                 || (md5_checksum != NULL && sha1_checksum != NULL
+                     && md5_checksum->kind == svn_checksum_md5
+                     && sha1_checksum->kind == svn_checksum_sha1));
+
   SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, TRUE, scratch_pool));
 
   SVN_ERR(process_committed_leaf(db, local_abspath, !top_of_recurse,
@@ -412,6 +416,10 @@ svn_wc_queue_committed3(svn_wc_committed
   committed_queue_item_t *cqi;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  SVN_ERR_ASSERT((md5_checksum == NULL && sha1_checksum == NULL)
+                 || (md5_checksum != NULL && sha1_checksum != NULL
+                     && md5_checksum->kind == svn_checksum_md5
+                     && sha1_checksum->kind == svn_checksum_sha1));
 
   queue->have_recursive |= recurse;
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c Tue Aug 10 11:12:07 2010
@@ -176,6 +176,9 @@ ambient_read_info(svn_boolean_t *hidden,
         case svn_wc__db_status_absent:
         case svn_wc__db_status_excluded:
           *hidden = TRUE;
+          break;
+        default:
+          break;
       }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/copy.c Tue Aug 10 11:12:07 2010
@@ -34,7 +34,6 @@
 #include "svn_path.h"
 
 #include "wc.h"
-#include "log.h"
 #include "workqueue.h"
 #include "adm_files.h"
 #include "props.h"

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c Tue Aug 10 11:12:07 2010
@@ -35,7 +35,6 @@
 #include "adm_files.h"
 #include "lock.h"
 #include "props.h"
-#include "log.h"
 #include "wc_db.h"
 
 #include "svn_private_config.h"
@@ -1775,13 +1774,14 @@ svn_wc__release_write_lock(svn_wc_contex
                            const char *local_abspath,
                            apr_pool_t *scratch_pool)
 {
-  svn_wc__db_kind_t kind;
-  apr_pool_t *iterpool;
-  const apr_array_header_t *children;
   apr_uint64_t id;
   svn_skel_t *work_item;
+#ifndef SVN_WC__SINGLE_DB
+  apr_pool_t *iterpool;
+  const apr_array_header_t *children;
   svn_boolean_t locked_here;
   int i;
+#endif
 
 #ifndef SVN_WC__SINGLE_DB
   SVN_ERR(svn_wc__db_wclock_owns_lock(&locked_here, wc_ctx->db, local_abspath,
@@ -1818,6 +1818,7 @@ svn_wc__release_write_lock(svn_wc_contex
     {
       const char *child_relpath = APR_ARRAY_IDX(children, i, const char *);
       const char *child_abspath;
+      svn_wc__db_kind_t kind;
 
       svn_pool_clear(iterpool);
       child_abspath = svn_dirent_join(local_abspath, child_relpath, iterpool);

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/merge.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/merge.c Tue Aug 10 11:12:07 2010
@@ -30,7 +30,6 @@
 #include "wc.h"
 #include "adm_files.h"
 #include "translate.h"
-#include "log.h"
 #include "lock.h"
 #include "workqueue.h"
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c Tue Aug 10 11:12:07 2010
@@ -47,7 +47,6 @@
 #include "wc.h"
 #include "props.h"
 #include "entries.h"
-#include "log.h"
 #include "wc_db.h"
 
 #include "svn_private_config.h"

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/props.c Tue Aug 10 11:12:07 2010
@@ -52,7 +52,6 @@
 #include "private/svn_skel.h"
 
 #include "wc.h"
-#include "log.h"
 #include "adm_files.h"
 #include "props.h"
 #include "translate.h"

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c Tue Aug 10 11:12:07 2010
@@ -48,7 +48,6 @@
 #include "svn_iter.h"
 
 #include "wc.h"
-#include "log.h"
 #include "adm_files.h"
 #include "entries.h"
 #include "lock.h"
@@ -1390,36 +1389,6 @@ open_root(void *edit_baton,
 }
 
 
-/* Helper for delete_entry() and do_entry_deletion().
-
-   If the error chain ERR contains evidence that a local mod was left
-   (an SVN_ERR_WC_LEFT_LOCAL_MOD error), clear ERR.  Otherwise, return ERR.
-*/
-static svn_error_t *
-leftmod_error_chain(svn_error_t *err)
-{
-  svn_error_t *tmp_err;
-
-  if (! err)
-    return SVN_NO_ERROR;
-
-  /* Advance TMP_ERR to the part of the error chain that reveals that
-     a local mod was left, or to the NULL end of the chain. */
-  for (tmp_err = err; tmp_err; tmp_err = tmp_err->child)
-    if (tmp_err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD)
-      {
-        /* We just found a "left a local mod" error, so tolerate it
-           and clear the whole error. In that case we continue with
-           modified files left on the disk. */
-        svn_error_clear(err);
-        return SVN_NO_ERROR;
-      }
-
-  /* Otherwise, we just return our top-most error. */
-  return err;
-}
-
-
 /* ===================================================================== */
 /* Checking for local modifications. */
 
@@ -2166,16 +2135,16 @@ do_entry_deletion(struct edit_baton *eb,
         {
           /* The item exists locally and has some sort of local mod.
            * It no longer exists in the repository at its target URL@REV.
-           * (### If its WC parent was not updated similarly, then it needs to
-           * be marked 'deleted' in its WC parent.)
+           *
            * To prepare the "accept mine" resolution for the tree conflict,
            * we must schedule the existing content for re-addition as a copy
            * of what it was, but with its local modifications preserved. */
 
-          SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
+          SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, FALSE,
                                                pool));
 
-          return SVN_NO_ERROR;
+          /* Fall through to remove the BASE_NODEs properly, with potentially
+             keeping a not-present marker */
         }
       else if (tree_conflict->reason == svn_wc_conflict_reason_deleted)
         {
@@ -2190,28 +2159,18 @@ do_entry_deletion(struct edit_baton *eb,
         {
           /* The item was locally replaced with something else. We should
            * remove the BASE node below the new working node, which turns
-           * the replacement in an addition.
-           */
-
-          /* ### This does something similar, but not exactly what is
-             ### required: Copy working to working and then delete
-             ### BASE_NODE. Not exactly right, but not
-             ### completely wrong as the result is the same.
-
-             ### It only misses the explicit target check for adding
-             ### back a not-present node. */
-          SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
-                                               pool));
-
-          return SVN_NO_ERROR;
+           * the replacement in an addition. */
+           
+           /* Fall through to the normal "delete" code path. */
         }
       else
         SVN_ERR_MALFUNCTION();  /* other reasons are not expected here */
     }
 
-  /* Issue a loggy command to delete the entry from version control and to
-     delete it from disk if unmodified, but leave any modified files on disk
-     unversioned.
+  /* Issue a wq operation to delete the BASE_NODE data and to delete actual
+     nodes based on that from disk, but leave any WORKING_NODEs on disk.
+
+     Local modifications are already turned into copies at this point.
 
      If the thing being deleted is the *target* of this update, then
      we need to recreate a 'deleted' entry, so that the parent can give
@@ -2219,58 +2178,21 @@ do_entry_deletion(struct edit_baton *eb,
   if (strcmp(local_abspath, eb->target_abspath) != 0)
     {
       /* Delete, and do not leave a not-present node.  */
-      SVN_ERR(svn_wc__loggy_delete_entry(&work_item,
-                                         eb->db, dir_abspath, local_abspath,
-                                         SVN_INVALID_REVNUM,
-                                         svn_wc__db_kind_unknown,
-                                         pool));
+      SVN_ERR(svn_wc__wq_build_base_remove(&work_item,
+                                           eb->db, local_abspath, FALSE,
+                                           pool, pool));
       SVN_ERR(svn_wc__db_wq_add(eb->db, dir_abspath, work_item, pool));
     }
   else
     {
       /* Delete, leaving a not-present node.  */
-      SVN_ERR(svn_wc__loggy_delete_entry(&work_item,
-                                         eb->db, dir_abspath, local_abspath,
-                                         *eb->target_revision,
-                                         kind,
-                                         pool));
+      SVN_ERR(svn_wc__wq_build_base_remove(&work_item,
+                                           eb->db, local_abspath, TRUE,
+                                           pool, pool));
       SVN_ERR(svn_wc__db_wq_add(eb->db, dir_abspath, work_item, pool));
       eb->target_deleted = TRUE;
     }
 
-  if (eb->switch_relpath)
-    {
-      /* The SVN_WC__LOG_DELETE_ENTRY log item will cause
-       * svn_wc_remove_from_revision_control() to be run.  But that
-       * function checks whether the deletion target's URL is child of
-       * its parent directory's URL, and if it's not, then the entry
-       * in parent won't be deleted (because presumably the child
-       * represents a disjoint working copy, i.e., it is a wc_root).
-       *
-       * However, during a switch this works against us, because by
-       * the time we get here, the parent's URL has already been
-       * changed.  So we manually remove the child from revision
-       * control after the delete-entry item has been written in the
-       * parent's log, but before it is run, so the only work left for
-       * the log item is to remove the entry in the parent directory.
-       */
-
-      if (kind == svn_wc__db_kind_dir)
-        {
-          SVN_ERR(leftmod_error_chain(
-                    svn_wc__internal_remove_from_revision_control(
-                      eb->db,
-                      local_abspath,
-                      TRUE, /* destroy */
-                      FALSE, /* instant error */
-                      eb->cancel_func,
-                      eb->cancel_baton,
-                      pool)));
-        }
-    }
-
-  /* Note: these two lines are duplicated in the tree-conflicts bail out
-   * above. */
   SVN_ERR(svn_wc__wq_run(eb->db, dir_abspath,
                          eb->cancel_func, eb->cancel_baton,
                          pool));

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/upgrade.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/upgrade.c Tue Aug 10 11:12:07 2010
@@ -32,7 +32,6 @@
 #include "wc.h"
 #include "adm_files.h"
 #include "lock.h"
-#include "log.h"
 #include "entries.h"
 #include "wc_db.h"
 #include "tree_conflicts.h"

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c Tue Aug 10 11:12:07 2010
@@ -3773,6 +3773,7 @@ svn_wc__db_op_set_props(svn_wc__db_t *db
                                          scratch_pool));
 }
 
+#ifdef SVN__SUPPORT_BASE_MERGE
 
 /* Set properties in a given table. The row must exist.  */
 static svn_error_t *
@@ -3804,7 +3805,6 @@ set_properties(svn_wc__db_t *db,
   return SVN_NO_ERROR;
 }
 
-#ifdef SVN__SUPPORT_BASE_MERGE
 
 svn_error_t *
 svn_wc__db_temp_base_set_props(svn_wc__db_t *db,
@@ -9426,9 +9426,11 @@ svn_wc__db_temp_set_parent_stub_to_norma
 {
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
   const char *parent_abspath, *base;
+#ifndef SINGLE_DB
+  svn_sqlite__stmt_t *stmt;
   int affected_rows;
+#endif
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)
                  && !svn_dirent_is_root(local_abspath, strlen(local_abspath)));

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c Tue Aug 10 11:12:07 2010
@@ -35,7 +35,6 @@
 #include "workqueue.h"
 #include "adm_files.h"
 #include "translate.h"
-#include "log.h"
 
 #include "svn_private_config.h"
 #include "private/svn_skel.h"
@@ -44,7 +43,7 @@
 /* Workqueue operation names.  */
 #define OP_REVERT "revert"
 #define OP_KILLME "killme"
-#define OP_LOGGY "loggy"
+#define OP_BASE_REMOVE "base-remove"
 #define OP_DELETION_POSTCOMMIT "deletion-postcommit"
 /* Arguments of OP_POSTCOMMIT:
  *   (local_abspath, revnum, date, [author], [checksum],
@@ -640,58 +639,229 @@ svn_wc__wq_add_killme(svn_wc__db_t *db,
 #endif
 
 /* ------------------------------------------------------------------------ */
+/* OP_REMOVE_BASE  */
 
-/* OP_LOGGY  */
+/* Removes a BASE_NODE and all it's data, leaving any adds and copies as is.
+   Do this as a depth first traversal to make sure than any parent still exists
+   on error conditions. 
+   
+   ### This function needs review for 4th tree behavior.*/
+static svn_error_t *
+remove_base_node(svn_wc__db_t *db,
+                 const char *local_abspath,
+                 svn_cancel_func_t cancel_func,
+                 void *cancel_baton,
+                 apr_pool_t *scratch_pool)
+{
+  svn_wc__db_status_t base_status, wrk_status;
+  svn_wc__db_kind_t base_kind, wrk_kind;
+  svn_boolean_t have_base, have_work;
+
+  if (cancel_func)
+    SVN_ERR(cancel_func(cancel_baton));
+
+  SVN_ERR(svn_wc__db_read_info(&wrk_status, &wrk_kind, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, &have_base,
+                               &have_work, NULL, NULL,
+                               db, local_abspath, scratch_pool, scratch_pool));
+
+#ifndef SVN_WC__SINGLE_DB
+  if (!have_base)
+    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+                             _("Node '%s' not found."),
+                             svn_dirent_local_style(local_abspath,
+                                                    scratch_pool));
+#else
+  SVN_ERR_ASSERT(have_base); /* Verified in caller and _base_get_children() */
+#endif
+
+  if (wrk_status == svn_wc__db_status_normal
+      || wrk_status == svn_wc__db_status_not_present
+      || wrk_status == svn_wc__db_status_absent)
+    {
+      base_status = wrk_status;
+      base_kind = wrk_kind;
+    }
+  else
+    SVN_ERR(svn_wc__db_base_get_info(&base_status, &base_kind, NULL, NULL,
+                                     NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                     NULL, NULL, NULL, NULL,
+                                     db, local_abspath,
+                                     scratch_pool, scratch_pool));
+
+  /* Children first */
+  if (base_kind == svn_wc__db_kind_dir
+      && base_status == svn_wc__db_status_normal)
+    {
+      const apr_array_header_t *children;
+      apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+      int i;
+
+      SVN_ERR(svn_wc__db_base_get_children(&children, db, local_abspath,
+                                           scratch_pool, iterpool));
+
+      for (i = 0; i < children->nelts; i++)
+        {
+          const char *child_name = APR_ARRAY_IDX(children, i, const char *);
+          const char *child_abspath;
+
+          svn_pool_clear(iterpool);
+
+          child_abspath = svn_dirent_join(local_abspath, child_name, iterpool);
+
+          SVN_ERR(remove_base_node(db, child_abspath, cancel_func, cancel_baton,
+                                   iterpool));
+        }
+
+      svn_pool_destroy(iterpool);
+    }
+
+  if (base_status == svn_wc__db_status_normal
+      && wrk_status != svn_wc__db_status_added
+      && wrk_status != svn_wc__db_status_obstructed_add
+      && wrk_status != svn_wc__db_status_excluded)
+    {
+#ifndef SVN_WC__SINGLE_DB
+      if (base_kind == svn_wc__db_kind_dir)
+        SVN_ERR(svn_wc__adm_destroy(db, local_abspath, cancel_func, cancel_baton,
+                                    scratch_pool));
+#endif
+
+      if (wrk_status != svn_wc__db_status_deleted
+          && (base_kind == svn_wc__db_kind_file
+              || base_kind == svn_wc__db_kind_symlink))
+        {
+          SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
+        }
+      else if (base_kind == svn_wc__db_kind_dir
+#ifdef SVN_WC__SINGLE_DB
+               && wrk_status != svn_wc__db_status_deleted
+#endif
+              )
+        {
+          svn_error_t *err = svn_io_dir_remove_nonrecursive(local_abspath,
+                                                            scratch_pool);
 
-/* Process the OP_LOGGY work item WORK_ITEM.
- * See svn_wc__wq_add_loggy() which generates this work item.
+          if (err && (APR_STATUS_IS_ENOENT(err->apr_err)
+                      || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)
+                      || APR_STATUS_IS_ENOTEMPTY(err->apr_err)))
+            svn_error_clear(err);
+          else
+            SVN_ERR(err);
+        }
+
+      /* This should remove just BASE and ACTUAL, but for now also remove
+         not existing WORKING_NODE data. */
+      SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
+    }
+  else if (wrk_status == svn_wc__db_status_added
+           || wrk_status == svn_wc__db_status_obstructed_add
+           || (have_work && wrk_status == svn_wc__db_status_excluded))
+    /* ### deletes of working additions should fall in this case, but
+       ### we can't express these without the 4th tree */
+    {
+      /* Just remove the BASE_NODE data */
+      SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));
+    }
+  else
+    SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Process the OP_REMOVE_BASE work item WORK_ITEM.
+ * See svn_wc__wq_build_remove_base() which generates this work item.
  * Implements (struct work_item_dispatch).func. */
+
 static svn_error_t *
-run_loggy(svn_wc__db_t *db,
-          const svn_skel_t *work_item,
-          const char *wri_abspath,
-          svn_cancel_func_t cancel_func,
-          void *cancel_baton,
-          apr_pool_t *scratch_pool)
+run_base_remove(svn_wc__db_t *db,
+                const svn_skel_t *work_item,
+                const char *wri_abspath,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
+                apr_pool_t *scratch_pool)
 {
   const svn_skel_t *arg1 = work_item->children->next;
-  const char *adm_abspath;
+  const char *local_abspath;
+  svn_boolean_t keep_not_present;
+  svn_revnum_t revision;
+  const char *repos_relpath, *repos_root_url, *repos_uuid;
+  svn_wc__db_kind_t kind;
 
-  /* We need a NUL-terminated path, so copy it out of the skel.  */
-  adm_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+  local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+  keep_not_present = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
 
-  return svn_error_return(svn_wc__run_xml_log(
-                            db, adm_abspath,
-                            arg1->next->data, arg1->next->len,
-                            scratch_pool));
-}
+  if (keep_not_present)
+    {
+      SVN_ERR(svn_wc__db_base_get_info(NULL, &kind, &revision, &repos_relpath,
+                                       &repos_root_url, &repos_uuid, NULL,
+                                       NULL, NULL, NULL, NULL, NULL, NULL,
+                                       NULL, NULL,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
 
+      if (!repos_relpath)
+        SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
+                                           &repos_uuid,
+                                           db, local_abspath, scratch_pool,
+                                           scratch_pool));
 
-svn_error_t *
-svn_wc__wq_build_loggy(svn_skel_t **work_item,
-                       svn_wc__db_t *db,
-                       const char *adm_abspath,
-                       const svn_stringbuf_t *log_content,
-                       apr_pool_t *result_pool)
-{
-  if (log_content == NULL || svn_stringbuf_isempty(log_content))
+#ifndef SVN_WC__SINGLE_DB
+      /* ### When LOCAL_ABSPATH is obstructed, we might not receive a valid
+         ### revision here. For the small time that is left until Single-DB
+         ### just mark the not-present node as revision 0, as we are not
+         ### interested in the revision of not-present nodes anyway.
+
+         ### Triggered by update_tests.py 15: issue #919, updates that delete
+       */
+      if (!SVN_IS_VALID_REVNUM(revision))
+        revision = 0;
+#endif
+    }
+
+  SVN_ERR(remove_base_node(db, local_abspath,
+                           cancel_func, cancel_baton,
+                           scratch_pool));
+
+  if (keep_not_present)
     {
-      *work_item = NULL;
-      return SVN_NO_ERROR;
+      SVN_ERR(svn_wc__db_base_add_absent_node(db, local_abspath,
+                                              repos_relpath,
+                                              repos_root_url,
+                                              repos_uuid,
+                                              revision,
+                                              kind,
+                                              svn_wc__db_status_not_present,
+                                              NULL,
+                                              NULL,
+                                              scratch_pool));
     }
 
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__wq_build_base_remove(svn_skel_t **work_item,
+                             svn_wc__db_t *db,
+                             const char *local_abspath,
+                             svn_boolean_t keep_not_present,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
+{
   *work_item = svn_skel__make_empty_list(result_pool);
 
-  /* NOTE: the skel still points at ADM_ABSPATH and LOG_CONTENT, but we
-     require these parameters to be allocated in RESULT_POOL.  */
-  svn_skel__prepend_str(log_content->data, *work_item, result_pool);
-  svn_skel__prepend_str(adm_abspath, *work_item, result_pool);
-  svn_skel__prepend_str(OP_LOGGY, *work_item, result_pool);
+  /* If a SOURCE_ABSPATH was provided, then put it into the skel. If this
+     value is not provided, then the file's pristine contents will be used.  */
+
+  svn_skel__prepend_int(keep_not_present, *work_item, result_pool);
+  svn_skel__prepend_str(apr_pstrdup(result_pool, local_abspath),
+                        *work_item, result_pool);
+  svn_skel__prepend_str(OP_BASE_REMOVE, *work_item, result_pool);
 
   return SVN_NO_ERROR;
 }
 
-
 /* ------------------------------------------------------------------------ */
 
 /* OP_DELETION_POSTCOMMIT  */
@@ -2303,7 +2473,6 @@ svn_wc__wq_build_pristine_get_translated
 
 static const struct work_item_dispatch dispatch_table[] = {
   { OP_REVERT, run_revert },
-  { OP_LOGGY, run_loggy },
   { OP_DELETION_POSTCOMMIT, run_deletion_postcommit },
   { OP_POSTCOMMIT, run_postcommit },
   { OP_FILE_INSTALL, run_file_install },
@@ -2313,6 +2482,7 @@ static const struct work_item_dispatch d
   { OP_SYNC_FILE_FLAGS, run_sync_file_flags },
   { OP_PREJ_INSTALL, run_prej_install },
   { OP_RECORD_FILEINFO, run_record_fileinfo },
+  { OP_BASE_REMOVE, run_base_remove },
   { OP_TMP_SET_TEXT_CONFLICT_MARKERS, run_set_text_conflict_markers },
   { OP_TMP_SET_PROPERTY_CONFLICT_MARKER, run_set_property_conflict_marker },
   { OP_PRISTINE_GET_TRANSLATED, run_pristine_get_translated },

Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.h?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.h Tue Aug 10 11:12:07 2010
@@ -196,6 +196,23 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
                       svn_boolean_t use_commit_times,
                       apr_pool_t *scratch_pool);
 
+/* Set *WORK_ITEM to a new work item that will remove all the data of
+   the BASE_NODE of LOCAL_ABSPATH and all it's descendants, but keeping
+   any WORKING_NODE data.
+
+   This function doesn't check for local modifications of the text files
+   as these would have triggered a tree conflict before.
+
+   ### This is only used from update_editor.c's do_entry_deletion().
+ */
+svn_error_t *
+svn_wc__wq_build_base_remove(svn_skel_t **work_item,
+                             svn_wc__db_t *db,
+                             const char *local_abspath,
+                             svn_boolean_t keep_not_present,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
+
 #ifndef SVN_WC__SINGLE_DB
 /* Handle the old "KILLME" concept -- perform the actual deletion of a
    subdir (or just its admin area) during post-commit processing of a
@@ -208,24 +225,6 @@ svn_wc__wq_add_killme(svn_wc__db_t *db,
 #endif
 
 
-/* ### temporary compat for mapping the old loggy into workqueue space.
-
-   Set *WORK_ITEM to a new work item ...
-
-   LOG_CONTENT may be NULL or reference an empty log.  Set *WORK_ITEM to
-   NULL in this case.
-
-   NOTE: ADM_ABSPATH and LOG_CONTENT must live at least as long as
-   RESULT_POOL (typically, they'll be allocated within RESULT_POOL).
-*/
-svn_error_t *
-svn_wc__wq_build_loggy(svn_skel_t **work_item,
-                       svn_wc__db_t *db,
-                       const char *adm_abspath,
-                       const svn_stringbuf_t *log_content,
-                       apr_pool_t *result_pool);
-
-
 /* ### Temporary helper to store text conflict marker locations as a wq
    ### operation. Eventually the data must be stored in the pristine store+db
    ### before the wq runs (within the operation transaction) and then a wq

Modified: subversion/branches/atomic-revprop/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/svn/propedit-cmd.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/atomic-revprop/subversion/svn/propedit-cmd.c Tue Aug 10 11:12:07 2010
@@ -98,6 +98,9 @@ svn_cl__propedit(apr_getopt_t *os,
                                                       opt_state->targets,
                                                       ctx, pool));
 
+  /* We do our own notifications */
+  ctx->notify_func2 = NULL;
+
   if (opt_state->revprop)  /* operate on a revprop */
     {
       svn_revnum_t rev;

Modified: subversion/branches/atomic-revprop/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/svnsync/main.c?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/svnsync/main.c (original)
+++ subversion/branches/atomic-revprop/subversion/svnsync/main.c Tue Aug 10 11:12:07 2010
@@ -338,8 +338,8 @@ get_lock(svn_ra_session_t *session, apr_
     }
 
   return svn_error_createf(APR_EINVAL, NULL,
-                           "Couldn't get lock on destination repos "
-                           "after %d attempts\n", i);
+                           _("Couldn't get lock on destination repos "
+                             "after %d attempts"), i);
 }
 
 
@@ -387,20 +387,8 @@ with_locked(svn_ra_session_t *session,
   err = func(session, baton, pool);
 
   err2 = svn_ra_change_rev_prop(session, 0, SVNSYNC_PROP_LOCK, NULL, pool);
-  if (err2 && err)
-    {
-      svn_error_clear(err2); /* XXX what to do here? */
 
-      return err;
-    }
-  else if (err2)
-    {
-      return err2;
-    }
-  else
-    {
-      return err;
-    }
+  return svn_error_compose_create(err, svn_error_return(err2));
 }
 
 

Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py?rev=983929&r1=983928&r2=983929&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py Tue Aug 10 11:12:07 2010
@@ -565,8 +565,7 @@ def diff_multiple_reverse(sbox):
   repo_diff(wc_dir, 4, 1, check_add_a_file_in_a_subdir)
   repo_diff(wc_dir, 4, 1, check_add_a_file)
   repo_diff(wc_dir, 1, 4, check_update_a_file)
-### TODO: directory delete doesn't work yet
-#  repo_diff(wc_dir, 1, 4, check_add_a_file_in_a_subdir_reverse)
+  repo_diff(wc_dir, 1, 4, check_add_a_file_in_a_subdir_reverse)
   repo_diff(wc_dir, 1, 4, check_add_a_file_reverse)
 
 # test 6
@@ -1921,6 +1920,7 @@ def diff_renamed_dir(sbox):
                        'A') :
     raise svntest.Failure
 
+  # Commit
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'ci', '-m', 'log msg')
 
@@ -1949,20 +1949,62 @@ def diff_renamed_dir(sbox):
                        'A') :
     raise svntest.Failure
 
-  # Test the diff while within the moved directory
-  os.chdir(os.path.join('A','D','I'))
+  # repos->repos with explicit URL arg
+  exit_code, diff_output, err_output = svntest.main.run_svn(None, 'diff',
+                                                            '-r', '1:2',
+                                                            '^/A')
+  if check_diff_output(diff_output,
+                       os.path.join('D', 'G', 'pi'),
+                       'D') :
+    raise svntest.Failure
+  if check_diff_output(diff_output,
+                       os.path.join('D', 'I', 'pi'),
+                       'A') :
+    raise svntest.Failure
 
+  # Go to the parent of the moved directory
+  os.chdir(os.path.join('A','D'))
+
+  # repos->wc diff in the parent
   exit_code, diff_output, err_output = svntest.main.run_svn(None, 'diff',
                                                             '-r', '1')
 
-  if check_diff_output(diff_output, 'pi', 'A') :
+  if check_diff_output(diff_output, 
+                       os.path.join('G', 'pi'),
+                       'D') :
+    raise svntest.Failure
+  if check_diff_output(diff_output, 
+                       os.path.join('I', 'pi'),
+                       'A') :
     raise svntest.Failure
 
-  # Test a repos->repos diff while within the moved directory
+  # repos->repos diff in the parent
+  exit_code, diff_output, err_output = svntest.main.run_svn(None, 'diff',
+                                                            '-r', '1:2')
+
+  if check_diff_output(diff_output, 
+                       os.path.join('G', 'pi'),
+                       'D') :
+    raise svntest.Failure
+  if check_diff_output(diff_output, 
+                       os.path.join('I', 'pi'),
+                       'A') :
+    raise svntest.Failure
+
+  # Go to the move target directory
+  os.chdir('I')
+
+  # repos->wc diff while within the moved directory (should be empty)
+  exit_code, diff_output, err_output = svntest.main.run_svn(None, 'diff',
+                                                            '-r', '1')
+  if diff_output:
+    raise svntest.Failure
+
+  # repos->repos diff while within the moved directory (should be empty)
   exit_code, diff_output, err_output = svntest.main.run_svn(None, 'diff',
                                                             '-r', '1:2')
 
-  if check_diff_output(diff_output, 'pi', 'A') :
+  if diff_output:
     raise svntest.Failure
 
 
@@ -3584,7 +3626,7 @@ test_list = [ None,
               diff_keywords,
               diff_force,
               diff_schedule_delete,
-              XFail(diff_renamed_dir),
+              diff_renamed_dir,
               diff_property_changes_to_base,
               diff_mime_type_changes,
               diff_prop_change_local_propmod,