Author: hwright
Date: Mon Apr 25 18:43:45 2011
New Revision: 1096555
URL: http://svn.apache.org/viewvc?rev=1096555&view=rev
Log:
When maybe setting executable and read-only bits, ensure we are looking at the
most recent version of the nodes properties (not the pristine properties).
This is a followup to r1091349.
(Yes, I know this adds another database operation, but we need to maintain
correctness, instead of just going for efficiency.)
* subversion/libsvn_wc/translate.c
(svn_wc__maybe_set_executable, svn_wc__maybe_set_read_only):
Use svn_wc__db_read_props() to fetch the properties, rather than
svn_wc__db_read_node_install_info().
Modified:
subversion/trunk/subversion/libsvn_wc/translate.c
Modified: subversion/trunk/subversion/libsvn_wc/translate.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/translate.c?rev=1096555&r1=1096554&r2=1096555&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/translate.c (original)
+++ subversion/trunk/subversion/libsvn_wc/translate.c Mon Apr 25 18:43:45 2011
@@ -358,10 +358,13 @@ svn_wc__maybe_set_executable(svn_boolean
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR(svn_wc__db_read_node_install_info(NULL, &status, &kind, NULL, NULL,
- &props,
+ NULL,
db, local_abspath,
scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath, scratch_pool,
+ scratch_pool));
+
if (kind != svn_wc__db_kind_file
|| status != svn_wc__db_status_normal
|| props == NULL
@@ -398,10 +401,12 @@ svn_wc__maybe_set_read_only(svn_boolean_
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR(svn_wc__db_read_node_install_info(NULL, &status, &kind, NULL, NULL,
- &props,
- db, local_abspath,
+ NULL, db, local_abspath,
scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath, scratch_pool,
+ scratch_pool));
+
if (kind != svn_wc__db_kind_file
|| status != svn_wc__db_status_normal
|| props == NULL