Author: dlr
Date: Fri Jun 16 11:17:45 2006
New Revision: 20149
Modified:
Log:
the merge-tracking branch: Roll back parts of r20123 and r20120,
reverting to the assumption that target paths for the merge info
retreival API are relative to the repository root (as opposed to being
full URLs).
As of r20139, we now have a general purpose API for converting local
WC paths and repository URLs into repository-relative paths. This is
necessary when manipulating the merge info retrieved from the
repository (and any local deltas to it).
*
(svn_ra_local__get_merge_info): Don't transform local URLs into
repository-relative paths (e.g. file:///path/to/wc -/branches/1.1.x),
as we again expect this to already be the case.
*
(svn_ra_local__split_URL): Don't ignore NULL repos and repos_url args.
Modified:
URL:
(original)
Fri Jun 16 11:17:45 2006
@@ -624,23 +624,12 @@
static svn_error_t *
svn_ra_local__get_merge_info(svn_ra_session_t *session,
apr_hash_t **mergeinfo,
- const apr_array_header_t *urls,
+ const apr_array_header_t *paths,
svn_revnum_t revision,
apr_pool_t *pool)
{
svn_ra_local__session_baton_t *baton = session->priv;
- const apr_array_header_t *paths = apr_array_make(pool, urls->nelts,
- sizeof(char *));
- int i;
- /* Transform URLs into repository-relative paths. */
- for (i = 0; i < paths->nelts; i++)
- {
- SVN_ERR(svn_ra_local__split_URL(NULL, NULL,
- &(APR_ARRAY_IDX(paths, i, const char *)),
- APR_ARRAY_IDX(urls, i, const char *),
- pool));
- }
SVN_ERR(svn_repos_fs_get_merge_info(mergeinfo, baton->repos, paths,
revision, NULL, NULL, pool));
Modified:
URL:
(original)
Fri Jun 16 11:17:45 2006
@@ -33,6 +33,7 @@
svn_error_t *err = SVN_NERRR;
const char *repos_root;
const char *hostname, *path;
+ svn_stringbuf_t *urlbuf;
/* Verify that the URL is well-formed (loosely) */
@@ -125,15 +126,12 @@
(SVN_ERR_RA_LCAL_REPSPEN_FAILED, NULL,
_("Unable to open repository '%s'"), URL);
- if (repos != NULL)
- {
- /* Attempt to open a repository at URL. */
- err = svn_repos_open(repos, repos_root, pool);
- if (err)
- return svn_error_createf
- (SVN_ERR_RA_LCAL_REPSPEN_FAILED, err,
- _("Unable to open repository '%s'"), URL);
- }
+ /* Attempt to open a repository at URL. */
+ err = svn_repos_open(repos, repos_root, pool);
+ if (err)
+ return svn_error_createf
+ (SVN_ERR_RA_LCAL_REPSPEN_FAILED, err,
+ _("Unable to open repository '%s'"), URL);
/* What remains of URL after being hacked at in the previous step is
REPS_URL. FS_PATH is what we've hacked off in the process.
@@ -146,14 +144,12 @@
+ (strlen(repos_root)
- (hostname ? strlen(hostname) + 2 : 0));
- if (repos_url != NULL)
- {
- /* Remove the path components in *fs_path from the original URL,
- to get the URL to the repository root. */
- svn_stringbuf_t *urlbuf = svn_stringbuf_create(URL, pool);
- svn_path_remove_components(urlbuf, svn_path_component_count(*fs_path));
- *repos_url = urlbuf->data;
- }
+ /* Remove the path components in *fs_path from the original URL, to get
+ the URL to the repository root. */
+ urlbuf = svn_stringbuf_create(URL, pool);
+ svn_path_remove_components(urlbuf,
+ svn_path_component_count(*fs_path));
+ *repos_url = urlbuf->data;
return SVN_NERRR;
}
To unsubscribe, e-mail: svn-unsubscribe (AT) subversion (DOT) tigris.org
For additional commands, e-mail: svn-help (AT) subversion (DOT) tigris.org