You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/04/30 00:12:18 UTC
svn commit: r1591123 - /subversion/trunk/subversion/libsvn_client/delete.c
Author: breser
Date: Tue Apr 29 22:12:18 2014
New Revision: 1591123
URL: http://svn.apache.org/r1591123
Log:
Display the proper URL for a deletion when prompting for the log message.
The existing code assumes that the relpaths passed to it are relative to the
repository root. Rather, the code in delete_urls_multi_repos() groups URLs by
repository root and then condenses the URLs to find the longest possible session
parent. This means if you issued the command:
svn rm https://svn.apache.org/repos/asf/subversion/branches/1.8.x-r1579588
You'll end up seeing the following in your editor:
D https://svn.apache.org/repos/asf/1.8.x-r1579588
* subversion/libsvn_client/delete.c
(single_repos_delete): Rename repos_root to base_uri since we don't need the
root but rather the session parent.
(delete_urls_multi_repos): Remove repos_root variable that is no longer used,
pass the base_uri to single_repos_delete().
Modified:
subversion/trunk/subversion/libsvn_client/delete.c
Modified: subversion/trunk/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/delete.c?rev=1591123&r1=1591122&r2=1591123&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/delete.c (original)
+++ subversion/trunk/subversion/libsvn_client/delete.c Tue Apr 29 22:12:18 2014
@@ -193,7 +193,7 @@ path_driver_cb_func(void **dir_baton,
static svn_error_t *
single_repos_delete(svn_ra_session_t *ra_session,
- const char *repos_root,
+ const char *base_uri,
const apr_array_header_t *relpaths,
const apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
@@ -221,7 +221,7 @@ single_repos_delete(svn_ra_session_t *ra
const char *relpath = APR_ARRAY_IDX(relpaths, i, const char *);
item = svn_client_commit_item3_create(pool);
- item->url = svn_path_url_add_component2(repos_root, relpath, pool);
+ item->url = svn_path_url_add_component2(base_uri, relpath, pool);
item->state_flags = SVN_CLIENT_COMMIT_ITEM_DELETE;
APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
}
@@ -361,7 +361,6 @@ delete_urls_multi_repos(const apr_array_
iterpool = svn_pool_create(pool);
for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
{
- const char *repos_root = svn__apr_hash_index_key(hi);
struct repos_deletables_t *repos_deletables = svn__apr_hash_index_val(hi);
const char *base_uri;
apr_array_header_t *target_relpaths;
@@ -398,7 +397,7 @@ delete_urls_multi_repos(const apr_array_
}
SVN_ERR(svn_ra_reparent(repos_deletables->ra_session, base_uri, pool));
- SVN_ERR(single_repos_delete(repos_deletables->ra_session, repos_root,
+ SVN_ERR(single_repos_delete(repos_deletables->ra_session, base_uri,
target_relpaths,
revprop_table, commit_callback,
commit_baton, ctx, iterpool));