[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] v7 Fix #3390 Relative externals not updated during switch

From: Gavin Beau Baumanis <gavin_at_thespidernet.com>
Date: Wed, 20 Jan 2010 23:04:16 +1100

Ping.
This updated submission has received no comments.

Gavin "Beau" Baumanis

On 06/01/2010, at 10:53 PM, Daniel Näslund wrote:

> On Wed, Dec 30, 2009 at 02:11:31PM +0000, Stefan Sperling wrote:
>> On Wed, Dec 30, 2009 at 07:45:12AM +0100, Daniel Näslund wrote:
>>> + err = svn_wc__node_get_url(&url, cb->ctx->wc_ctx,
>>> + abs_parent_dir, cb->pool, cb->pool);
>>> +
>>> + /* If we're doing an 'svn export' the current dir will not be a
>>> + working copy. We can't get the parent_dir. */
>>> + if (err)
>>> + {
>>
>> More nitpicking :-P
>> Indentation is off below:
>>
>>> + if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
>>> + {
>>> + /* Get the URL of the parent directory by appending a portion of
>>> + parent_dir to from_url. from_url is the URL for to_path and
>>> + to_path is a substring of parent_dir, so append any characters in
>>> + parent_dir past strlen(to_path) to from_url (making sure to move
>>> + past a '/' in parent_dir, otherwise svn_path_url_add_component()
>>> + will error. */
>>> + len = strlen(cb->to_path);
>>> + if (ib.parent_dir[len] == '/')
>>> + ++len;
>>> + ib.parent_dir_url = svn_path_url_add_component2(cb->from_url,
>>> + ib.parent_dir + len,
>>> + cb->pool);
>>> + svn_error_clear(err);
>>> + }
>>> + else
>>> + return svn_error_return(err);
>>> + }
>>> + else
>>> + ib.parent_dir_url = url;
>
> Fixed!
>
> [[[
> Fix issue #3390, relative externals not updated during switch. As a side
> effect - allow externals hash diff functionality to be used with abspaths.
>
> * subversion/libsvn_client/switch.c
> (svn_client__switch_internal): Pass in an external_func to
> svn_wc_crawl_revision5().
>
> * subversion/libsvn_client/externals.c
> (handle_externals_desc_change): Get the url for parent_dir with
> svn_wc__node_get_url(). Does not work for export where the
> parent_dir has no url. Then we resort to the old way of adding the
> parent_dir to the from_url.
>
> * subversion/tests/cmdline/externals_tests.py
> (test_list): Remove XFail from switch_relative_external.
>
> Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
> Review by: stsp, philip
> ]]]
>
> Daniel
> <i3390-v7.diff>
Received on 2010-01-20 13:12:38 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.