[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-10-23 23:43:12 CEST

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.

>
> /* 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)?

 
> -#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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 23 23:44:51 2005

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