Sorry, hold this patch.
I'm asking you since you said there may be a duplicate; but it looks like
it's more of a misnomer instead ("get_node_uri"), as Julian pointed out IIRC.
Here is the "duplicate", with improved name:
const char **repos_relpath,
const char **repos_root_url,
const char *local_abspath,
And here what you suggested:
svn_wc__internal_node_get_url(const char **url,
const char *local_abspath,
So the former returns REVISION, REPOS_RELPATH and REPOS_ROOT_URL, all needed
in check_tree_conflict() to mangle and feed to arguments.
The latter has only the complete URL string in store, no revision.
In the patch of the previous mail, I got the URL separated into
REPOS_RELPATH and REPOS_ROOT_URL, but it turns out I also need a REVISION. I
also need specifically the BASE information, so AFAICT using
svn_wc__db_base_get_info() makes more sense than using svn_wc__db_read_info().
Do you agree that it's no duplicate after all?
BTW, this is how get_node_base_rev_and_url_components() and its return
values would be used in check_tree_conflict(), libsvn_wc/update_editor.c:
/* Source-left repository root URL and path in repository.
* The Source-right ones will be the same for update.
* For switch, only the path in repository will differ, because
* a cross-repository switch is not possible. */
src_left_version = svn_wc_conflict_version_create(repos_url,
/* kind is both base kind and working kind, because schedule
* replace-by-different-kind is not supported. */
/* ### TODO: but in case the entry is locally removed, entry->kind
* is svn_node_none and doesn't reflect the older kind. Then we
* need to find out the older kind in a different way! */
/* For switch, find out the proper PATH_IN_REPOS for source-right. */
if (eb->switch_url != NULL)
if (their_url != NULL)
path_in_repos = svn_uri_is_child(repos_url, their_url, pool);
/* The complete source-right URL is not available, but it
* is somewhere below the SWITCH_URL. For now, just go
* without it.
* ### TODO: Construct a proper THEIR_URL in some of the
* delete cases that still pass NULL for THEIR_URL when
* calling this function. Do that on the caller's side. */
path_in_repos = svn_uri_is_child(repos_url, eb->switch_url,
path_in_repos = apr_pstrcat(
src_right_version = svn_wc_conflict_version_create(repos_url,
... src_left_version, src_right_version, ...);
Neels J Hofmeyr wrote:
> maybe you remember that patch of mine with a function gstein said looks like
> a duplicate of svn_wc__internal_node_get_url().
> It almost *is* a duplicate, but there's a difference...
> svn_wc__internal_node_get_url() *combines* the repos_root_url and
> repos_relpath to a URL. But I need them *separate*. If you want to see why,
> look at get_node_uri(), which I want to eliminate, in the output of:
> svn diff -c-880555 ^/subversion/trunk | less
> (This had been committed before and reverted in r880555, and now I'm giving
> it some review to be able to commit it again. It "wc-ng"s the tree-conflict
> detection during update.)
> So, I split functionality off svn_wc__internal_node_get_url() to get a
> function that does everything except combining the two URL parts into a
> single string.
> See attached patch that does the function split I'd like to do, so I can
> then fix and commit -c-880555. -- if you like attached patch, feel free to
> commit. I don't have an apache account yet.
Received on 2009-12-26 02:50:55 CET