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 2009/12/14 16:15:32 UTC

svn commit: r890367 - in /subversion/trunk/subversion: include/private/svn_repos_private.h libsvn_ra_local/ra_plugin.c libsvn_repos/obliterate.c

Author: julianfoad
Date: Mon Dec 14 15:15:31 2009
New Revision: 890367

URL: http://svn.apache.org/viewvc?rev=890367&view=rev
Log:
Make svn_ra_local__obliterate_path_rev() pass the path correctly. It was
passing a path relative to the RA session root to code that is unaware of
the RA session.

* subversion/include/private/svn_repos_private.h
  (svn_repos__obliterate_path_rev): Clarify the path and other details in
    the doc string.

* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__obliterate_path_rev): Join the session-relative path to the
    session root path.

* subversion/libsvn_repos/obliterate.c
  (svn_repos__obliterate_path_rev): Assert that the path is in the required
    form. (n.b. We don't have any code here to use the path, yet.)

Modified:
    subversion/trunk/subversion/include/private/svn_repos_private.h
    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
    subversion/trunk/subversion/libsvn_repos/obliterate.c

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=890367&r1=890366&r2=890367&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_repos_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_repos_private.h Mon Dec 14 15:15:31 2009
@@ -40,14 +40,18 @@
 /**
  * Permanently delete @a path at revision @a revision in @a fs.
  *
- * 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.
+ * 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 server, return @c SVN_ERR_RA_NOT_IMPLEMENTED.
+ * 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.

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=890367&r1=890366&r2=890367&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Mon Dec 14 15:15:31 2009
@@ -1432,6 +1432,7 @@
 {
   svn_ra_local__session_baton_t *sess = session->priv;
 
+  path = svn_path_join(sess->fs_path->data, path, pool);
   SVN_ERR(svn_repos__obliterate_path_rev(sess->repos,
                                          revision,
                                          path,

Modified: subversion/trunk/subversion/libsvn_repos/obliterate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/obliterate.c?rev=890367&r1=890366&r2=890367&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/obliterate.c (original)
+++ subversion/trunk/subversion/libsvn_repos/obliterate.c Mon Dec 14 15:15:31 2009
@@ -26,6 +26,8 @@
 #include "svn_error_codes.h"
 #include "svn_fs.h"
 #include "svn_repos.h"
+#include "svn_dirent_uri.h"
+
 #include "repos.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_fs_private.h"
@@ -44,6 +46,8 @@
   svn_fs_txn_t *txn;
   const svn_fs_id_t *node_id;
 
+  SVN_ERR_ASSERT(path[0] == '/' && svn_relpath_is_canonical(path + 1, pool));
+
   /* 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. */