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/10/07 21:50:14 UTC

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

On Sat, Sep 26, 2009 at 12:31, Hyrum K. Wright <hy...@hyrumwright.org> wrote:
>...
> +++ trunk/subversion/libsvn_wc/update_editor.c  Sat Sep 26 09:31:53 2009        (r39625)
> @@ -1830,23 +1830,27 @@ set_copied_callback(const char *local_ab
>                     apr_pool_t *scratch_pool)
>  {
>   struct set_copied_baton_t *b = walk_baton;
> -  const svn_wc_entry_t *entry;
> +  svn_wc__db_status_t status;
> +  svn_wc__db_kind_t kind;
>
>   if (strcmp(local_abspath, b->added_subtree_root_path) == 0)
>     return SVN_NO_ERROR; /* Don't touch the root */
>
> -  SVN_ERR(svn_wc__get_entry(&entry, b->eb->db, local_abspath, FALSE,
> -                            svn_node_unknown, FALSE,
> -                            scratch_pool, scratch_pool));
> +  SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL,
> +                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> +                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> +                               NULL, NULL, NULL, NULL, NULL,
> +                               b->eb->db, local_abspath,
> +                               scratch_pool, scratch_pool));

This loses the SHOW_HIDDEN == FALSE concept. Either keep it in, or I'd
like to know why you can ignore it...

(specifically, I think this might affect depth=exclude? maybe the walk
doesn't visit parent stubs?)

>...

Of course, it would be Even Better to translate that copied=true flag
into its wc_db meaning. Without tracing thru the entry-writing code,
I'm not really sure.

Cheers,
-g

> -  if (entry->kind == svn_node_dir)
> +  if (kind == svn_wc__db_kind_dir)
>     {
>       /* We don't want to mark a deleted PATH as copied.  If PATH
>          is added without history we don't want to make it look like
>          it has history.  If PATH is replaced we don't want to make
>          it look like it has history if it doesn't.  Only if PATH is
>          schedule normal do we need to mark it as copied. */
> -      if (entry->schedule == svn_wc_schedule_normal)
> +      if (status == svn_wc__db_status_normal)
>         {
>           svn_wc_entry_t tmp_entry;
>
> @@ -1867,7 +1871,7 @@ set_copied_callback(const char *local_ab
>      it has history.  If PATH is replaced we don't want to make
>      it look like it has history if it doesn't.  Only if PATH is
>      schedule normal do we need to mark it as copied. */
> -  if (entry->schedule == svn_wc_schedule_normal)
> +  if (status == svn_wc__db_status_normal)
>     {
>       svn_wc_entry_t tmp_entry;
>
> @@ -1875,7 +1879,9 @@ set_copied_callback(const char *local_ab
>       tmp_entry.copied = TRUE;
>       SVN_ERR(svn_wc__entry_modify2(b->eb->db,
>                                     local_abspath,
> -                                    entry->kind,
> +                                    kind == svn_wc__db_kind_dir
> +                                      ? svn_node_dir
> +                                      : svn_node_file,
>                                     FALSE,
>                                     &tmp_entry,
>                                     SVN_WC__ENTRY_MODIFY_COPIED,
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2400651
>

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

RE: svn commit: r39625 - trunk/subversion/libsvn_wc

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Greg Stein [mailto:gstein@gmail.com]
> Sent: woensdag 7 oktober 2009 23:50
> To: dev@subversion.tigris.org
> Subject: Re: svn commit: r39625 - trunk/subversion/libsvn_wc
> 
> On Sat, Sep 26, 2009 at 12:31, Hyrum K. Wright <hy...@hyrumwright.org>
> wrote:
> >...
> > +++ trunk/subversion/libsvn_wc/update_editor.c  Sat Sep 26 09:31:53
> 2009        (r39625)
> > @@ -1830,23 +1830,27 @@ set_copied_callback(const char *local_ab
> >                     apr_pool_t *scratch_pool)
> >  {
> >   struct set_copied_baton_t *b = walk_baton;
> > -  const svn_wc_entry_t *entry;
> > +  svn_wc__db_status_t status;
> > +  svn_wc__db_kind_t kind;
> >
> >   if (strcmp(local_abspath, b->added_subtree_root_path) == 0)
> >     return SVN_NO_ERROR; /* Don't touch the root */
> >
> > -  SVN_ERR(svn_wc__get_entry(&entry, b->eb->db, local_abspath, FALSE,
> > -                            svn_node_unknown, FALSE,
> > -                            scratch_pool, scratch_pool));
> > +  SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL,
> > +                               NULL, NULL, NULL, NULL, NULL, NULL,
> NULL,
> > +                               NULL, NULL, NULL, NULL, NULL, NULL,
> NULL,
> > +                               NULL, NULL, NULL, NULL, NULL,
> > +                               b->eb->db, local_abspath,
> > +                               scratch_pool, scratch_pool));
> 
> This loses the SHOW_HIDDEN == FALSE concept. Either keep it in, or I'd
> like to know why you can ignore it...
> 
> (specifically, I think this might affect depth=exclude? maybe the walk
> doesn't visit parent stubs?)
> 
> >...
> 
> Of course, it would be Even Better to translate that copied=true flag
> into its wc_db meaning. Without tracing thru the entry-writing code,
> I'm not really sure.

One of the reasons I avoided changing this function is that it will break on switched paths. 

I think this tree conflict handling helper needs a redesign, because you don't want local copies of switched paths, etc.

	Bert

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