You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2009/12/10 17:34:43 UTC

svn commit: r889314 - in /subversion/branches/obliterate-like-deltify/subversion: libsvn_client/obliterate.c libsvn_fs_base/reps-strings.c libsvn_repos/obliterate.c

Author: philip
Date: Thu Dec 10 16:34:42 2009
New Revision: 889314

URL: http://svn.apache.org/viewvc?rev=889314&view=rev
Log:
obliterate-like-deltify branch: hook up with existing experimental
interface to make obliterate over ra_local work.

* subversion/libsvn_client/obliterate.c
  (svn_client__obliterate): Get repos path from URL.

* subversion/libsvn_repos/obliterate.c
  (svn_repos__obliterate_path_rev): Call svn_fs_obliterate.

* subversion/libsvn_fs_base/reps-strings.c
  (svn_fs_base__rep_obliterate): Initialise new_str.

Modified:
    subversion/branches/obliterate-like-deltify/subversion/libsvn_client/obliterate.c
    subversion/branches/obliterate-like-deltify/subversion/libsvn_fs_base/reps-strings.c
    subversion/branches/obliterate-like-deltify/subversion/libsvn_repos/obliterate.c

Modified: subversion/branches/obliterate-like-deltify/subversion/libsvn_client/obliterate.c
URL: http://svn.apache.org/viewvc/subversion/branches/obliterate-like-deltify/subversion/libsvn_client/obliterate.c?rev=889314&r1=889313&r2=889314&view=diff
==============================================================================
--- subversion/branches/obliterate-like-deltify/subversion/libsvn_client/obliterate.c (original)
+++ subversion/branches/obliterate-like-deltify/subversion/libsvn_client/obliterate.c Thu Dec 10 16:34:42 2009
@@ -37,10 +37,9 @@
   svn_ra_session_t *ra_session;
   const char *path;
 
-  /* Open a simple RA session for the URL (not connected to a WC). */
   SVN_ERR(svn_client_open_ra_session(&ra_session, url, ctx, pool));
 
-  path = "";  /* relative to URL of session */
+  SVN_ERR(svn_ra_get_path_relative_to_root(ra_session, &path, url, pool));
 
   SVN_ERR(svn_ra__obliterate(ra_session, rev, path, pool));
 

Modified: subversion/branches/obliterate-like-deltify/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/branches/obliterate-like-deltify/subversion/libsvn_fs_base/reps-strings.c?rev=889314&r1=889313&r2=889314&view=diff
==============================================================================
--- subversion/branches/obliterate-like-deltify/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/branches/obliterate-like-deltify/subversion/libsvn_fs_base/reps-strings.c Thu Dec 10 16:34:42 2009
@@ -1628,7 +1628,7 @@
                                          trail_t *trail,
                                          apr_pool_t *pool)
 {
-  const char *new_str;
+  const char *new_str = NULL;
   representation_t *empty;
   svn_stream_t *new_stream;
   struct write_svndiff_strings_baton new_baton;

Modified: subversion/branches/obliterate-like-deltify/subversion/libsvn_repos/obliterate.c
URL: http://svn.apache.org/viewvc/subversion/branches/obliterate-like-deltify/subversion/libsvn_repos/obliterate.c?rev=889314&r1=889313&r2=889314&view=diff
==============================================================================
--- subversion/branches/obliterate-like-deltify/subversion/libsvn_repos/obliterate.c (original)
+++ subversion/branches/obliterate-like-deltify/subversion/libsvn_repos/obliterate.c Thu Dec 10 16:34:42 2009
@@ -40,30 +40,12 @@
                                apr_pool_t *pool)
 {
   svn_fs_t *fs = svn_repos_fs(repos);
-  svn_fs_root_t *rev_root;
-  svn_fs_txn_t *txn;
-  const svn_fs_id_t *node_id;
-
-  /* Sanity check: ensure the path exists in fs at the revision.
-   * ### TODO: May want to allow non-existent node as a no-op.
-   * ### This is an error for now to help catch wrong-node-reached bugs. */
-  SVN_ERR(svn_fs_revision_root(&rev_root, fs, revision, pool));
-  SVN_ERR(svn_fs_node_id(&node_id, rev_root, path, pool));
-
-  /* Check the node kind of PATH in our transaction.  */
-  /* SVN_ERR(svn_fs_check_path(&kind, rev_root, path, pool));
-   * if (kind == svn_node_none) ... */
-
-  /* ### authz checks: see commit.c:delete_entry() */
 
-  /* Begin a new transaction, based on the revision we want to modify. */
-  SVN_ERR(svn_fs__begin_obliteration_txn(&txn, fs, revision, pool));
+  /* SVN_ERR(svn_repos_pre_obliterate_hook()); */
 
-  /* Make the required changes in this txn */
-  /* ... */
+  SVN_ERR(svn_fs_obliterate(fs, path, revision, pool));
 
-  /* Commit the new transaction in place of the old revision */
-  SVN_ERR(svn_fs__commit_obliteration_txn(revision, txn, pool));
+  /* SVN_ERR(svn_repos_post_obliterate_hook()); */
 
   return SVN_NO_ERROR;
 }