You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2004/09/08 14:46:21 UTC

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

ghudson@tigris.org writes:
> Log:
> Fix an "svn status -u" crash resulting from horked working copies.
> 
> * subversion/libsvn_wc/status.c (close_directory): If our working copy
>   is not in sync with the repository, we may receive an open_directory
>   for a subdir which we have no entry for in the working copy.  If
>   this directory is not new and has not experienced and property or
>   entry changes, we will not create an entry for it in pb->statii, so
>   we must be careful of NULL status entries when checking if a closed
>   subdir was deleted or replaced.

I wonder if that log message wouldn't be better as a comment in the
code, right before the dir_status check?

-K


> Modified: trunk/subversion/libsvn_wc/status.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_wc/status.c?view=diff&rev=10841&p1=trunk/subversion/libsvn_wc/status.c&r1=10840&p2=trunk/subversion/libsvn_wc/status.c&r2=10841
> ==============================================================================
> --- trunk/subversion/libsvn_wc/status.c	(original)
> +++ trunk/subversion/libsvn_wc/status.c	Mon Sep  6 13:52:03 2004
> @@ -1332,8 +1332,9 @@
>  
>        /* See if the directory was deleted or replaced. */
>        dir_status = apr_hash_get (pb->statii, db->path, APR_HASH_KEY_STRING);
> -      if ((dir_status->repos_text_status == svn_wc_status_deleted)
> -          || (dir_status->repos_text_status == svn_wc_status_replaced))
> +      if (dir_status &&
> +          ((dir_status->repos_text_status == svn_wc_status_deleted)
> +           || (dir_status->repos_text_status == svn_wc_status_replaced)))
>          was_deleted = TRUE;
>  
>        /* Now do the status reporting. */
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Greg Hudson <gh...@MIT.EDU>.
On Wed, 2004-09-08 at 10:46, kfogel@collab.net wrote:
> I wonder if that log message wouldn't be better as a comment in the
> code, right before the dir_status check?

Possibly.  We don't have a similar comment in a later null check, and
I'm comfortable with the idea that someone cleaning up the code (perhaps
changing the definition of the statii field so that there is always an
entry) would have to do an svn blame and check some log messages to
figure out why the null check is there.  But if someone wants to add the
comment, I won't object.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org