You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/04/13 11:06:08 UTC

svn commit: r1091717 [1/2] - in /subversion/trunk/subversion: include/private/ libsvn_client/ libsvn_fs/ libsvn_fs_base/ libsvn_fs_fs/ libsvn_ra/ libsvn_ra_local/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ svn/ tests/cmdline/ tests/cm...

Author: julianfoad
Date: Wed Apr 13 09:06:07 2011
New Revision: 1091717

URL: http://svn.apache.org/viewvc?rev=1091717&view=rev
Log:
Remove 'svn obliterate' related code.

* subversion/libsvn_ra/ra_loader.h,
  subversion/libsvn_ra/ra_loader.c
  (svn_ra__vtable_t, svn_ra__obliterate_path_rev):
    Remove obliterate related code.

* subversion/libsvn_fs/fs-loader.h,
  subversion/libsvn_fs/fs-loader.c
  (fs_vtable_t, svn_fs__begin_obliteration_txn,
   svn_fs__commit_obliteration_txn): Remove obliterate related code.

* subversion/svn/cl.h,
  subversion/svn/main.c
  (svn_opt_subcommand_t, svn_cl__cmd_table): Remove obliterate related code.

* subversion/libsvn_ra_local/ra_plugin.c,
  subversion/libsvn_ra_svn/client.c,
  subversion/libsvn_ra_neon/session.c,
  subversion/libsvn_ra_serf/serf.c
  (svn_ra_local__obliterate_path_rev, ra_local_vtable, ra_svn_vtable,
   neon_vtable, serf_vtable): Remove obliterate related code.

* subversion/libsvn_fs_base/tree.h,
  subversion/libsvn_fs_base/tree.c,
  subversion/libsvn_fs_base/reps-strings.h,
  subversion/libsvn_fs_base/reps-strings.c,
  subversion/libsvn_fs_base/dag.h,
  subversion/libsvn_fs_base/dag.c,
  subversion/libsvn_fs_base/revs-txns.c,
  subversion/libsvn_fs_base/revs-txns.h,
  subversion/libsvn_fs_base/fs.c
  (svn_fs_base__commit_obliteration_txn, svn_fs_base__obliterate_rep,
   txn_body_commit_obliteration, txn_body_obliterate_rep,
   svn_fs_base__rep_obliterate, svn_fs_base__dag_commit_obliteration_txn,
   svn_fs_base__dag_obliterate_rep, svn_fs_base__begin_obliteration_txn,
   txn_vtable, txn_body_begin_obliteration_txn, fs_vtable,
   node_origins_update, copies_update, changes_dup):
    Remove obliterate related code.

* subversion/include/private/svn_client_private.h,
  subversion/include/private/svn_repos_private.h,
  subversion/include/private/svn_ra_private.h,
  subversion/include/private/svn_fs_private.h
  (svn_client__obliterate_path_rev, svn_repos__obliterate_path_rev,
   svn_repos__pre_obliterate_hook, svn_repos__post_obliterate_hook,
   svn_ra__obliterate_path_rev, svn_fs__begin_obliteration_txn,
   svn_fs__commit_obliteration_txn): Remove obliterate related code.

* subversion/libsvn_repos/repos.h,
  subversion/libsvn_repos/repos.c,
  subversion/libsvn_repos/hooks.c
  (svn_repos__hooks_pre_obliterate, svn_repos__hooks_post_obliterate,
    create_hooks, check_hook_result): Remove obliterate related code.

* subversion/libsvn_fs_fs/tree.h,
  subversion/libsvn_fs_fs/tree.c,
  subversion/libsvn_fs_fs/fs_fs.h,
  subversion/libsvn_fs_fs/fs_fs.c,
  subversion/libsvn_fs_fs/fs.c
  (svn_fs_fs__commit_obliteration_txn, svn_fs_fs__commit_obliteration,
   svn_fs_fs__begin_obliteration_txn, txn_vtable,
   svn_fs_fs__create_obliteration_txn, commit_obliteration_body,
   svn_fs_fs__commit_obliteration, svn_fs_fs__begin_obliteration_txn,
   fs_vtable): Remove obliterate related code.

* subversion/svn/obliterate-cmd.c,
  subversion/libsvn_client/obliterate.c,
  subversion/libsvn_repos/obliterate.c,
  subversion/libsvn_fs_base/obliterate.h,
  subversion/libsvn_fs_base/obliterate.c,
  subversion/tests/cmdline/obliterate_tests.py
    Remove obliterate related files.

* subversion/tests/libsvn_fs/fs-test.c,
  subversion/tests/cmdline/svntest/objects.py
  (obliterate_1, test_funcs, SvnRepository.obliterate_node_rev):
    Remove obliterate related test.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

Removed:
    subversion/trunk/subversion/libsvn_client/obliterate.c
    subversion/trunk/subversion/libsvn_fs_base/obliterate.c
    subversion/trunk/subversion/libsvn_fs_base/obliterate.h
    subversion/trunk/subversion/libsvn_repos/obliterate.c
    subversion/trunk/subversion/svn/obliterate-cmd.c
    subversion/trunk/subversion/tests/cmdline/obliterate_tests.py
Modified:
    subversion/trunk/subversion/include/private/svn_client_private.h
    subversion/trunk/subversion/include/private/svn_fs_private.h
    subversion/trunk/subversion/include/private/svn_ra_private.h
    subversion/trunk/subversion/include/private/svn_repos_private.h
    subversion/trunk/subversion/libsvn_fs/fs-loader.c
    subversion/trunk/subversion/libsvn_fs/fs-loader.h
    subversion/trunk/subversion/libsvn_fs_base/dag.c
    subversion/trunk/subversion/libsvn_fs_base/dag.h
    subversion/trunk/subversion/libsvn_fs_base/fs.c
    subversion/trunk/subversion/libsvn_fs_base/reps-strings.c
    subversion/trunk/subversion/libsvn_fs_base/reps-strings.h
    subversion/trunk/subversion/libsvn_fs_base/revs-txns.c
    subversion/trunk/subversion/libsvn_fs_base/revs-txns.h
    subversion/trunk/subversion/libsvn_fs_base/tree.c
    subversion/trunk/subversion/libsvn_fs_base/tree.h
    subversion/trunk/subversion/libsvn_fs_fs/fs.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
    subversion/trunk/subversion/libsvn_fs_fs/tree.c
    subversion/trunk/subversion/libsvn_fs_fs/tree.h
    subversion/trunk/subversion/libsvn_ra/ra_loader.c
    subversion/trunk/subversion/libsvn_ra/ra_loader.h
    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
    subversion/trunk/subversion/libsvn_ra_neon/session.c
    subversion/trunk/subversion/libsvn_ra_serf/serf.c
    subversion/trunk/subversion/libsvn_ra_svn/client.c
    subversion/trunk/subversion/libsvn_repos/hooks.c
    subversion/trunk/subversion/libsvn_repos/repos.c
    subversion/trunk/subversion/libsvn_repos/repos.h
    subversion/trunk/subversion/svn/cl.h
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/tests/cmdline/svntest/objects.py
    subversion/trunk/subversion/tests/libsvn_fs/fs-test.c

Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Wed Apr 13 09:06:07 2011
@@ -37,19 +37,6 @@ extern "C" {
 #endif /* __cplusplus */
 
 
-/** Obliterate the node at URL @a url in revision @a rev.
- *
- * Use the authentication baton stored in @a ctx for authentication.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_client__obliterate_path_rev(const char *url,
-                                svn_revnum_t rev,
-                                svn_client_ctx_t *ctx,
-                                apr_pool_t *pool);
-
-
 /** Return @c SVN_ERR_ILLEGAL_TARGET if TARGETS contains a mixture of
  * URLs and paths; otherwise return SVN_NO_ERROR.
  *

Modified: subversion/trunk/subversion/include/private/svn_fs_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_fs_private.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_fs_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_fs_private.h Wed Apr 13 09:06:07 2011
@@ -58,39 +58,6 @@ extern "C" {
 apr_hash_t *
 svn_fs__access_get_lock_tokens(svn_fs_access_t *access_ctx);
 
-
-/**
- * Same as svn_fs_begin_txn2(), except it begins an obliteration-txn
- * that can be used to replace revision @a rev. @a rev must be a valid
- * revision number at the time of this call. This transaction cannot be
- * committed with a normal commit but only with
- * svn_fs__commit_obliteration_txn().
- *
- * @note You usually don't want to call this directly.
- * Instead, call svn_repos__obliterate_path_rev(), which honors the
- * repository's hook configurations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_fs__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                               svn_fs_t *fs,
-                               svn_revnum_t rev,
-                               apr_pool_t *pool);
-
-
-/** Commit the obliteration-txn @a txn. Similar to svn_fs_commit_txn() but
- * replaces the revision @a rev, which must be the same revision as was
- * specified when the transaction was begun. No conflict is possible.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_fs__commit_obliteration_txn(svn_revnum_t rev,
-                                svn_fs_txn_t *txn,
-                                apr_pool_t *pool);
-
-
 /* Access the process-global (singleton) membuffer cache. The first call
  * will automatically allocate the cache using the current cache config.
  * NULL will be returned if the desired cache size is 0.

Modified: subversion/trunk/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_ra_private.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_ra_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_ra_private.h Wed Apr 13 09:06:07 2011
@@ -45,29 +45,6 @@ svn_ra__assert_mergeinfo_capable_server(
                                         const char *path_or_url,
                                         apr_pool_t *pool);
 
-/** Permanently delete @a path (relative to the URL of @a session) in revision
- * @a rev.
- *
- * Do not change the content of other node in the repository, even other nodes
- * that were copied from this one. The only other change in the repository is
- * to "copied from" pointers that were pointing to the now-deleted node. These
- * are removed or made to point to a previous version of the now-deleted node.
- * (### TODO: details.)
- *
- * If administratively forbidden, return @c SVN_ERR_RA_NOT_AUTHORIZED. If not
- * implemented by the server, return @c SVN_ERR_RA_NOT_IMPLEMENTED.
- *
- * @note This functionality is not implemented in pre-1.7 servers and may not
- * be implemented in all 1.7 and later servers.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_ra__obliterate_path_rev(svn_ra_session_t *session,
-                            svn_revnum_t rev,
-                            const char *path,
-                            apr_pool_t *pool);
-
 
 /*** Operational Locks ***/
 

Modified: subversion/trunk/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_repos_private.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_repos_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_repos_private.h Wed Apr 13 09:06:07 2011
@@ -37,57 +37,6 @@ extern "C" {
 #endif /* __cplusplus */
 
 
-/**
- * Permanently delete @a path at revision @a revision in @a fs.
- *
- * Do not change the content of any other node in the repository, even other
- * nodes that were copied from this one. The only other change in the
- * repository is to "copied from" pointers that were pointing to the
- * now-deleted node. These are removed or made to point to a previous
- * version of the now-deleted node.
- * (### TODO: details.)
- *
- * @a path is relative to the repository root and must start with "/".
- *
- * If administratively forbidden, return @c SVN_ERR_RA_NOT_AUTHORIZED. If not
- * implemented by the RA layer or by the server, return
- * @c SVN_ERR_RA_NOT_IMPLEMENTED.
- *
- * @note This functionality is not implemented in pre-1.7 servers and may not
- * be implemented in all 1.7 and later servers.
- *
- * @note TODO: Maybe create svn_repos_fs_begin_obliteration_txn() and
- * svn_repos_fs_commit_obliteration_txn() to enable an obliteration txn to be
- * constructed at a higher level.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_repos__obliterate_path_rev(svn_repos_t *repos,
-                               const char *username,
-                               svn_revnum_t revision,
-                               const char *path,
-                               apr_pool_t *pool);
-
-/** Return the path to @a repos's pre-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos__pre_obliterate_hook(svn_repos_t *repos,
-                               apr_pool_t *pool);
-
-/** Return the path to @a repos's post-obliterate hook, allocated in
- * @a pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_repos__post_obliterate_hook(svn_repos_t *repos,
-                                apr_pool_t *pool);
-
-
 /** Validate that property @a name is valid for use in a Subversion
  * repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't.  For some
  * "svn:" properties, also validate the @a value, and return

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Wed Apr 13 09:06:07 2011
@@ -657,15 +657,6 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p, s
   return svn_error_return(svn_fs_begin_txn2(txn_p, fs, rev, 0, pool));
 }
 
-svn_error_t *
-svn_fs__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                               svn_fs_t *fs,
-                               svn_revnum_t rev,
-                               apr_pool_t *pool)
-{
-  return svn_error_return(fs->vtable->begin_obliteration_txn(txn_p, fs, rev,
-                                                             pool));
-}
 
 svn_error_t *
 svn_fs_commit_txn(const char **conflict_p, svn_revnum_t *new_rev,
@@ -699,18 +690,6 @@ svn_fs_commit_txn(const char **conflict_
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs__commit_obliteration_txn(svn_revnum_t rev, svn_fs_txn_t *txn,
-                                apr_pool_t *pool)
-{
-  /* TODO: ### Perhaps here is a good place to unpack the revision ... */
-
-  SVN_ERR(txn->vtable->commit_obliteration(rev, txn, pool));
-
-  /* ### ... and here to re-pack it, if it was packed. */
-
-  return SVN_NO_ERROR;
-}
 
 svn_error_t *
 svn_fs_abort_txn(svn_fs_txn_t *txn, apr_pool_t *pool)

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.h Wed Apr 13 09:06:07 2011
@@ -168,9 +168,6 @@ typedef struct fs_vtable_t
   svn_error_t *(*begin_txn)(svn_fs_txn_t **txn_p, svn_fs_t *fs,
                             svn_revnum_t rev, apr_uint32_t flags,
                             apr_pool_t *pool);
-  svn_error_t *(*begin_obliteration_txn)(svn_fs_txn_t **txn_p, svn_fs_t *fs,
-                                         svn_revnum_t replacing_rev,
-                                         apr_pool_t *pool);
   svn_error_t *(*open_txn)(svn_fs_txn_t **txn, svn_fs_t *fs,
                            const char *name, apr_pool_t *pool);
   svn_error_t *(*purge_txn)(svn_fs_t *fs, const char *txn_id,
@@ -209,8 +206,6 @@ typedef struct txn_vtable_t
 {
   svn_error_t *(*commit)(const char **conflict_p, svn_revnum_t *new_rev,
                          svn_fs_txn_t *txn, apr_pool_t *pool);
-  svn_error_t *(*commit_obliteration)(svn_revnum_t replacing_rev,
-                                      svn_fs_txn_t *txn, apr_pool_t *pool);
   svn_error_t *(*abort)(svn_fs_txn_t *txn, apr_pool_t *pool);
   svn_error_t *(*get_prop)(svn_string_t **value_p, svn_fs_txn_t *txn,
                            const char *propname, apr_pool_t *pool);

Modified: subversion/trunk/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/dag.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/dag.c Wed Apr 13 09:06:07 2011
@@ -1524,34 +1524,6 @@ svn_fs_base__dag_deltify(dag_node_t *tar
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_fs_base__dag_obliterate_rep(dag_node_t *node,
-                                dag_node_t *pred_node,
-                                trail_t *trail,
-                                apr_pool_t *pool)
-{
-  node_revision_t *node_rev, *pred_node_rev;
-  svn_fs_t *fs = svn_fs_base__dag_get_fs(node);
-  const char *pred_key;
-
-  SVN_ERR(svn_fs_bdb__get_node_revision(&node_rev, fs, node->id, trail, pool));
-  if (pred_node)
-    {
-      SVN_ERR(svn_fs_bdb__get_node_revision(&pred_node_rev, fs, pred_node->id,
-                                            trail, pool));
-      pred_key = pred_node_rev->data_key;
-    }
-  else
-    {
-      pred_key = NULL;
-    }
-
-  return svn_fs_base__rep_obliterate(trail->fs, node_rev->data_key, pred_key,
-                                     trail, pool);
-}
-
-
 /* Maybe store a `checksum-reps' index record for the representation whose
    key is REP.  (If there's already a rep for this checksum, we don't
    bother overwriting it.)  */
@@ -1642,198 +1614,6 @@ svn_fs_base__dag_commit_txn(svn_revnum_t
                                    NULL, &date, trail, pool);
 }
 
-/* Modify all entries in the "node-origins" table that have a txn-id of
- * OLD_TXN_ID to refer to NEW_TXN_ID instead.
- *
- * Work within TRAIL. */
-static svn_error_t *
-node_origins_update(const char *new_txn_id,
-                    const char *old_txn_id,
-                    trail_t *trail,
-                    apr_pool_t *scratch_pool)
-{
-  apr_array_header_t *changes;
-  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-  int i;
-
-  /* To find the nodes that originate in the old txn, we'll look in the
-   * "changes" table. Any change that added a node could have created a new
-   * node id, but that change may have been superceded by a later change that
-   * deleted that node id and its corresponding 'node-origins' record. */
-  SVN_ERR(svn_fs_bdb__changes_fetch_raw(&changes, trail->fs, old_txn_id, trail,
-                                        scratch_pool));
-  for (i = 0; i < changes->nelts; i++)
-    {
-      change_t *change = APR_ARRAY_IDX(changes, i, change_t *);
-
-      svn_pool_clear(iterpool);
-
-      if (change->kind == svn_fs_path_change_add
-          || change->kind == svn_fs_path_change_replace)
-        {
-          const svn_fs_id_t *origin_id;
-          const char *node_id, *id_copy_id, *id_txn_id;
-          svn_error_t *err;
-
-          /* Find the destination node id of this change */
-          node_id = svn_fs_base__id_node_id(change->noderev_id);
-
-          /* Fetch the old node-origin */
-          err = (svn_fs_bdb__get_node_origin(&origin_id, trail->fs, node_id,
-                                              trail, iterpool));
-          if (err && err->apr_err == SVN_ERR_FS_NO_SUCH_NODE_ORIGIN)
-            {
-              svn_error_clear(err);
-              continue;
-            }
-          SVN_ERR(err);
-
-          id_copy_id = svn_fs_base__id_copy_id(origin_id);
-          id_txn_id = svn_fs_base__id_txn_id(origin_id);
-
-          if (svn_fs_base__key_compare(id_txn_id, old_txn_id) == 0)
-            {
-              /* Change its txn_id to NEW_TXN_ID */
-              origin_id = svn_fs_base__id_create(node_id, id_copy_id,
-                                                 new_txn_id, iterpool);
-              /* Save the new node-origin */
-              SVN_ERR(svn_fs_bdb__delete_node_origin(trail->fs, node_id, trail,
-                                                     iterpool));
-              SVN_ERR(svn_fs_bdb__set_node_origin(trail->fs, node_id,
-                                                  origin_id, trail,
-                                                  iterpool));
-            }
-        }
-    }
-
-  svn_pool_destroy(iterpool);
-  return SVN_NO_ERROR;
-}
-
-/* Modify each row in the "copies" table that is keyed by a (const char *)
- * copy-id listed in COPY_IDS, changing the txn-id component of its
- * "dst_noderev_id" field from OLD_TXN_ID to NEW_TXN_ID.
- * If the dst_noderev_id then references a node-revision that does not exist,
- * it must have been obliterated, so remove each such copy-id from COPY_IDS
- * and from the "copies" table.
- * Each entry in COPY_IDS must match exactly one row in the "copies" table.
- *
- * Work within TRAIL. */
-static svn_error_t *
-copies_update(const char *new_txn_id,
-              const char *old_txn_id,
-              apr_array_header_t *copy_ids,
-              trail_t *trail,
-              apr_pool_t *scratch_pool)
-{
-  int i, i_out;
-  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-
-  /* Loop over COPY_IDS, reading from index I, writing to index I_OUT.
-   * At the end, if I_OUT < I then some elements have been deleted. */
-  i_out = 0;
-  for (i = 0; i < copy_ids->nelts; i++)
-    {
-      const char *copy_id = APR_ARRAY_IDX(copy_ids, i, const char *);
-      copy_t *copy;
-      const char *id_node_id, *id_copy_id, *id_txn_id;
-      svn_error_t *err;
-
-      svn_pool_clear(iterpool);
-
-      /* Get the old "copy" row from the "copies" table */
-      SVN_ERR(svn_fs_bdb__get_copy(&copy, trail->fs, copy_id, trail,
-                                   iterpool));
-
-      /* Modify it: change dst_noderev_id's txn_id from old to new txn-id */
-      id_node_id = svn_fs_base__id_node_id(copy->dst_noderev_id);
-      id_copy_id = svn_fs_base__id_copy_id(copy->dst_noderev_id);
-      id_txn_id = svn_fs_base__id_txn_id(copy->dst_noderev_id);
-      SVN_ERR_ASSERT(svn_fs_base__key_compare(id_copy_id, copy_id) == 0);
-      SVN_ERR_ASSERT(svn_fs_base__key_compare(id_txn_id, old_txn_id) == 0);
-      copy->dst_noderev_id = svn_fs_base__id_create(id_node_id, id_copy_id,
-                                                    new_txn_id, iterpool);
-
-      /* Depending on whether the new node-revision exists ... */
-      err = svn_fs_bdb__get_node_revision(NULL, trail->fs,
-                                          copy->dst_noderev_id, trail,
-                                          iterpool);
-      if (err == NULL)
-        {
-          /* Write the new "copy" row back under the same key (copy_id) */
-          SVN_ERR(svn_fs_bdb__create_copy(trail->fs, copy_id,
-                                          copy->src_path, copy->src_txn_id,
-                                          copy->dst_noderev_id, copy->kind,
-                                          trail, iterpool));
-          APR_ARRAY_IDX(copy_ids, i_out++, const char *) = copy_id;
-        }
-      else
-        {
-          svn_error_clear(err);
-
-          /* Delete the copy id from COPY_IDS, and delete the copy row from
-           * the "copies" table. */
-          SVN_ERR(svn_fs_bdb__delete_copy(trail->fs, copy_id, trail, iterpool));
-        }
-    }
-  copy_ids->nelts = i_out;
-  svn_pool_destroy(iterpool);
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_fs_base__dag_commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                         svn_fs_txn_t *txn,
-                                         trail_t *trail,
-                                         apr_pool_t *scratch_pool)
-{
-  transaction_t *txn_obj;
-  revision_t revision;
-  const char *old_txn_id;
-
-  /* Find the old txn. */
-  SVN_ERR(svn_fs_base__rev_get_txn_id(&old_txn_id, trail->fs, replacing_rev,
-                                      trail, scratch_pool));
-
-  /* Read the new txn so we can access its "copies" list */
-  SVN_ERR(svn_fs_bdb__get_txn(&txn_obj, trail->fs, txn->id, trail,
-                              scratch_pool));
-
-  /* Finish updating the "copies" table, which was started in
-   * svn_fs_base__begin_obliteration_txn().  Change the keys of all the
-   * "copies" table rows that we created back to their original keys.
-   *
-   * This assumes that the old 'replacing_rev' transaction is now obsolete,
-   * so that the old "copies" table rows are no longer referenced.
-   *
-   * ### TODO: See txn_body_begin_obliteration_txn().
-   * ### TODO: Guarantee the old txn is obsolete.
-   */
-  if (txn_obj->copies)
-    SVN_ERR(copies_update(txn->id, old_txn_id, txn_obj->copies, trail,
-                          scratch_pool));
-
-  /* Write back the new txn in case we changed its "copies" list */
-  SVN_ERR(svn_fs_bdb__put_txn(trail->fs, txn_obj, txn->id, trail,
-                              scratch_pool));
-
-  /* Replace the revision entry in the `revisions' table. */
-  revision.txn_id = txn->id;
-  SVN_ERR(svn_fs_bdb__put_rev(&replacing_rev, txn->fs, &revision, trail,
-                              scratch_pool));
-
-  /* Promote the unfinished transaction to a committed one. */
-  SVN_ERR(svn_fs_base__txn_make_committed(txn->fs, txn->id, replacing_rev,
-                                          trail, scratch_pool));
-
-  /* Update the "node-origins" table. */
-  SVN_ERR(node_origins_update(txn->id, old_txn_id, trail, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
 
 /*** Comparison. ***/
 

Modified: subversion/trunk/subversion/libsvn_fs_base/dag.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/dag.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/dag.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/dag.h Wed Apr 13 09:06:07 2011
@@ -281,17 +281,6 @@ svn_error_t *svn_fs_base__dag_commit_txn
                                          trail_t *trail,
                                          apr_pool_t *pool);
 
-
-/* Replace the transaction in revision REPLACING_REV with the uncommitted
- * transaction TXN, and promote TXN to a committed transaction. See also
- * svn_fs_base__dag_commit_txn(). */
-svn_error_t *
-svn_fs_base__dag_commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                         svn_fs_txn_t *txn,
-                                         trail_t *trail,
-                                         apr_pool_t *scratch_pool);
-
-
 
 /* Directories.  */
 
@@ -558,16 +547,6 @@ svn_error_t *svn_fs_base__dag_deltify(da
                                       trail_t *trail,
                                       apr_pool_t *pool);
 
-/* Obliterate NODE's data by constructing a new representation that
-   consists of a no-change delta from PRED_NODE, and changing NODE to
-   use that new rep, and leaving the old rep alone in case it is used
-   by other nodes.  If PRED_NODE is null
-   then construct a representation with an empty fulltext instead. */
-svn_error_t *svn_fs_base__dag_obliterate_rep(dag_node_t *node,
-                                             dag_node_t *pred_node,
-                                             trail_t *trail,
-                                             apr_pool_t *pool);
-
 /* Index NODE's backing data representations by their checksum.  Do
    this as part of TRAIL.  Use POOL for allocations. */
 svn_error_t *svn_fs_base__dag_index_checksums(dag_node_t *node,

Modified: subversion/trunk/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/fs.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/fs.c Wed Apr 13 09:06:07 2011
@@ -486,7 +486,6 @@ static fs_vtable_t fs_vtable = {
   svn_fs_base__set_uuid,
   svn_fs_base__revision_root,
   svn_fs_base__begin_txn,
-  svn_fs_base__begin_obliteration_txn,
   svn_fs_base__open_txn,
   svn_fs_base__purge_txn,
   svn_fs_base__list_transactions,

Modified: subversion/trunk/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/reps-strings.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/reps-strings.c Wed Apr 13 09:06:07 2011
@@ -1609,132 +1609,3 @@ svn_fs_base__rep_deltify(svn_fs_t *fs,
 
   return SVN_NO_ERROR;
 }
-
-svn_error_t *svn_fs_base__rep_obliterate(svn_fs_t *fs,
-                                         const char *key,
-                                         const char *pred_key,
-                                         trail_t *trail,
-                                         apr_pool_t *pool)
-{
-  const char *new_str = NULL;
-  representation_t *empty;
-  svn_stream_t *new_stream;
-  struct write_svndiff_strings_baton new_baton;
-  svn_stream_t *pred_stream1, *pred_stream2;
-  svn_txdelta_stream_t *txdelta_stream;
-  base_fs_data_t *bfd = fs->fsap_data;
-  svn_txdelta_window_handler_t new_handler;
-  void *new_handler_baton;
-  apr_pool_t *wpool;
-  apr_array_header_t *windows;
-  window_write_t *ww;
-  svn_txdelta_window_t *window;
-  svn_filesize_t tview_off = 0;
-  svn_filesize_t diffsize = 0;
-  const unsigned char *digest;
-  representation_t *pred_rep;
-  representation_t new_rep;
-  rep_delta_chunk_t *chunk;
-  apr_array_header_t *chunks;
-  int i;
-
-  if (!pred_key)
-    {
-      /* No predecessor so just write a new empty rep */
-      SVN_ERR(svn_fs_bdb__string_append(fs, &new_str, 0, NULL, trail, pool));
-      empty = make_fulltext_rep(new_str, NULL,
-                                svn_checksum_empty_checksum(svn_checksum_md5,
-                                                            pool),
-                                svn_checksum_empty_checksum(svn_checksum_sha1,
-                                                            pool),
-                                pool);
-      SVN_ERR(svn_fs_bdb__write_rep(fs, key, empty, trail, pool));
-
-      return SVN_NO_ERROR;
-    }
-
-  if (!strcmp(key, pred_key))
-    return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                             _("Attempt to obliterate '%s' using itself "),
-                             key);
-
-  new_baton.fs = fs;
-  new_baton.trail = trail;
-  new_baton.header_read = FALSE;
-  new_stream = svn_stream_create(&new_baton, pool);
-  svn_stream_set_write(new_stream, write_svndiff_strings);
-
-  /* ### Is there a simpler way to write a no-change delta? */
-  SVN_ERR(svn_fs_base__rep_contents_read_stream(&pred_stream1, fs, pred_key,
-                                                TRUE, trail, pool));
-  SVN_ERR(svn_fs_base__rep_contents_read_stream(&pred_stream2, fs, pred_key,
-                                                TRUE, trail, pool));
-  svn_txdelta(&txdelta_stream, pred_stream1, pred_stream2, pool);
-
-  if (bfd->format >= SVN_FS_BASE__MIN_SVNDIFF1_FORMAT)
-    svn_txdelta_to_svndiff2(&new_handler, &new_handler_baton,
-                            new_stream, 1, pool);
-  else
-    svn_txdelta_to_svndiff2(&new_handler, &new_handler_baton,
-                            new_stream, 0, pool);
-
-  wpool = svn_pool_create(pool);
-  windows = apr_array_make(pool, 1, sizeof(ww));
-  do
-    {
-      new_baton.size = 0;
-      new_baton.key = NULL;
-      svn_pool_clear(wpool);
-
-      SVN_ERR(svn_txdelta_next_window(&window, txdelta_stream, wpool));
-      SVN_ERR(new_handler(window, new_handler_baton));
-      if (window)
-        {
-          ww = apr_pcalloc(pool, sizeof(*ww));
-          ww->key = new_baton.key;
-          ww->svndiff_len = new_baton.size;
-          ww->text_off = tview_off;
-          ww->text_len = window->tview_len;
-          APR_ARRAY_PUSH(windows, window_write_t *) = ww;
-          tview_off += window->tview_len;
-          diffsize += ww->svndiff_len;
-        }
-    } while (window);
-
-  svn_pool_destroy(wpool);
-
-  digest = svn_txdelta_md5_digest(txdelta_stream);
-  if (!digest)
-    return svn_error_createf(SVN_ERR_DELTA_MD5_CHECKSUM_ABSENT, NULL,
-                             _("Failed to calculate MD5 digest for '%s'"),
-                             pred_key);
-  /* ### Check the digest against something?  pred_rep->md5_checksum? */
-
-  SVN_ERR(svn_fs_bdb__read_rep(&pred_rep, fs, pred_key, trail, pool));
-  new_rep.md5_checksum = svn_checksum_dup(pred_rep->md5_checksum, pool);
-  new_rep.sha1_checksum = svn_checksum_dup(pred_rep->sha1_checksum, pool);
-  new_rep.kind = rep_kind_delta;
-  new_rep.txn_id = NULL;
-
-  chunks = apr_array_make(pool, windows->nelts, sizeof(chunk));
-
-  for (i = 0; i < windows->nelts; i++)
-    {
-      ww = APR_ARRAY_IDX(windows, i, window_write_t *);
-
-      chunk = apr_palloc(pool, sizeof(*chunk));
-      chunk->offset = ww->text_off;
-
-      chunk->version = new_baton.version;
-      chunk->string_key = ww->key;
-      chunk->size = ww->text_len;
-      chunk->rep_key = pred_key;
-
-      APR_ARRAY_PUSH(chunks, rep_delta_chunk_t *) = chunk;
-    }
-
-  new_rep.contents.delta.chunks = chunks;
-  SVN_ERR(svn_fs_bdb__write_rep(fs, key, &new_rep, trail, pool));
-
-  return SVN_NO_ERROR;
-}

Modified: subversion/trunk/subversion/libsvn_fs_base/reps-strings.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/reps-strings.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/reps-strings.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/reps-strings.h Wed Apr 13 09:06:07 2011
@@ -168,19 +168,6 @@ svn_error_t *svn_fs_base__rep_deltify(sv
                                       trail_t *trail,
                                       apr_pool_t *pool);
 
-/* Obliterate KEY's data by creating a new rep that consists of a
-   no-change delta from PRED_KEY's data.  If PRED_KEY is null then
-   construct an empty fulltext instead of a delta.  KEY's old data
-   remains in the database in case some other key's data is derived
-   from it. */
-/* ### TODO: clarify.  What kind of objects are KEY and PRED_KEY, and what
-   does it do with the new rep? */
-svn_error_t *svn_fs_base__rep_obliterate(svn_fs_t *fs,
-                                         const char *key,
-                                         const char *pred_key,
-                                         trail_t *trail,
-                                         apr_pool_t *pool);
-
 
 #ifdef __cplusplus
 }

Modified: subversion/trunk/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/revs-txns.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/revs-txns.c Wed Apr 13 09:06:07 2011
@@ -40,7 +40,6 @@
 #include "revs-txns.h"
 #include "key-gen.h"
 #include "id.h"
-#include "obliterate.h"
 #include "bdb/rev-table.h"
 #include "bdb/txn-table.h"
 #include "bdb/copies-table.h"
@@ -455,51 +454,6 @@ svn_fs_base__add_txn_copy(svn_fs_t *fs,
 }
 
 
-/* Duplicate all entries in the "changes" table that are keyed by OLD_TXN_ID,
- * creating new entries that are keyed by NEW_TXN_ID.
- *
- * Give each new "change" the same content as the old one, except that if the
- * txn-id component of its noderev-id is OLD_TXN_ID (which is the case for
- * all changes except deletes, and for some deletes, it seems) then change
- * that to NEW_TXN_ID.
- *
- * Work within TRAIL. */
-static svn_error_t *
-changes_dup(const char *new_txn_id,
-            const char *old_txn_id,
-            trail_t *trail,
-            apr_pool_t *scratch_pool)
-{
-  apr_array_header_t *changes;
-  int i;
-
-  SVN_ERR(svn_fs_bdb__changes_fetch_raw(&changes, trail->fs, old_txn_id, trail,
-                                        scratch_pool));
-  for (i = 0; i < changes->nelts; i++)
-    {
-      change_t *change = APR_ARRAY_IDX(changes, i, change_t *);
-      const char *node_id = svn_fs_base__id_node_id(change->noderev_id);
-      const char *copy_id = svn_fs_base__id_copy_id(change->noderev_id);
-      const char *txn_id = svn_fs_base__id_txn_id(change->noderev_id);
-
-      /* if (change->kind != svn_fs_path_change_delete
-       *     && change->kind != svn_fs_path_change_reset) */
-      if (svn_fs_base__key_compare(txn_id, old_txn_id) == 0)
-        {
-          /* Modify the "change": change noderev_id's txn_id to NEW_TXN_ID */
-          change->noderev_id = svn_fs_base__id_create(node_id, copy_id,
-                                                      new_txn_id,
-                                                      scratch_pool);
-        }
-
-      /* Save the new "change" */
-      SVN_ERR(svn_fs_bdb__changes_add(trail->fs, new_txn_id, change, trail,
-                                      scratch_pool));
-    }
-  return SVN_NO_ERROR;
-}
-
-
 
 /* Generic transaction operations.  */
 
@@ -683,7 +637,6 @@ svn_fs_base__change_txn_props(svn_fs_txn
 
 static txn_vtable_t txn_vtable = {
   svn_fs_base__commit_txn,
-  svn_fs_base__commit_obliteration_txn,
   svn_fs_base__abort_txn,
   svn_fs_base__txn_prop,
   svn_fs_base__txn_proplist,
@@ -759,126 +712,6 @@ txn_body_begin_txn(void *baton, trail_t 
   return SVN_NO_ERROR;
 }
 
-/* Create a new transaction that is a mutable duplicate of the committed
- * transaction in a particular revision, and able to become a replacement
- * for the transaction in that revision. The duplicate transaction has a new
- * txn-id and is a deep copy of the old one. All references to the txn-id
- * within the copied parts of it are updated.
- *
- * The resulting transaction should be committed by
- * svn_fs_base__commit_obliteration_txn(), not by a normal commit.
- *
- * BATON is of type (struct begin_txn_args *).
- * BATON->base_rev is the revision on which the existing revision
- * is based, i.e. one less than the number of the revision to be replaced.
- * BATON->flags must be 0: specifically, the CHECK_OOD and CHECK_LOCKS
- * flags are not supported.
- *
- * Set BATON->txn_p to point to the new transaction object, allocated in
- * TRAIL->pool.
- */
-static svn_error_t *
-txn_body_begin_obliteration_txn(void *baton, trail_t *trail)
-{
-  struct begin_txn_args *args = baton;
-  int replacing_rev = args->base_rev + 1;
-  const svn_fs_id_t *base_root_id;
-  const char *old_txn_id, *new_txn_id;
-  transaction_t *old_txn, *new_txn;
-
-  /* Obliteration doesn't support these flags */
-  SVN_ERR_ASSERT(! (args->flags & SVN_FS_TXN_CHECK_OOD));
-  SVN_ERR_ASSERT(! (args->flags & SVN_FS_TXN_CHECK_LOCKS));
-
-  /*
-   * This is like a combination of "dup the txn" and "make the txn mutable".
-   * "Dup the txn" means making a deep copy, but with a new txn id.
-   * "Make mutable" is like the opposite of finalizing a txn.
-   *
-   * To dup the txn in r50:
-   *   * dup TRANSACTIONS<t50> to TRANSACTIONS<t50'>
-   *   * dup all referenced NODES<*.*.t50> (not old nodes that are referenced)
-   *   * dup all referenced REPRESENTATIONS<*> to REPRESENTATIONS<*'>
-   *   * create new STRINGS<*> where necessary (###?)
-   *   * dup all CHANGES<t50> to CHANGES<t50'>
-   *   * update COPIES<cpy_id> (We need to keep the copy IDs the same, but will
-   *       need to modify the copy src_txn fields.)
-   *   * update NODE-ORIGINS<node_id>
-   *
-   * At commit time:
-   *   * update CHECKSUM-REPS<csum>
-   */
-
-  /* Implementation:
-   *   - create a new txn (to get a new txn-id)
-   *   - read the new txn
-   *   - modify the new txn locally, duplicating parts of the old txn
-   *   - write the modified new txn
-   *   - return a reference to the new txn
-   */
-
-  /* Create a new txn whose 'root' and 'base root' node-rev ids both point
-   * to the previous revision, like txn_body_begin_txn() does. */
-  SVN_ERR(svn_fs_base__rev_get_root(&base_root_id, trail->fs,
-                                    args->base_rev, trail, trail->pool));
-  SVN_ERR(svn_fs_bdb__create_txn(&new_txn_id, trail->fs, base_root_id,
-                                 trail, trail->pool));
-
-  /* Read the old and new txns */
-  SVN_ERR(svn_fs_base__rev_get_txn_id(&old_txn_id, trail->fs, replacing_rev,
-                                      trail, trail->pool));
-  SVN_ERR(svn_fs_bdb__get_txn(&old_txn, trail->fs, old_txn_id, trail,
-                              trail->pool));
-  SVN_ERR(svn_fs_bdb__get_txn(&new_txn, trail->fs, new_txn_id, trail,
-                              trail->pool));
-
-  /* Populate NEW_TXN with a duplicate of the contents of OLD_TXN. */
-
-  SVN_ERR_ASSERT(new_txn->kind == transaction_kind_normal);
-
-  /* Dup the old txn's root node-rev (recursively). */
-  SVN_ERR(svn_fs_base__node_rev_dup(&new_txn->root_id, old_txn->root_id,
-                                    new_txn_id, old_txn_id, trail,
-                                    trail->pool));
-
-  /* Dup txn->proplist */
-  new_txn->proplist = old_txn->proplist;
-
-  /* Prepare to update the "copies" table.
-   *
-   * As part of obliteration, we need to update all of the "copies" table
-   * rows that are referenced by this txn, to refer to the new txn's
-   * node-rev ids instead. At txn begin time, just keep the references to
-   * the old rows. At commit time, we will update those rows to refer to
-   * this txn's node-rev ids.
-   *
-   * We cannot simply create new "copies" table rows now and make the old
-   * ones obsolete at commit time, because the rows are keyed by copy-id,
-   * and we don't want to change the copy_ids because they pervade node-ids
-   * throughout history.
-   *
-   * ### What actually uses the "copies" table? Does anything use it during
-   * txn construction? Does it need to be keyed by copy-id or could we
-   * change the schema to use arbitrary keys? */
-  if (old_txn->copies)
-    {
-      new_txn->copies = apr_array_copy(trail->pool, old_txn->copies);
-    }
-
-  /* Dup the "changes" that are keyed by the txn_id. */
-  SVN_ERR(changes_dup(new_txn_id, old_txn_id, trail, trail->pool));
-
-  /* Save the modified transaction */
-  SVN_ERR(svn_fs_bdb__put_txn(trail->fs, new_txn, new_txn_id, trail,
-                              trail->pool));
-
-  /* Make and return an in-memory txn object referring to the new txn */
-  *args->txn_p = make_txn(trail->fs, new_txn_id, args->base_rev,
-                          trail->pool);
-  return SVN_NO_ERROR;
-}
-
-
 /* Note:  it is acceptable for this function to call back into
    public FS API interfaces because it does not itself use trails.  */
 svn_error_t *
@@ -913,39 +746,6 @@ svn_fs_base__begin_txn(svn_fs_txn_t **tx
 }
 
 
-/* Create a new transaction in FS that is a mutable clone of the transaction
- * in revision REPLACING_REV and is intended to replace it. Set *TXN_P to
- * point to the new transaction.
- *
- * This is like svn_fs_base__begin_txn() except that it populates the new txn
- * with a mutable clone of revision REPLACING_REV, and it does not support the
- * CHECK_OOD and CHECK_LOCKS flags, and it does not change the date stamp. */
-svn_error_t *
-svn_fs_base__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                                    svn_fs_t *fs,
-                                    svn_revnum_t replacing_rev,
-                                    apr_pool_t *pool)
-{
-  svn_fs_txn_t *txn;
-  struct begin_txn_args args;
-
-  SVN_ERR(svn_fs__check_fs(fs, TRUE));
-
-  /* Make a mutable duplicate of replacing_rev's txn. */
-  /* ### Does all of the duplication need to be done inside the retry_txn?
-   * It is currently inside. */
-  args.txn_p = &txn;
-  args.base_rev = replacing_rev - 1;
-  args.flags = 0;
-  SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_begin_obliteration_txn, &args,
-          FALSE, pool));
-
-  *txn_p = txn;
-
-  return SVN_NO_ERROR;
-}
-
-
 struct open_txn_args
 {
   svn_fs_txn_t **txn_p;

Modified: subversion/trunk/subversion/libsvn_fs_base/revs-txns.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/revs-txns.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/revs-txns.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/revs-txns.h Wed Apr 13 09:06:07 2011
@@ -189,14 +189,6 @@ svn_error_t *svn_fs_base__begin_txn(svn_
                                     svn_revnum_t rev, apr_uint32_t flags,
                                     apr_pool_t *pool);
 
-/* Begin a new transaction in filesystem FS, to replace an existing
-   revision REPLACING_REV.  The new transaction is returned in *TXN_P.
-   Allocate the new transaction structure from POOL. */
-svn_error_t *svn_fs_base__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                                                 svn_fs_t *fs,
-                                                 svn_revnum_t replacing_rev,
-                                                 apr_pool_t *pool);
-
 svn_error_t *svn_fs_base__open_txn(svn_fs_txn_t **txn, svn_fs_t *fs,
                                    const char *name, apr_pool_t *pool);
 

Modified: subversion/trunk/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.c Wed Apr 13 09:06:07 2011
@@ -2773,48 +2773,6 @@ svn_fs_base__commit_txn(const char **con
   return SVN_NO_ERROR;
 }
 
-
-/* Commit BATON->txn as a replacement for the existing transaction in
- * revision BATON->new_rev. BATON is of type (struct commit_args *).
- *
- * If the commit succeeds, ARGS->txn is destroyed.
- */
-static svn_error_t *
-txn_body_commit_obliteration(void *baton, trail_t *trail)
-{
-  struct commit_args *args = baton;
-
-  return svn_fs_base__dag_commit_obliteration_txn(args->new_rev, args->txn,
-                                                  trail, trail->pool);
-}
-
-
-/* ### Under development */
-svn_error_t *
-svn_fs_base__commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                     svn_fs_txn_t *txn,
-                                     apr_pool_t *pool)
-{
-  struct commit_args commit_args;
-
-  /* Commit the replacement transaction. */
-  /* We do not need a re-try loop like the (catch up to head, try to
-   * commit) loop that svn_fs_base__commit_txn() uses, because the only
-   * concurrent changes that can affect this old revision are other
-   * obliterates, and they are presently ...
-   * ### what - not handled, not supported, mutually exclusive? */
-  commit_args.new_rev = replacing_rev;
-  commit_args.txn = txn;
-  SVN_ERR(svn_fs_base__retry_txn(txn->fs, txn_body_commit_obliteration,
-                                 &commit_args, FALSE, pool));
-
-  /* Remove the old txn and any unreferenced data attached to it. */
-  /* ### ... */
-
-  return SVN_NO_ERROR;
-}
-
-
 /* Note:  it is acceptable for this function to call back into
    public FS API interfaces because it does not itself use trails.  */
 static svn_error_t *
@@ -2940,95 +2898,6 @@ svn_fs_base__deltify(svn_fs_t *fs,
   return deltify_mutable(fs, root, "/", NULL, svn_node_dir, txn_id, pool);
 }
 
-
-struct txn_obliterate_rep_args
-{
-  const svn_fs_id_t *id;
-  svn_boolean_t has_pred;
-  const svn_fs_id_t *pred_id;
-};
-
-static svn_error_t *
-txn_body_obliterate_rep(void *baton, trail_t *trail)
-{
-  struct txn_obliterate_rep_args *args = baton;
-  dag_node_t *node, *pred_node;
-
-  SVN_ERR(svn_fs_base__dag_get_node(&node, trail->fs, args->id,
-                                    trail, trail->pool));
-  if (args->has_pred)
-    {
-      SVN_ERR(svn_fs_base__dag_get_node(&pred_node, trail->fs, args->pred_id,
-                                        trail, trail->pool));
-    }
-  else
-    {
-      pred_node = NULL;
-    }
-
-  SVN_ERR(svn_fs_base__dag_obliterate_rep(node, pred_node, trail, trail->pool));
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_fs_base__obliterate_rep(svn_fs_t *fs,
-                            const char *path,
-                            svn_revnum_t revision,
-                            apr_pool_t *pool)
-{
-  svn_fs_root_t *root;
-  const char *txn_id;
-  struct rev_get_txn_id_args get_txn_args;
-  const svn_fs_id_t *id;
-  svn_node_kind_t kind;
-  struct txn_pred_count_args pred_count_args;
-  struct txn_obliterate_rep_args oblit_args;
-
-  SVN_ERR(svn_fs_base__revision_root(&root, fs, revision, pool));
-  get_txn_args.txn_id = &txn_id;
-  get_txn_args.revision = revision;
-  SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_rev_get_txn_id, &get_txn_args,
-                                 FALSE, pool));
-
-  SVN_ERR(base_node_id(&id, root, path, pool));
-  if (strcmp(svn_fs_base__id_txn_id(id), txn_id))
-    return svn_error_createf(SVN_ERR_FS_NOT_MUTABLE, NULL,
-                             _("Unexpected immutable node at '%s'"), path);
-
-  SVN_ERR(base_check_path(&kind, root, path, pool));
-  if (kind != svn_node_file)
-    return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL,
-                             _("Cannot obliterate '%s' as it is not a file"),
-                             path);
-
-  pred_count_args.id = id;
-  SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_pred_count, &pred_count_args,
-                                 FALSE, pool));
-
-  if (pred_count_args.pred_count > 0)
-    {
-      struct txn_pred_id_args pred_id_args;
-
-      pred_id_args.id = id;
-      pred_id_args.pool = pool;
-      SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_pred_id, &pred_id_args,
-                                     FALSE, pool));
-
-      oblit_args.has_pred = TRUE;
-      oblit_args.pred_id = pred_id_args.pred_id;
-    }
-  else
-    {
-      oblit_args.has_pred = FALSE;
-    }
-  oblit_args.id = id;
-
-  return svn_fs_base__retry_txn(fs, txn_body_obliterate_rep, &oblit_args,
-                                TRUE, pool);
-}
-
-
 
 /* Modifying directories */
 

Modified: subversion/trunk/subversion/libsvn_fs_base/tree.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/tree.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/tree.h (original)
+++ subversion/trunk/subversion/libsvn_fs_base/tree.h Wed Apr 13 09:06:07 2011
@@ -44,10 +44,6 @@ svn_error_t *svn_fs_base__commit_txn(con
                                      svn_revnum_t *new_rev, svn_fs_txn_t *txn,
                                      apr_pool_t *pool);
 
-svn_error_t *svn_fs_base__commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                                  svn_fs_txn_t *txn,
-                                                  apr_pool_t *pool);
-
 svn_error_t *svn_fs_base__txn_root(svn_fs_root_t **root_p, svn_fs_txn_t *txn,
                                    apr_pool_t *pool);
 
@@ -103,13 +99,6 @@ svn_fs_base__validate_mergeinfo(svn_merg
                                 apr_pool_t *result_pool,
                                 apr_pool_t *scratch_pool);
 
-/* ### Experimental obliterate-like-deltify - see implementation. */
-svn_error_t *
-svn_fs_base__obliterate_rep(svn_fs_t *fs,
-                            const char *path,
-                            svn_revnum_t revision,
-                            apr_pool_t *pool);
-
 
 #ifdef __cplusplus
 }

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs.c Wed Apr 13 09:06:07 2011
@@ -149,7 +149,6 @@ static fs_vtable_t fs_vtable = {
   svn_fs_fs__set_uuid,
   svn_fs_fs__revision_root,
   svn_fs_fs__begin_txn,
-  svn_fs_fs__begin_obliteration_txn,
   svn_fs_fs__open_txn,
   svn_fs_fs__purge_txn,
   svn_fs_fs__list_transactions,

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Apr 13 09:06:07 2011
@@ -131,7 +131,6 @@ are likely some errors because of that.
 /* The vtable associated with an open transaction object. */
 static txn_vtable_t txn_vtable = {
   svn_fs_fs__commit_txn,
-  svn_fs_fs__commit_obliteration_txn,
   svn_fs_fs__abort_txn,
   svn_fs_fs__txn_prop,
   svn_fs_fs__txn_proplist,
@@ -4919,65 +4918,6 @@ svn_fs_fs__create_txn(svn_fs_txn_t **txn
                             pool);
 }
 
-/* Create and set *TXN_P to a new transaction in FS that is a mutable clone
- * of revision REPLACING_REV and is intended to replace it.
- *
- * Ways to implement it:
- * 1. Call svn_fs_fs__create_txn(based_on_rev),
- *    then adjust txn's content to match replacing_rev's content. (Can't
- *    simply apply the same changes; have to make it a clone so all copy
- *    id's etc. are identical.)
- * 2. Construct a txn the way __create_txn() would, but clone the root node
- *    of REPLACING_REV rather than making a versioned copy of it.
- */
-static svn_error_t *
-svn_fs_fs__create_obliteration_txn(svn_fs_txn_t **txn_p,
-                                   svn_fs_t *fs,
-                                   svn_revnum_t replacing_rev,
-                                   apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-  svn_fs_txn_t *txn;
-  svn_fs_id_t *old_root_id;
-  svn_revnum_t based_on_rev = replacing_rev - 1;
-
-  txn = apr_pcalloc(pool, sizeof(*txn));
-
-  /* Get the txn_id. */
-  SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT);
-  SVN_ERR(create_txn_dir(&txn->id, fs, based_on_rev, pool));
-
-  txn->fs = fs;
-  txn->base_rev = based_on_rev;
-
-  txn->vtable = &txn_vtable;
-  *txn_p = txn;
-
-  /* Find the root of the replaced ("old") revision. */
-  SVN_ERR(svn_fs_fs__rev_get_root(&old_root_id, fs, replacing_rev, pool));
-
-  /* Create a new root node for this transaction, based on replacing-rev. */
-  /* ### Not like this... This makes the new txn's root node be a "new
-   * version" of the old one's root node. I need it to be a "clone" instead. */
-  SVN_ERR(create_new_txn_noderev_from_rev(fs, txn->id, old_root_id, pool));
-
-  /* Create an empty rev file. */
-  SVN_ERR(svn_io_file_create(path_txn_proto_rev(fs, txn->id, pool), "",
-                             pool));
-
-  /* Create an empty rev-lock file. */
-  SVN_ERR(svn_io_file_create(path_txn_proto_rev_lock(fs, txn->id, pool), "",
-                             pool));
-
-  /* Create an empty changes file. */
-  SVN_ERR(svn_io_file_create(path_txn_changes(fs, txn->id, pool), "",
-                             pool));
-
-  /* Create the next-ids file. */
-  return svn_io_file_create(path_txn_next_ids(fs, txn->id, pool), "0 0\n",
-                            pool);
-}
-
 /* Store the property list for transaction TXN_ID in PROPLIST.
    Perform temporary allocations in POOL. */
 static svn_error_t *
@@ -6475,102 +6415,6 @@ commit_body(void *baton, apr_pool_t *poo
   return SVN_NO_ERROR;
 }
 
-/* The work-horse for svn_fs_fs__commit_obliteration, called with the FS write lock.
-   This implements the svn_fs_fs__with_write_lock() 'body' callback
-   type.  BATON is a 'struct commit_baton *'. */
-static svn_error_t *
-commit_obliteration_body(void *baton, apr_pool_t *pool)
-{
-  struct commit_baton *cb = baton;
-  fs_fs_data_t *ffd = cb->fs->fsap_data;
-  const char *old_rev_filename, *rev_filename, *proto_filename;
-  const char *revprop_filename, *final_revprop;
-  const svn_fs_id_t *root_id, *new_root_id;
-  const char *start_node_id = NULL, *start_copy_id = NULL;
-  svn_revnum_t rev = *cb->new_rev_p;
-  svn_revnum_t old_rev = rev, new_rev = rev;  /* ### relics of normal commit */
-  apr_file_t *proto_file;
-  void *proto_file_lockcookie;
-  apr_off_t initial_offset, changed_path_offset;
-  char *buf;
-
-  /* ### Someday support obliterating packed revisions. Maybe. */
-  if (is_packed_rev(cb->fs, rev))
-    return svn_error_create(SVN_ERR_FS_GENERAL, NULL,
-                            _("Obliteration of already-packed revision "
-                              "is not supported"));
-
-  /* Get the next node_id and copy_id to use. */
-  if (ffd->format < SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
-    /* ### But not like this, perhaps, for obliterate? Or, if so, then we
-     * should increment and write back this info in the 'current' file as
-     * the non-oblit commit does. */
-    SVN_ERR(get_next_revision_ids(&start_node_id, &start_copy_id, cb->fs,
-                                  pool));
-
-  /* Get a write handle on the proto revision file. */
-  SVN_ERR(get_writable_proto_rev(&proto_file, &proto_file_lockcookie,
-                                 cb->fs, cb->txn->id, pool));
-  SVN_ERR(get_file_offset(&initial_offset, proto_file, pool));
-
-  /* Write out all the node-revisions and directory contents. */
-  root_id = svn_fs_fs__id_txn_create("0", "0", cb->txn->id, pool);
-  SVN_ERR(write_final_rev(&new_root_id, proto_file, new_rev, cb->fs, root_id,
-                          start_node_id, start_copy_id, initial_offset,
-                          cb->reps_to_cache, cb->reps_pool,
-                          pool));
-
-  /* Write the changed-path information. */
-  SVN_ERR(write_final_changed_path_info(&changed_path_offset, proto_file,
-                                        cb->fs, cb->txn->id, pool));
-
-  /* Write the final line. */
-  buf = apr_psprintf(pool, "\n%" APR_OFF_T_FMT " %" APR_OFF_T_FMT "\n",
-                     svn_fs_fs__id_offset(new_root_id),
-                     changed_path_offset);
-  SVN_ERR(svn_io_file_write_full(proto_file, buf, strlen(buf), NULL,
-                                 pool));
-  SVN_ERR(svn_io_file_flush_to_disk(proto_file, pool));
-  SVN_ERR(svn_io_file_close(proto_file, pool));
-
-  /* We don't unlock the prototype revision file immediately to avoid a
-     race with another caller writing to the prototype revision file
-     before we commit it. */
-
-  /* Move the finished rev file into place. */
-  if (is_packed_rev(cb->fs, rev))
-    {
-      /* ### complexity */
-      SVN_ERR_MALFUNCTION();
-    }
-  else
-    {
-      SVN_ERR(svn_fs_fs__path_rev_absolute(&old_rev_filename,
-                                           cb->fs, old_rev, pool));
-      rev_filename = path_rev(cb->fs, new_rev, pool);
-      proto_filename = path_txn_proto_rev(cb->fs, cb->txn->id, pool);
-      SVN_ERR(move_into_place(proto_filename, rev_filename, old_rev_filename,
-                              pool));
-    }
-
-  /* Now that we've moved the prototype revision file out of the way,
-     we can unlock it (since further attempts to write to the file
-     will fail as it no longer exists).  We must do this so that we can
-     remove the transaction directory later. */
-  SVN_ERR(unlock_proto_rev(cb->fs, cb->txn->id, proto_file_lockcookie, pool));
-
-  /* Move the revprops file into place. */
-  revprop_filename = path_txn_props(cb->fs, cb->txn->id, pool);
-  final_revprop = path_revprops(cb->fs, new_rev, pool);
-  SVN_ERR(move_into_place(revprop_filename, final_revprop, old_rev_filename,
-                          pool));
-
-  /* Remove this transaction directory. */
-  SVN_ERR(svn_fs_fs__purge_txn(cb->fs, cb->txn->id, pool));
-
-  return SVN_NO_ERROR;
-}
-
 /* Add the representations in REPS_TO_CACHE (an array of representation_t *)
  * to the rep-cache database of FS. */
 static svn_error_t *
@@ -6648,48 +6492,6 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs_fs__commit_obliteration(svn_revnum_t rev,
-                               svn_fs_t *fs,
-                               svn_fs_txn_t *txn,
-                               apr_pool_t *pool)
-{
-  struct commit_baton cb;
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  /* Analogous to svn_fs_fs__commit(). */
-  cb.new_rev_p = &rev;
-  cb.fs = fs;
-  cb.txn = txn;
-
-  if (ffd->rep_sharing_allowed)
-    {
-      cb.reps_to_cache = apr_array_make(pool, 5, sizeof(representation_t *));
-      cb.reps_pool = pool;
-    }
-  else
-    {
-      cb.reps_to_cache = NULL;
-      cb.reps_pool = NULL;
-    }
-
-  /* Commit the obliteration revision */
-  SVN_ERR(svn_fs_fs__with_write_lock(fs, commit_obliteration_body, &cb, pool));
-
-  /* TODO: Update the rep cache: in particular, delete invalid entries, and
-   * ensure we will re-validate entries that may already be in pending txns. */
-  if (ffd->rep_sharing_allowed)
-    {
-      /* ###
-       * SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool));
-       * SVN_ERR(svn_sqlite__with_transaction(ffd->rep_cache_db,
-       *                                      commit_sqlite_txn_callback,
-       *                                      &cb, pool));
-       */
-    }
-
-  return SVN_NO_ERROR;
-}
 
 svn_error_t *
 svn_fs_fs__reserve_copy_id(const char **copy_id_p,
@@ -7738,29 +7540,6 @@ svn_fs_fs__begin_txn(svn_fs_txn_t **txn_
   return svn_fs_fs__change_txn_props(*txn_p, props, pool);
 }
 
-svn_error_t *
-svn_fs_fs__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                                  svn_fs_t *fs,
-                                  svn_revnum_t replacing_rev,
-                                  apr_pool_t *pool)
-{
-  apr_array_header_t *props = apr_array_make(pool, 0, sizeof(svn_prop_t));
-
-  SVN_ERR(svn_fs__check_fs(fs, TRUE));
-
-  SVN_ERR(svn_fs_fs__create_obliteration_txn(txn_p, fs, replacing_rev, pool));
-
-  /* ### Not sure if we need to do anything to this txn such as
-   * - setting temporary txn props (as done in svn_fs_fs__begin_txn())
-   * - recording its intended revision number so we can check it later */
-
-  /* ### This "change txn props" call is just because if the txn props file
-   * doesn't exist, a call to svn_fs_fs__txn_proplist() later fails. */
-  SVN_ERR(svn_fs_fs__change_txn_props(*txn_p, props, pool));
-
-  return SVN_NO_ERROR;
-}
-
 
 /****** Packing FSFS shards *********/
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.h Wed Apr 13 09:06:07 2011
@@ -316,15 +316,6 @@ svn_error_t *svn_fs_fs__commit(svn_revnu
                                svn_fs_txn_t *txn,
                                apr_pool_t *pool);
 
-/* Commit the obliteration transaction TXN in filesystem FS for
-   revision number REV.  If the transaction is out of date (### meaning what?), return
-   the error SVN_ERR_FS_TXN_OUT_OF_DATE.  Use POOL for temporary
-   allocations. */
-svn_error_t *svn_fs_fs__commit_obliteration(svn_revnum_t rev,
-                                            svn_fs_t *fs,
-                                            svn_fs_txn_t *txn,
-                                            apr_pool_t *pool);
-
 /* Return the next available copy_id in *COPY_ID for the transaction
    TXN_ID in filesystem FS.  Allocate space in POOL. */
 svn_error_t *svn_fs_fs__reserve_copy_id(const char **copy_id,
@@ -475,16 +466,6 @@ svn_error_t *svn_fs_fs__begin_txn(svn_fs
                                   svn_revnum_t rev, apr_uint32_t flags,
                                   apr_pool_t *pool);
 
-/* Begin a new transaction in filesystem FS, intended to replace the
-   existing revision REPLACING_REV.  The new transaction will be based on
-   revision (REPLACING_REV - 1) but will have content identical to revision
-   REPLACING_REV.  Set *TXN_P to the new transaction structure, allocated
-   in POOL. */
-svn_error_t *svn_fs_fs__begin_obliteration_txn(svn_fs_txn_t **txn_p,
-                                               svn_fs_t *fs,
-                                               svn_revnum_t replacing_rev,
-                                               apr_pool_t *pool);
-
 /* Find the value of the property named PROPNAME in transaction TXN.
    Return the contents in *VALUE_P.  The contents will be allocated
    from POOL. */

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Wed Apr 13 09:06:07 2011
@@ -1733,25 +1733,6 @@ svn_fs_fs__commit_txn(const char **confl
 }
 
 
-svn_error_t *
-svn_fs_fs__commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                   svn_fs_txn_t *txn,
-                                   apr_pool_t *pool)
-{
-  svn_error_t *err = SVN_NO_ERROR;
-  svn_fs_t *fs = txn->fs;
-
-  /* Try to commit. */
-  err = svn_fs_fs__commit_obliteration(replacing_rev, fs, txn, pool);
-  if (err && (err->apr_err == SVN_ERR_FS_TXN_OUT_OF_DATE))
-    {
-      /* ### ? */
-    }
-
-  return svn_error_return(err);
-}
-
-
 /* Merge changes between two nodes into a third node.  Given nodes
    SOURCE_PATH under SOURCE_ROOT, TARGET_PATH under TARGET_ROOT and
    ANCESTOR_PATH under ANCESTOR_ROOT, modify target to contain all the

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.h (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.h Wed Apr 13 09:06:07 2011
@@ -47,12 +47,6 @@ svn_error_t *svn_fs_fs__commit_txn(const
                                    svn_revnum_t *new_rev, svn_fs_txn_t *txn,
                                    apr_pool_t *pool);
 
-/* Commit the transaction TXN as a replacement for revision REPLACING_REV.
-   Perform temporary allocations in POOL. */
-svn_error_t *svn_fs_fs__commit_obliteration_txn(svn_revnum_t replacing_rev,
-                                                svn_fs_txn_t *txn,
-                                                apr_pool_t *pool);
-
 /* Set ROOT_P to the root directory of transaction TXN.  Allocate the
    structure in POOL. */
 svn_error_t *svn_fs_fs__txn_root(svn_fs_root_t **root_p, svn_fs_txn_t *txn,

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Wed Apr 13 09:06:07 2011
@@ -1248,24 +1248,6 @@ svn_ra_get_deleted_rev(svn_ra_session_t 
   return err;
 }
 
-svn_error_t *
-svn_ra__obliterate_path_rev(svn_ra_session_t *session,
-                            svn_revnum_t rev,
-                            const char *path,
-                            apr_pool_t *pool)
-{
-  const char *session_url;
-
-  SVN_ERR(svn_ra_get_session_url(session, &session_url, pool));
-
-  if (session->vtable->obliterate_path_rev == NULL)
-    return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL,
-                            _("Obliterate is not supported by this "
-                              "Repository Access method"));
-
-  return session->vtable->obliterate_path_rev(session, rev, path, pool);
-}
-
 
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra/ra_loader.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/trunk/subversion/libsvn_ra/ra_loader.h Wed Apr 13 09:06:07 2011
@@ -262,11 +262,6 @@ typedef struct svn_ra__vtable_t {
                                   svn_revnum_t end_revision,
                                   svn_revnum_t *revision_deleted,
                                   apr_pool_t *pool);
-  /* See svn_ra__obliterate_path_rev() for details. */
-  svn_error_t *(*obliterate_path_rev)(svn_ra_session_t *session,
-                                      svn_revnum_t revision,
-                                      const char *path,
-                                      apr_pool_t *pool);
 
 } svn_ra__vtable_t;
 

Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Wed Apr 13 09:06:07 2011
@@ -1457,28 +1457,6 @@ svn_ra_local__get_deleted_rev(svn_ra_ses
   return SVN_NO_ERROR;
 }
 
-/* Implements svn_ra__vtable_t.obliterate_path_rev. */
-static svn_error_t *
-svn_ra_local__obliterate_path_rev(svn_ra_session_t *session,
-                                  svn_revnum_t revision,
-                                  const char *path,
-                                  apr_pool_t *pool)
-{
-  svn_ra_local__session_baton_t *sess = session->priv;
-  const char *abs_path  = svn_fspath__join(sess->fs_path->data, path, pool);
-
-  /* A username is absolutely required to obliterate anything. */
-  SVN_ERR(get_username(session, pool));
-
-  SVN_ERR(svn_repos__obliterate_path_rev(sess->repos,
-                                         sess->username,
-                                         revision,
-                                         abs_path,
-                                         pool));
-
-  return SVN_NO_ERROR;
-}
-
 /*----------------------------------------------------------------*/
 
 static const svn_version_t *
@@ -1525,8 +1503,7 @@ static const svn_ra__vtable_t ra_local_v
   svn_ra_local__replay,
   svn_ra_local__has_capability,
   svn_ra_local__replay_range,
-  svn_ra_local__get_deleted_rev,
-  svn_ra_local__obliterate_path_rev
+  svn_ra_local__get_deleted_rev
 };
 
 

Modified: subversion/trunk/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/session.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/session.c Wed Apr 13 09:06:07 2011
@@ -1231,8 +1231,7 @@ static const svn_ra__vtable_t neon_vtabl
   svn_ra_neon__replay,
   svn_ra_neon__has_capability,
   svn_ra_neon__replay_range,
-  svn_ra_neon__get_deleted_rev,
-  NULL  /* svn_ra_neon__obliterate_path_rev */
+  svn_ra_neon__get_deleted_rev
 };
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Wed Apr 13 09:06:07 2011
@@ -1063,8 +1063,7 @@ static const svn_ra__vtable_t serf_vtabl
   svn_ra_serf__replay,
   svn_ra_serf__has_capability,
   svn_ra_serf__replay_range,
-  svn_ra_serf__get_deleted_rev,
-  NULL  /* svn_ra_serf__obliterate_path_rev */
+  svn_ra_serf__get_deleted_rev
 };
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Wed Apr 13 09:06:07 2011
@@ -2547,8 +2547,7 @@ static const svn_ra__vtable_t ra_svn_vta
   ra_svn_replay,
   ra_svn_has_capability,
   ra_svn_replay_range,
-  ra_svn_get_deleted_rev,
-  NULL  /* ra_svn_obliterate_path_rev */
+  ra_svn_get_deleted_rev
 };
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/hooks.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/hooks.c (original)
+++ subversion/trunk/subversion/libsvn_repos/hooks.c Wed Apr 13 09:06:07 2011
@@ -126,8 +126,6 @@ check_hook_result(const char *name, cons
         action = _("Commit");
       else if (strcmp(name, "pre-revprop-change") == 0)
         action = _("Revprop change");
-      else if (strcmp(name, "pre-obliterate") == 0)
-        action = _("Obliteration");
       else if (strcmp(name, "pre-lock") == 0)
         action = _("Lock");
       else if (strcmp(name, "pre-unlock") == 0)
@@ -587,92 +585,6 @@ svn_repos__hooks_post_revprop_change(svn
 
 
 svn_error_t  *
-svn_repos__hooks_pre_obliterate(svn_repos_t *repos,
-                                svn_revnum_t rev,
-                                const char *author,
-                                const svn_string_t *obliteration_set,
-                                apr_pool_t *pool)
-{
-  const char *hook = svn_repos__pre_obliterate_hook(repos, pool);
-  svn_boolean_t broken_link;
-
-  if ((hook = check_hook_cmd(hook, &broken_link, pool)) && broken_link)
-    {
-      return hook_symlink_error(hook);
-    }
-  else if (hook)
-    {
-      const char *args[4];
-      apr_file_t *stdin_handle = NULL;
-
-      /* Pass the Obliteration Set as stdin to hook */
-      SVN_ERR(create_temp_file(&stdin_handle, obliteration_set, pool));
-
-      args[0] = hook;
-      args[1] = svn_dirent_local_style(svn_repos_path(repos, pool), pool);
-      args[2] = author ? author : "";
-      args[3] = NULL;
-
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_OBLITERATE, hook, args,
-                           stdin_handle, pool));
-
-      SVN_ERR(svn_io_file_close(stdin_handle, pool));
-    }
-  else
-    {
-      /* If the pre- hook doesn't exist at all, then default to
-         MASSIVE PARANOIA.  Obliteration is a lossy
-         operation; so unless the repository admininstrator has
-         *deliberately* created the pre-hook, disallow all changes. */
-      return
-        svn_error_create
-        (SVN_ERR_REPOS_DISABLED_FEATURE, NULL,
-         _("Repository has not been enabled to accept obliteration"));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t  *
-svn_repos__hooks_post_obliterate(svn_repos_t *repos,
-                                 svn_revnum_t rev,
-                                 const char *author,
-                                 const svn_string_t *obliteration_set,
-                                 apr_pool_t *pool)
-{
-  const char *hook = svn_repos_post_revprop_change_hook(repos, pool);
-  svn_boolean_t broken_link;
-
-  if ((hook = check_hook_cmd(hook, &broken_link, pool)) && broken_link)
-    {
-      return hook_symlink_error(hook);
-    }
-  else if (hook)
-    {
-      const char *args[4];
-      apr_file_t *stdin_handle = NULL;
-
-      /* Pass the Obliteration Set as stdin to hook */
-      SVN_ERR(create_temp_file(&stdin_handle, obliteration_set, pool));
-
-      args[0] = hook;
-      args[1] = svn_dirent_local_style(svn_repos_path(repos, pool), pool);
-      args[2] = author ? author : "";
-      args[3] = NULL;
-
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_REVPROP_CHANGE, hook,
-                           args, stdin_handle, pool));
-
-      SVN_ERR(svn_io_file_close(stdin_handle, pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
-
-svn_error_t  *
 svn_repos__hooks_pre_lock(svn_repos_t *repos,
                           const char **token,
                           const char *path,

Modified: subversion/trunk/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.c?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/repos.c (original)
+++ subversion/trunk/subversion/libsvn_repos/repos.c Wed Apr 13 09:06:07 2011
@@ -163,22 +163,6 @@ svn_repos_post_revprop_change_hook(svn_r
 }
 
 
-const char *
-svn_repos__pre_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
-{
-  return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_PRE_OBLITERATE,
-                       pool);
-}
-
-
-const char *
-svn_repos__post_obliterate_hook(svn_repos_t *repos, apr_pool_t *pool)
-{
-  return svn_dirent_join(repos->hook_path, SVN_REPOS__HOOK_POST_OBLITERATE,
-                       pool);
-}
-
-
 static svn_error_t *
 create_repos_dir(const char *path, apr_pool_t *pool)
 {
@@ -546,82 +530,6 @@ PREWRITTEN_HOOKS_TEXT
   }  /* end pre-revprop-change hook */
 
 
-#ifdef SVN_WITH_EXPERIMENTAL_OBLITERATE
-  /* Pre-obliterate hook. */
-  {
-    this_path = apr_psprintf(pool, "%s%s",
-                             svn_repos__pre_obliterate_hook(repos, pool),
-                             SVN_REPOS__HOOK_DESC_EXT);
-
-#define SCRIPT_NAME SVN_REPOS__HOOK_PRE_OBLITERATE
-
-    contents =
-"#!/bin/sh"                                                                  NL
-""                                                                           NL
-"# PRE-OBLITERATE HOOK"                                                      NL
-"#"                                                                          NL
-"# The pre-obliterate hook is invoked before an obliteration.  Subversion"   NL
-"# runs this hook by invoking a program (script, executable, binary, etc.)"  NL
-"# named '"SCRIPT_NAME"' (for which this file is a template), with the"      NL
-"# following ordered arguments and input:"                                   NL
-"#"                                                                          NL
-"#   [1] REPOS-PATH   (the path to this repository)"                         NL
-"#   [2] USER         (the username of the person trying to obliterate)"     NL
-"#"                                                                          NL
-"#   [STDIN] OBLITERATION-SET   (a list of PATH@REV, one per line)"          NL
-"#"                                                                          NL
-"# If the hook program exits with success, the obliteration happens; but"    NL
-"# if it exits with failure (non-zero), the obliteration doesn't happen."    NL
-"# The hook program can use the 'svnlook' utility to examine the"            NL
-"# existing history of the repository."                                      NL
-"#"                                                                          NL
-"# NOTE: Unlike most other hooks, this hook MUST exist for obliteration"     NL
-"# to be enabled.  If the hook does not exist, Subversion"                   NL
-"# will behave as if the hook were present, but failed.  The reason"         NL
-"# for this is that obliteration is irreversible: the old data is gone"      NL
-"# forever."                                                                 NL
-"#"                                                                          NL
-"# WARNING: We recommend not enabling the hook until:"                       NL
-"#   - it is needed;"                                                        NL
-"#   - there is a good repository back-up and restore procedure operating;"  NL
-"#   - the user name(s) to be allowed obliteration privileges are"           NL
-"#       authenticated user names with strong passwords;"                    NL
-"#   - the hook script has been tested."                                     NL
-"#"                                                                          NL
-"# On a Unix system, the normal procedure is to have '"SCRIPT_NAME"'"        NL
-"# invoke other programs to do the real work, though it may do the"          NL
-"# work itself too."                                                         NL
-"#"                                                                          NL
-"# Note that '"SCRIPT_NAME"' must be executable by the user(s) who will"     NL
-"# invoke it (typically the user httpd runs as), and that user must"         NL
-"# have filesystem-level permission to access the repository."               NL
-"#"                                                                          NL
-"# On a Windows system, you should name the hook program"                    NL
-"# '"SCRIPT_NAME".bat' or '"SCRIPT_NAME".exe',"                              NL
-"# but the basic idea is the same."                                          NL
-"#"                                                                          NL
-HOOKS_ENVIRONMENT_TEXT
-"#"                                                                          NL
-"# Here is an example hook script, for a Unix /bin/sh interpreter."          NL
-PREWRITTEN_HOOKS_TEXT
-""                                                                           NL
-""                                                                           NL
-"REPOS=\"$1\""                                                               NL
-"USER=\"$2\""                                                                NL
-""                                                                           NL
-"if [ \"$USER\" = \"the-admin\" ]; then exit 0; fi"                          NL
-""                                                                           NL
-"echo \"Obliteration is not enabled for normal users\" >&2"                  NL
-"exit 1"                                                                     NL;
-
-#undef SCRIPT_NAME
-
-    SVN_ERR_W(svn_io_file_create(this_path, contents, pool),
-              _("Creating pre-obliterate hook"));
-  }  /* end pre-obliterate hook */
-#endif
-
-
   /* Pre-lock hook. */
   {
     this_path = apr_psprintf(pool, "%s%s",
@@ -1039,66 +947,6 @@ PREWRITTEN_HOOKS_TEXT
               _("Creating post-revprop-change hook"));
   } /* end post-revprop-change hook */
 
-#ifdef SVN_WITH_EXPERIMENTAL_OBLITERATE
-  /* Post-obliterate hook. */
-  {
-    this_path = apr_psprintf(pool, "%s%s",
-                             svn_repos__post_obliterate_hook(repos, pool),
-                             SVN_REPOS__HOOK_DESC_EXT);
-
-#define SCRIPT_NAME SVN_REPOS__HOOK_POST_OBLITERATE
-
-    contents =
-"#!/bin/sh"                                                                  NL
-""                                                                           NL
-"# POST-OBLITERATE HOOK"                                                     NL
-"#"                                                                          NL
-"# The post-obliterate hook is invoked after an obliteration."               NL
-"# Subversion runs this hook by invoking a program (script, executable,"     NL
-"# binary, etc.) named '"SCRIPT_NAME"' (for which this file is a template)," NL
-"# with the following ordered arguments:"                                    NL
-"#"                                                                          NL
-"#   [1] REPOS-PATH   (the path to this repository)"                         NL
-"#   [2] USER         (the username of the person trying to obliterate)"     NL
-"#"                                                                          NL
-"#   [STDIN] OBLITERATION-SET   (a list of PATH@REV, one per line)"          NL
-"#"                                                                          NL
-"# Because the obliteration has already completed and cannot be undone,"     NL
-"# the exit code of the hook program is ignored.  The hook program"          NL
-"# can use the 'svnlook' utility to help it examine the"                     NL
-"# new history of the repository."                                           NL
-"#"                                                                          NL
-"# On a Unix system, the normal procedure is to have '"SCRIPT_NAME"'"        NL
-"# invoke other programs to do the real work, though it may do the"          NL
-"# work itself too."                                                         NL
-"#"                                                                          NL
-"# Note that '"SCRIPT_NAME"' must be executable by the user(s) who will"     NL
-"# invoke it (typically the user httpd runs as), and that user must"         NL
-"# have filesystem-level permission to access the repository."               NL
-"#"                                                                          NL
-"# On a Windows system, you should name the hook program"                    NL
-"# '"SCRIPT_NAME".bat' or '"SCRIPT_NAME".exe',"                              NL
-"# but the basic idea is the same."                                          NL
-"#"                                                                          NL
-HOOKS_ENVIRONMENT_TEXT
-"# "                                                                         NL
-"# Here is an example hook script, for a Unix /bin/sh interpreter."          NL
-PREWRITTEN_HOOKS_TEXT
-""                                                                           NL
-""                                                                           NL
-"REPOS=\"$1\""                                                               NL
-"USER=\"$2\""                                                                NL
-""                                                                           NL
-"# Send out an email notification"                                           NL
-"mailer.py obliterate \"$REPOS\" \"$USER\" /path/to/mailer.conf"             NL;
-
-#undef SCRIPT_NAME
-
-    SVN_ERR_W(svn_io_file_create(this_path, contents, pool),
-              _("Creating post-obliterate hook"));
-  } /* end post-obliterate hook */
-#endif
-
   return SVN_NO_ERROR;
 }
 

Modified: subversion/trunk/subversion/libsvn_repos/repos.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.h?rev=1091717&r1=1091716&r2=1091717&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/repos.h (original)
+++ subversion/trunk/subversion/libsvn_repos/repos.h Wed Apr 13 09:06:07 2011
@@ -76,8 +76,6 @@ extern "C" {
 #define SVN_REPOS__HOOK_WRITE_SENTINEL  "write-sentinels"
 #define SVN_REPOS__HOOK_PRE_REVPROP_CHANGE  "pre-revprop-change"
 #define SVN_REPOS__HOOK_POST_REVPROP_CHANGE "post-revprop-change"
-#define SVN_REPOS__HOOK_PRE_OBLITERATE  "pre-obliterate"
-#define SVN_REPOS__HOOK_POST_OBLITERATE "post-obliterate"
 #define SVN_REPOS__HOOK_PRE_LOCK        "pre-lock"
 #define SVN_REPOS__HOOK_POST_LOCK       "post-lock"
 #define SVN_REPOS__HOOK_PRE_UNLOCK      "pre-unlock"
@@ -224,43 +222,6 @@ svn_repos__hooks_post_revprop_change(svn
                                      char action,
                                      apr_pool_t *pool);
 
-/* Run the pre-obliterate hook for REPOS.  Use POOL for any
-   temporary allocations.  If the hook fails, return
-   SVN_ERR_REPOS_HOOK_FAILURE.
-
-   REV is the revision whose property is being changed.
-   AUTHOR is the authenticated name of the user changing the prop.
-   OBLITERATION_SET is a string listing all the PATH@REV pairs, with
-   a newline after each.
-
-   The pre-revprop-change hook will have the new property value
-   written to its stdin.  If the property is being deleted, no data
-   will be written. */
-svn_error_t *
-svn_repos__hooks_pre_obliterate(svn_repos_t *repos,
-                                svn_revnum_t rev,
-                                const char *author,
-                                const svn_string_t *obliteration_set,
-                                apr_pool_t *pool);
-
-/* Run the pre-obliterate hook for REPOS.  Use POOL for any
-   temporary allocations.  If the hook fails, return
-   SVN_ERR_REPOS_HOOK_FAILURE.
-
-   REV is the revision whose property was changed.
-   AUTHOR is the authenticated name of the user who changed the prop.
-   OBLITERATION_SET is a string listing all the PATH@REV pairs, with
-   a newline after each.
-
-   The old value will be passed to the post-revprop hook on stdin.  If
-   the property is being created, no data will be written. */
-svn_error_t *
-svn_repos__hooks_post_obliterate(svn_repos_t *repos,
-                                 svn_revnum_t rev,
-                                 const char *author,
-                                const svn_string_t *obliteration_set,
-                                 apr_pool_t *pool);
-
 /* Run the pre-lock hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.