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

Re: Issue with Revision 955787

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 26 Oct 2012 15:34:29 +0100

Sean Farrell <sfarrell_at_wv.mentorg.com> writes:

> (*status)->text_status = old_status->node_status;
> (*status)->prop_status = old_status->prop_status;
>
> (*status)->repos_text_status = old_status->repos_node_status;
> (*status)->repos_prop_status = old_status->repos_prop_status;
>
> /* Some values might be inherited from properties */
> if (old_status->node_status == svn_wc_status_modified
> || old_status->node_status == svn_wc_status_conflicted)
> (*status)->text_status = old_status->text_status;
>
> /* (Currently a no-op, but just make sure it is ok) */
> if (old_status->repos_node_status == svn_wc_status_modified
> || old_status->repos_node_status == svn_wc_status_conflicted)
> (*status)->text_status = old_status->repos_text_status;
> ...
> }
>
> As you can see "text_status" and "repos_text_status" follow similar logic, however the last line appears to be a copy & paste bug, where "text_status" is used it should instead be "repos_text_status". This explains why the "svn_wc_status2_t->text_status" has the value "svn_wc_status_modified" because it's being set to the value of "svn_wc_status3_t->repos_text_status".
>
> This section of code was committed with revision 955787 by rhuijben.
>
> Can anyone confirm my findings are correct, or wrong?

I think you are correct. Can you confirm that this is the correct fix:

Index: ../src/subversion/libsvn_wc/util.c
===================================================================
--- ../src/subversion/libsvn_wc/util.c (revision 1402519)
+++ ../src/subversion/libsvn_wc/util.c (working copy)
@@ -469,7 +469,7 @@
   /* (Currently a no-op, but just make sure it is ok) */
   if (old_status->repos_node_status == svn_wc_status_modified
       || old_status->repos_node_status == svn_wc_status_conflicted)
- (*status)->text_status = old_status->repos_text_status;
+ (*status)->repos_text_status = old_status->repos_text_status;
 
   if (old_status->node_status == svn_wc_status_added)
     (*status)->prop_status = svn_wc_status_none; /* No separate info */

-- 
Join us this October at Subversion Live 2012
http://www.wandisco.com/svn-live-2012
Received on 2012-10-26 16:35:06 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.