You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/02/20 18:55:35 UTC
svn commit: r1570283 - /subversion/trunk/subversion/libsvn_client/diff.c
Author: rhuijben
Date: Thu Feb 20 17:55:34 2014
New Revision: 1570283
URL: http://svn.apache.org/r1570283
Log:
* subversion/libsvn_client/diff.c
(diff_repos_wc): Properly resolve path in all cases, not just pegged diffs.
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1570283&r1=1570282&r2=1570283&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Feb 20 17:55:34 2014
@@ -1848,6 +1848,7 @@ diff_repos_wc(const char **root_relpath,
const char *cf_repos_relpath;
const char *cf_repos_root_url;
svn_depth_t cf_depth;
+ svn_client__pathrev_t *loc1;
SVN_ERR_ASSERT(! svn_path_is_url(path2));
@@ -1886,14 +1887,15 @@ diff_repos_wc(const char **root_relpath,
/* If we are performing a pegged diff, we need to find out what our
actual URLs will be. */
- if (peg_revision->kind != svn_opt_revision_unspecified)
- {
- SVN_ERR(svn_client__repos_locations(&url1, NULL, NULL, NULL,
- ra_session, path_or_url1,
- peg_revision,
- revision1, NULL,
- ctx, pool));
- }
+ SVN_ERR(svn_client__resolve_rev_and_url(&loc1, ra_session, path_or_url1,
+ peg_revision, revision1, ctx,
+ pool));
+
+ url1 = loc1->url;
+ rev = loc1->rev;
+
+ /* Url1 might have changed */
+ SVN_ERR(svn_ra_reparent(ra_session, url1, pool));
if (ddi)
{
@@ -1913,14 +1915,6 @@ diff_repos_wc(const char **root_relpath,
}
}
- /* Open an RA session to URL1 to figure out its node kind. */
- SVN_ERR(svn_ra_reparent(ra_session, url1, pool));
- /* Resolve the revision to use for URL1. */
- SVN_ERR(svn_client__get_revision_number(&rev, NULL, ctx->wc_ctx,
- (strcmp(path_or_url1, url1) == 0)
- ? NULL : abspath_or_url1,
- ra_session, revision1, pool));
-
/* Check if our diff target is a copied node. */
SVN_ERR(svn_wc__node_get_origin(&is_copy,
&cf_revision,