diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
| commit | 219f5ebf8fca3572d8d4265d78d0e4670ca35a27 (patch) | |
| tree | e6232088e2faabbf0f1a6e568df3285323f27c5c /subversion/libsvn_client | |
| parent | eeb88685bfa4ef1c0639f1136d83ff19de1b4595 (diff) | |
Diffstat (limited to 'subversion/libsvn_client')
| -rw-r--r-- | subversion/libsvn_client/copy.c | 20 | ||||
| -rw-r--r-- | subversion/libsvn_client/log.c | 10 | ||||
| -rw-r--r-- | subversion/libsvn_client/prop_commands.c | 41 | ||||
| -rw-r--r-- | subversion/libsvn_client/update.c | 2 | ||||
| -rw-r--r-- | subversion/libsvn_client/util.c | 7 |
5 files changed, 64 insertions, 16 deletions
diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c index 000ae0c2ff1c..f204bbcf2c4e 100644 --- a/subversion/libsvn_client/copy.c +++ b/subversion/libsvn_client/copy.c @@ -314,6 +314,8 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep, { const char *src_parent_abspath; svn_boolean_t lock_src, lock_dst; + const char *src_wcroot_abspath; + const char *dst_wcroot_abspath; svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i, svn_client__copy_pair_t *); @@ -326,6 +328,13 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep, src_parent_abspath = svn_dirent_dirname(pair->src_abspath_or_url, iterpool); + SVN_ERR(svn_wc__get_wcroot(&src_wcroot_abspath, + ctx->wc_ctx, src_parent_abspath, + iterpool, iterpool)); + SVN_ERR(svn_wc__get_wcroot(&dst_wcroot_abspath, + ctx->wc_ctx, pair->dst_parent_abspath, + iterpool, iterpool)); + /* We now need to lock the right combination of batons. Four cases: 1) src_parent == dst_parent @@ -334,15 +343,18 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep, 4) src_parent and dst_parent are disjoint We can handle 1) as either 2) or 3) */ if (strcmp(src_parent_abspath, pair->dst_parent_abspath) == 0 - || svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath, - iterpool)) + || (svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath, + NULL) + && !svn_dirent_is_child(src_parent_abspath, dst_wcroot_abspath, + NULL))) { lock_src = TRUE; lock_dst = FALSE; } else if (svn_dirent_is_child(pair->dst_parent_abspath, - src_parent_abspath, - iterpool)) + src_parent_abspath, NULL) + && !svn_dirent_is_child(pair->dst_parent_abspath, + src_wcroot_abspath, NULL)) { lock_src = FALSE; lock_dst = TRUE; diff --git a/subversion/libsvn_client/log.c b/subversion/libsvn_client/log.c index 73bd61211eb4..5bf7e415b725 100644 --- a/subversion/libsvn_client/log.c +++ b/subversion/libsvn_client/log.c @@ -861,17 +861,19 @@ svn_client_log5(const apr_array_header_t *targets, actual_loc->url, pool)); /* Save us an RA layer round trip if we are on the repository root and - know the result in advance. All the revision data has already been - validated. + know the result in advance, or if we don't need multiple ranges. + All the revision data has already been validated. */ - if (strcmp(actual_loc->url, actual_loc->repos_root_url) == 0) + if (strcmp(actual_loc->url, actual_loc->repos_root_url) == 0 + || opt_rev_ranges->nelts <= 1) { svn_location_segment_t *segment = apr_pcalloc(pool, sizeof(*segment)); log_segments = apr_array_make(pool, 1, sizeof(segment)); segment->range_start = oldest_rev; segment->range_end = actual_loc->rev; - segment->path = ""; + segment->path = svn_uri_skip_ancestor(actual_loc->repos_root_url, + actual_loc->url, pool); APR_ARRAY_PUSH(log_segments, svn_location_segment_t *) = segment; } else diff --git a/subversion/libsvn_client/prop_commands.c b/subversion/libsvn_client/prop_commands.c index c3c1cfaa6aca..a3e59c866813 100644 --- a/subversion/libsvn_client/prop_commands.c +++ b/subversion/libsvn_client/prop_commands.c @@ -1201,6 +1201,7 @@ struct recursive_proplist_receiver_baton svn_wc_context_t *wc_ctx; /* Working copy context. */ svn_proplist_receiver2_t wrapped_receiver; /* Proplist receiver to call. */ void *wrapped_receiver_baton; /* Baton for the proplist receiver. */ + apr_array_header_t *iprops; /* Anchor, anchor_abspath pair for converting to relative paths */ const char *anchor; @@ -1216,6 +1217,27 @@ recursive_proplist_receiver(void *baton, { struct recursive_proplist_receiver_baton *b = baton; const char *path; + apr_array_header_t *iprops = NULL; + + if (b->iprops + && ! strcmp(local_abspath, b->anchor_abspath)) + { + /* Report iprops with the properties for the anchor */ + iprops = b->iprops; + b->iprops = NULL; + } + else if (b->iprops) + { + /* No report for the root? + Report iprops anyway */ + + SVN_ERR(b->wrapped_receiver(b->wrapped_receiver_baton, + b->anchor ? b->anchor : local_abspath, + NULL /* prop_hash */, + b->iprops, + scratch_pool)); + b->iprops = NULL; + } /* Attempt to convert absolute paths to relative paths for * presentation purposes, if needed. */ @@ -1230,7 +1252,7 @@ recursive_proplist_receiver(void *baton, path = local_abspath; return svn_error_trace(b->wrapped_receiver(b->wrapped_receiver_baton, - path, props, NULL, + path, props, iprops, scratch_pool)); } @@ -1370,6 +1392,7 @@ get_local_props(const char *path_or_url, svn_node_kind_t kind; apr_hash_t *changelist_hash = NULL; const char *local_abspath; + apr_array_header_t *iprops = NULL; SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url, scratch_pool)); @@ -1392,7 +1415,6 @@ get_local_props(const char *path_or_url, if (get_target_inherited_props) { - apr_array_header_t *iprops; const char *repos_root_url; SVN_ERR(svn_wc__get_iprops(&iprops, ctx->wc_ctx, local_abspath, @@ -1402,8 +1424,6 @@ get_local_props(const char *path_or_url, SVN_ERR(svn_client__iprop_relpaths_to_urls(iprops, repos_root_url, scratch_pool, scratch_pool)); - SVN_ERR(call_receiver(path_or_url, NULL, iprops, receiver, - receiver_baton, scratch_pool)); } if (changelists && changelists->nelts) @@ -1418,16 +1438,16 @@ get_local_props(const char *path_or_url, rb.wc_ctx = ctx->wc_ctx; rb.wrapped_receiver = receiver; rb.wrapped_receiver_baton = receiver_baton; + rb.iprops = iprops; + rb.anchor_abspath = local_abspath; if (strcmp(path_or_url, local_abspath) != 0) { rb.anchor = path_or_url; - rb.anchor_abspath = local_abspath; } else { rb.anchor = NULL; - rb.anchor_abspath = NULL; } SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath, NULL, @@ -1435,6 +1455,13 @@ get_local_props(const char *path_or_url, recursive_proplist_receiver, &rb, ctx->cancel_func, ctx->cancel_baton, scratch_pool)); + + if (rb.iprops) + { + /* We didn't report for the root. Report iprops anyway */ + SVN_ERR(call_receiver(path_or_url, NULL /* props */, rb.iprops, + receiver, receiver_baton, scratch_pool)); + } } else if (svn_wc__changelist_match(ctx->wc_ctx, local_abspath, changelist_hash, scratch_pool)) @@ -1464,7 +1491,7 @@ get_local_props(const char *path_or_url, } } - SVN_ERR(call_receiver(path_or_url, props, NULL, + SVN_ERR(call_receiver(path_or_url, props, iprops, receiver, receiver_baton, scratch_pool)); } diff --git a/subversion/libsvn_client/update.c b/subversion/libsvn_client/update.c index fe3f86d10638..0b006cc33fbe 100644 --- a/subversion/libsvn_client/update.c +++ b/subversion/libsvn_client/update.c @@ -383,7 +383,7 @@ update_internal(svn_revnum_t *result_rev, SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url, pool)); /* svn_client_relocate2() will check the uuid */ - SVN_ERR(svn_client_relocate2(anchor_abspath, anchor_url, + SVN_ERR(svn_client_relocate2(anchor_abspath, repos_root_url, new_repos_root_url, ignore_externals, ctx, pool)); diff --git a/subversion/libsvn_client/util.c b/subversion/libsvn_client/util.c index 5ac0b8ffa11e..06855e7e70e0 100644 --- a/subversion/libsvn_client/util.c +++ b/subversion/libsvn_client/util.c @@ -166,6 +166,13 @@ svn_client_commit_item3_dup(const svn_client_commit_item3_t *item, new_item->outgoing_prop_changes = svn_prop_array_dup(new_item->outgoing_prop_changes, pool); + if (new_item->session_relpath) + new_item->session_relpath = apr_pstrdup(pool, new_item->session_relpath); + + if (new_item->moved_from_abspath) + new_item->moved_from_abspath = apr_pstrdup(pool, + new_item->moved_from_abspath); + return new_item; } |
