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 2012/11/16 21:46:14 UTC
svn commit: r1410562 - in /subversion/trunk/subversion: include/svn_wc.h
libsvn_wc/adm_ops.c
Author: julianfoad
Date: Fri Nov 16 20:46:14 2012
New Revision: 1410562
URL: http://svn.apache.org/viewvc?rev=1410562&view=rev
Log:
Check for the required write lock in another WC function.
* subversion/include/svn_wc.h
(svn_wc_remove_from_revision_control2): In the doc string, state exactly
what write lock is required.
* subversion/libsvn_wc/adm_ops.c
(svn_wc__internal_remove_from_revision_control): Check for the write lock.
Modified:
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_wc/adm_ops.c
Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1410562&r1=1410561&r2=1410562&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Fri Nov 16 20:46:14 2012
@@ -4774,7 +4774,8 @@ svn_wc_add_repos_file(const char *dst_pa
/** Remove @a local_abspath from revision control. @a wc_ctx must
- * hold a write lock.
+ * hold a write lock on the parent of @a local_abspath, or if that is a
+ * WC root then on @a local_abspath itself.
*
* If @a local_abspath is a file, all its info will be removed from the
* administrative area. If @a local_abspath is a directory, then the
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1410562&r1=1410561&r2=1410562&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Fri Nov 16 20:46:14 2012
@@ -2330,6 +2330,11 @@ svn_wc__internal_remove_from_revision_co
SVN_ERR(svn_wc__db_is_wcroot(&is_root, db, local_abspath, scratch_pool));
+ SVN_ERR(svn_wc__write_check(db, is_root ? local_abspath
+ : svn_dirent_dirname(local_abspath,
+ scratch_pool),
+ scratch_pool));
+
SVN_ERR(svn_wc__db_op_remove_node(&left_something,
db, local_abspath,
destroy_wf /* destroy_wc */,