You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/27 12:00:08 UTC
svn commit: r1305800 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Author: stsp
Date: Tue Mar 27 10:00:07 2012
New Revision: 1305800
URL: http://svn.apache.org/viewvc?rev=1305800&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
(get_info_for_copy): Allow for NULL status parameter. Should have been
part of r1305793.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1305800&r1=1305799&r2=1305800&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Mar 27 10:00:07 2012
@@ -3423,7 +3423,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
have_work,
wcroot, local_relpath, result_pool, scratch_pool));
- if (*status == svn_wc__db_status_excluded)
+ if (status && *status == svn_wc__db_status_excluded)
{
/* The parent cannot be excluded, so look at the parent and then
adjust the relpath */
@@ -3439,7 +3439,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
*copyfrom_relpath = svn_relpath_join(*copyfrom_relpath, base_name,
result_pool);
}
- else if (*status == svn_wc__db_status_added)
+ else if (status && *status == svn_wc__db_status_added)
{
const char *op_root_relpath;
@@ -3457,7 +3457,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
result_pool);
}
}
- else if (*status == svn_wc__db_status_deleted)
+ else if (status && *status == svn_wc__db_status_deleted)
{
const char *base_del_relpath, *work_del_relpath;
Re: svn commit: r1305800 -
/subversion/trunk/subversion/libsvn_wc/wc_db.c
Posted by Stefan Sperling <st...@apache.org>.
On Tue, Mar 27, 2012 at 12:32:41PM -0400, Greg Stein wrote:
> On Tue, Mar 27, 2012 at 06:00, <st...@apache.org> wrote:
> > Author: stsp
> > Date: Tue Mar 27 10:00:07 2012
> > New Revision: 1305800
> >
> > URL: http://svn.apache.org/viewvc?rev=1305800&view=rev
> > Log:
> > * subversion/libsvn_wc/wc_db.c
> > (get_info_for_copy): Allow for NULL status parameter. Should have been
> > part of r1305793.
>
> Woah! The way you implemented this won't work. Those if-branches need
> to be taken, in order to fill out other OUT parameters.
>
> Instead, you need a local status variable fetched from read_info().
> Switch on that. And if STATUS is not NULL, then store the localvar
> into the output.
Ooops. Thanks for catching this. Fixed in r1305903.
Re: svn commit: r1305800 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Posted by Greg Stein <gs...@gmail.com>.
On Tue, Mar 27, 2012 at 06:00, <st...@apache.org> wrote:
> Author: stsp
> Date: Tue Mar 27 10:00:07 2012
> New Revision: 1305800
>
> URL: http://svn.apache.org/viewvc?rev=1305800&view=rev
> Log:
> * subversion/libsvn_wc/wc_db.c
> (get_info_for_copy): Allow for NULL status parameter. Should have been
> part of r1305793.
Woah! The way you implemented this won't work. Those if-branches need
to be taken, in order to fill out other OUT parameters.
Instead, you need a local status variable fetched from read_info().
Switch on that. And if STATUS is not NULL, then store the localvar
into the output.
>...
Cheers,
-g