You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2009/12/28 17:33:21 UTC
Re: [PATCH] v5 Fix #3390 Relative externals not updated during
switch
On Mon, Dec 28, 2009 at 03:36:46PM +0100, Daniel Näslund wrote:
> + /* 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 && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> + {
> + if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> + {
You don't need to check err->apr_err twice.
Stefan
Re: [PATCH] v7 Fix #3390 Relative externals not updated during
switch
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jan 20, 2010 at 11:04:16PM +1100, Gavin Beau Baumanis wrote:
> Ping.
> This updated submission has received no comments.
Thanks for pinging. I'm keeping an eye on this, I'll try to get
to reviewing this properly by the end of this week.
Stefan
Re: [PATCH] v7 Fix #3390 Relative externals not updated during switch
Posted by Gavin Beau Baumanis <ga...@thespidernet.com>.
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>
Re: [PATCH] v7 Fix #3390 Relative externals not updated during
switch
Posted by Daniel Näslund <da...@longitudo.com>.
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
Re: [PATCH] v7 Fix #3390 Relative externals not updated during
switch
Posted by Daniel Näslund <da...@longitudo.com>.
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
Re: [PATCH] v6 Fix #3390 Relative externals not updated during
switch
Posted by Stefan Sperling <st...@elego.de>.
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;
> +
> /* We must use a custom version of svn_hash_diff so that the diff
> entries are processed in the order they were originally specified
> in the svn:externals properties. */
Re: [PATCH] v6 Fix #3390 Relative externals not updated during
switch
Posted by Stefan Sperling <st...@elego.de>.
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;
> +
> /* We must use a custom version of svn_hash_diff so that the diff
> entries are processed in the order they were originally specified
> in the svn:externals properties. */
Re: [PATCH] v6 Fix #3390 Relative externals not updated during
switch
Posted by Daniel Näslund <da...@longitudo.com>.
On Mon, Dec 28, 2009 at 04:33:21PM +0000, Stefan Sperling wrote:
> > On Mon, Dec 28, 2009 at 03:36:46PM +0100, Daniel Näslund wrote:
> > + /* 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 && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> > + {
> > + if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> > + {
>
> You don't need to check err->apr_err twice.
Gah! I really must be more careful with what I send away.
[[[
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
Re: [PATCH] v6 Fix #3390 Relative externals not updated during
switch
Posted by Daniel Näslund <da...@longitudo.com>.
On Mon, Dec 28, 2009 at 04:33:21PM +0000, Stefan Sperling wrote:
> > On Mon, Dec 28, 2009 at 03:36:46PM +0100, Daniel N�slund wrote:
> > + /* 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 && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> > + {
> > + if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> > + {
>
> You don't need to check err->apr_err twice.
Gah! I really must be more careful with what I send away.
[[[
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