Author: stsp
Date: Sun Oct 16 14:26:28 2016
New Revision: 1765160
URL: http://svn.apache.org/viewvc?rev=1765160&view=rev
Log:
The conflict resolver should be careful when checking for moved-away paths
in the working copy. Depending on the conflict in question the path might
not exist and libsvn_wc will return a 'path-not-found' error.
Found while messing about with random conflicts.
* subversion/libsvn_client/conflicts.c
(describe_local_file_node_change, describe_local_dir_node_change): Handle
SVN_ERR_WC_PATH_NOT_FOUND error returned from svn_wc__node_was_moved_away().
Modified:
subversion/trunk/subversion/libsvn_client/conflicts.c
Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1765160&r1=1765159&r2=1765160&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Sun Oct 16 14:26:28
2016
@@ -976,12 +976,23 @@ describe_local_file_node_change(const ch
case svn_wc_conflict_reason_moved_away:
{
const char *moved_to_abspath;
+ svn_error_t *err;
- SVN_ERR(svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
- ctx->wc_ctx,
- conflict->local_abspath,
- scratch_pool,
- scratch_pool));
+ err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
+ ctx->wc_ctx,
+ conflict->local_abspath,
+ scratch_pool,
+ scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ moved_to_abspath = NULL;
+ svn_error_clear(err);
+ }
+ else
+ return svn_error_trace(err);
+ }
if (operation == svn_wc_operation_update ||
operation == svn_wc_operation_switch)
{
@@ -1190,12 +1201,24 @@ describe_local_dir_node_change(const cha
case svn_wc_conflict_reason_moved_away:
{
const char *moved_to_abspath;
+ svn_error_t *err;
+
+ err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
+ ctx->wc_ctx,
+ conflict->local_abspath,
+ scratch_pool,
+ scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ moved_to_abspath = NULL;
+ svn_error_clear(err);
+ }
+ else
+ return svn_error_trace(err);
+ }
- SVN_ERR(svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
- ctx->wc_ctx,
- conflict->local_abspath,
- scratch_pool,
- scratch_pool));
if (operation == svn_wc_operation_update ||
operation == svn_wc_operation_switch)
{