You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/03/19 20:20:02 UTC

Re: svn commit: r36686 - trunk/subversion/libsvn_wc

I don't know of a good way to test this code... not familiar with this
crop code. If somebody can set up a test that fails before / succeeds
after this change, then that would be great. I'd be happy to help with
this, but don't know where to start to get this functionality invoked.

Cheers,
-g

On Thu, Mar 19, 2009 at 21:17, Greg Stein <gs...@gmail.com> wrote:
> Author: gstein
> Date: Thu Mar 19 13:17:17 2009
> New Revision: 36686
>
> Log:
> Fix an apparent bug in crop.c: it was fetch a *pruned* list of entries,
> modifying the depth value of one of them, then writing the *subset* as if
> it were the entire list of entries.
>
> * subversion/libsvn_wc/crop.c:
>  (svn_wc_crop_tree): when reading the entries, use show_hidden = TRUE to
>    get all of the hidden entries, too.
>
> Modified:
>   trunk/subversion/libsvn_wc/crop.c
>
> Modified: trunk/subversion/libsvn_wc/crop.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/crop.c?pathrev=36686&r1=36685&r2=36686
> ==============================================================================
> --- trunk/subversion/libsvn_wc/crop.c   Thu Mar 19 13:11:52 2009        (r36685)
> +++ trunk/subversion/libsvn_wc/crop.c   Thu Mar 19 13:17:17 2009        (r36686)
> @@ -284,8 +284,9 @@ svn_wc_crop_tree(svn_wc_adm_access_t *an
>         {
>           svn_wc_entry_t *target_entry;
>           apr_hash_t *parent_entries;
> +
>           SVN_ERR(svn_wc_entries_read(&parent_entries, p_access,
> -                                      FALSE, pool));
> +                                      TRUE, pool));
>
>           target_entry = apr_hash_get(parent_entries,
>                                       svn_dirent_basename(full_path, pool),
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1357529
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1357541


Re: svn commit: r36686 - trunk/subversion/libsvn_wc

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Greg Stein wrote on Fri, 20 Mar 2009 at 01:35 +0100:
> That is excellent, and it demonstrates a real bug that a user may run
> into. I'm gonna propose this as a backport for 1.6.1.
> 

+1

> Thx for helping,
> -g
> 

:-)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1362308

Re: svn commit: r36686 - trunk/subversion/libsvn_wc

Posted by Greg Stein <gs...@gmail.com>.
On Fri, Mar 20, 2009 at 00:15, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Daniel Shahaf wrote on Thu, 19 Mar 2009 at 23:25 +0200:
>> CGreg Stein wrote on Thu, 19 Mar 2009 at 21:20 +0100:
>> > I don't know of a good way to test this code... not familiar with this
>> > crop code. If somebody can set up a test that fails before / succeeds
>> > after this change, then that would be great. I'd be happy to help with
>> > this, but don't know where to start to get this functionality invoked.
>> >
>>
>> How about this?
>>
>>     % cd trunk/A
>>     % svn up --set-depth exclude C
>>     % grep '^C$' .svn/entries
>>     C
>>     % svn up --set-depth exclude D
>>     % grep '^C$' .svn/entries
>>     % grep '^D$' .svn/entries
>>     D
>>     %
>>
>> (i.e., ./C is lost from the entries file, but ./D is)
>>
>> I didn't test if your change fixes it.
>>
>
> It does.  r36689.

You Rock!! Thanks for the test!

That is excellent, and it demonstrates a real bug that a user may run
into. I'm gonna propose this as a backport for 1.6.1.

Thx for helping,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1359412


Re: svn commit: r36686 - trunk/subversion/libsvn_wc

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Thu, 19 Mar 2009 at 23:25 +0200:
> CGreg Stein wrote on Thu, 19 Mar 2009 at 21:20 +0100:
> > I don't know of a good way to test this code... not familiar with this
> > crop code. If somebody can set up a test that fails before / succeeds
> > after this change, then that would be great. I'd be happy to help with
> > this, but don't know where to start to get this functionality invoked.
> > 
> 
> How about this?
> 
>     % cd trunk/A
>     % svn up --set-depth exclude C
>     % grep '^C$' .svn/entries
>     C
>     % svn up --set-depth exclude D
>     % grep '^C$' .svn/entries
>     % grep '^D$' .svn/entries
>     D
>     %
> 
> (i.e., ./C is lost from the entries file, but ./D is)
> 
> I didn't test if your change fixes it.
> 

It does.  r36689.

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1358874

Re: svn commit: r36686 - trunk/subversion/libsvn_wc

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
CGreg Stein wrote on Thu, 19 Mar 2009 at 21:20 +0100:
> I don't know of a good way to test this code... not familiar with this
> crop code. If somebody can set up a test that fails before / succeeds
> after this change, then that would be great. I'd be happy to help with
> this, but don't know where to start to get this functionality invoked.
> 

How about this?

    % cd trunk/A
    % svn up --set-depth exclude C
    % grep '^C$' .svn/entries
    C
    % svn up --set-depth exclude D
    % grep '^C$' .svn/entries
    % grep '^D$' .svn/entries
    D
    %

(i.e., ./C is lost from the entries file, but ./D is)

I didn't test if your change fixes it.

Daniel


> Cheers,
> -g
> 
> On Thu, Mar 19, 2009 at 21:17, Greg Stein <gs...@gmail.com> wrote:
> > Author: gstein
> > Date: Thu Mar 19 13:17:17 2009
> > New Revision: 36686
> >
> > Log:
> > Fix an apparent bug in crop.c: it was fetch a *pruned* list of entries,
> > modifying the depth value of one of them, then writing the *subset* as if
> > it were the entire list of entries.
> >
> > * subversion/libsvn_wc/crop.c:
> >  (svn_wc_crop_tree): when reading the entries, use show_hidden = TRUE to
> >    get all of the hidden entries, too.
> >
> > Modified:
> >   trunk/subversion/libsvn_wc/crop.c
> >
> > Modified: trunk/subversion/libsvn_wc/crop.c
> > URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/crop.c?pathrev=36686&r1=36685&r2=36686
> > ==============================================================================
> > --- trunk/subversion/libsvn_wc/crop.c   Thu Mar 19 13:11:52 2009        (r36685)
> > +++ trunk/subversion/libsvn_wc/crop.c   Thu Mar 19 13:17:17 2009        (r36686)
> > @@ -284,8 +284,9 @@ svn_wc_crop_tree(svn_wc_adm_access_t *an
> >         {
> >           svn_wc_entry_t *target_entry;
> >           apr_hash_t *parent_entries;
> > +
> >           SVN_ERR(svn_wc_entries_read(&parent_entries, p_access,
> > -                                      FALSE, pool));
> > +                                      TRUE, pool));
> >
> >           target_entry = apr_hash_get(parent_entries,
> >                                       svn_dirent_basename(full_path, pool),
> >
> > ------------------------------------------------------
> > http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1357529
> >
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1357541
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1358071