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

Re: [PATCH]: Check for symlinks only if HAVE_SYMLINK defined.

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2005-10-23 23:54:45 CEST

On 10/24/05, Philip Martin <philip@codematters.co.uk> wrote:
> Ivan Zhakov <chemodax@gmail.com> writes:
>
> > Index: subversion/libsvn_wc/status.c
> > ===================================================================
> > --- subversion/libsvn_wc/status.c (revision 16889)
> > +++ subversion/libsvn_wc/status.c (working copy)
> > @@ -238,7 +238,9 @@
> > svn_boolean_t prop_modified_p = FALSE;
> > svn_boolean_t locked_p = FALSE;
> > svn_boolean_t switched_p = FALSE;
> > +#ifdef HAVE_SYMLINK
> > svn_boolean_t wc_special;
> > +#endif /* HAVE_SYMLINK */
> >
> > /* Defaults for two main variables. */
> > enum svn_wc_status_kind final_text_status = svn_wc_status_normal;
> > @@ -357,10 +359,12 @@
> > SVN_ERR (svn_wc_props_modified_p (&prop_modified_p, path, adm_access,
> > pool));
> >
> > +#ifdef HAVE_SYMLINK
> > if (has_props)
> > SVN_ERR (svn_wc__get_special (&wc_special, path, adm_access, pool));
> > else
> > wc_special = FALSE;
> > +#endif /* HAVE_SYMLINK */
>
> If we made that
>
> #else
> wc_special = path_special;
> #endif
>
> perhaps the other HAVE_SYMLINK bits could be removed? I think it's
> better to have the #ifdef code in one place if possible.
May be, but don't use wc_speciall variable unless HAVE_SYMLINK defined
clearer for me.

> >
> > /* If the entry is a file, check for textual modifications */
> > if ((entry->kind == svn_node_file)
> > @@ -447,12 +451,12 @@
> > }
> > else if (path_kind != entry->kind)
> > final_text_status = svn_wc_status_obstructed;
> > +#ifdef HAVE_SYMLINK
> > else if (((! wc_special) && (path_special))
> > -#ifdef HAVE_SYMLINK
> > || (wc_special && (! path_special))
>
> How about
>
> if (wc_special != path_special)
>
> which complements the earlier (wc_special == path_special)?
I was wondered also. This was written my somebody else, and I don't
take myself to change it. May be because any non zero value treated as
"true" ? For example if wc_special=1 and path_special=2? I understand
that it is near to be impossible.

>
> > -#endif /* HAVE_SYMLINK */
> > )
> > final_text_status = svn_wc_status_obstructed;
> > +#endif /* HAVE_SYMLINK */
> >
> > if (path_kind == svn_node_dir && entry->kind == svn_node_dir)
> > SVN_ERR (svn_wc_locked (&locked_p, path, pool));
>
> --
> Philip Martin
>

--
Ivan Zhakov
Received on Sun Oct 23 23:55:39 2005

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