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

Re: svn st -N crash: tweak_statushash: Assertion failed

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-02-27 04:23:59 CET

On Feb 26, 2005, at 6:34 PM, John Locke wrote:
> Now, I'm not a C programmer,

Apparently not. :-)

> so none of this makes a whole lot of sense to me. But I thought this
> looked funny--it looks like this is comparing these two values, when
> perhaps it should be assigning svn_wc_status_added to
> repos_text_status?

No, it's definitely supposed to be comparing the two values. assert()
always tests a condition. Putting an assignment into assert(),
especially when the right-side of the assignment is a positive integer,
will always return a "true" value. So it's a meaningless assertion
now. The change you made is equivalent to having written assert(1),
which will always succeed. You might as well have deleted the whole
assert call. :-)

So the question is: *why* does the code expect repos_text_status to be
svn_wc_status_added? And how does it happen that this isn't true?

> Anyway, I changed it to:
> assert (repos_text_status = svn_wc_status_added);
> ... and recompiled, and this seemed to fix my problem.
> Then I ran across issue 2122 and 695 in the Subversion issue database.

I haven't looked at these yet... lemme see.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 27 04:26:16 2005

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

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