Author: rhuijben
Date: Wed Feb 4 10:27:49 2015
New Revision: 1657108
URL: http://svn.apache.org/r1657108
Log:
Following up on r1657083, reinstate recursive notification on the revert_root
even though it is not a directory handled by the operation.
* subversion/libsvn_wc/revert.c
(revert_restore): Avoid unneeded lookup on the root. Fix notification on the
root.
Modified:
subversion/trunk/subversion/libsvn_wc/revert.c
Modified: subversion/trunk/subversion/libsvn_wc/revert.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/revert.c?rev=1657108&r1=1657107&r2=1657108&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/revert.c (original)
+++ subversion/trunk/subversion/libsvn_wc/revert.c Wed Feb 4 10:27:49 2015
@@ -300,29 +300,33 @@ revert_restore(svn_boolean_t *run_wq,
apr_time_t recorded_time;
svn_boolean_t copied_here;
svn_node_kind_t reverted_kind;
- svn_boolean_t is_wcroot;
-
if (cancel_func)
SVN_ERR(cancel_func(cancel_baton));
- SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, scratch_pool));
- if (is_wcroot && !revert_root)
+ if (!revert_root)
{
- /* Issue #4162: Obstructing working copy. We can't access the working
- copy data from the parent working copy for this node by just using
- local_abspath */
+ svn_boolean_t is_wcroot;
- if (notify_func)
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
scratch_pool));
+ if (is_wcroot)
{
- svn_wc_notify_t *notify = svn_wc_create_notify(
+ /* Issue #4162: Obstructing working copy. We can't access the working
+ copy data from the parent working copy for this node by just using
+ local_abspath */
+
+ if (notify_func)
+ {
+ svn_wc_notify_t *notify =
+ svn_wc_create_notify(
local_abspath,
svn_wc_notify_update_skip_obstruction,
scratch_pool);
- notify_func(notify_baton, notify, scratch_pool);
- }
+ notify_func(notify_baton, notify, scratch_pool);
+ }
- return SVN_NO_ERROR; /* We don't revert obstructing working copies */
+ return SVN_NO_ERROR; /* We don't revert obstructing working copies */
+ }
}
SVN_ERR(svn_wc__db_revert_list_read(¬ify_required,
@@ -439,13 +443,13 @@ revert_restore(svn_boolean_t *run_wq,
*run_wq = FALSE;
}
- if (notify_func)
- SVN_ERR(svn_wc__db_revert_list_notify(notify_func, notify_baton,
- db, local_abspath, iterpool));
-
svn_pool_destroy(iterpool);
}
+ if (notify_func && (revert_root || kind == svn_node_dir))
+ SVN_ERR(svn_wc__db_revert_list_notify(notify_func, notify_baton,
+ db, local_abspath, scratch_pool));
+
return SVN_NO_ERROR;
}