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

diff_tests 4 and wc-ng

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 1 Apr 2009 14:41:39 +0200

Hyrum,

I tracked down the problem with diff_tests 4. Ugh.

At a high level, "svn diff" is not reporting the change in A/D/G/rho.
The diff simply returns. Yet it is *clearly* different.

Also: it happens sporadically.

Works for wc-1, fails for wc-ng.

The problem originates in svn_wc__text_modified_interal_p() in
wc/questions.c. During the diff process, this is called with
force_comparison==FALSE, so the entry values are examined to shortcut
the process. Under wc-ng, working_size == -1 so a size comparison is
not performed. And *sometimes* mtime == text_time (no modification!)
and other times mtime == (text_time + 1 second) which means "yup.
modified."

IOW, depending on what gets recorded for text_time, we may or may not
flag a difference. It *never* reaches the byte-for-bye comparison.

Under wc-1, the working_size is always valid, and the different file
sizes are properly detected. TODO: eliminate the size check and see if
wc-1 has a similar time race.

For wc-ng, there are two things to do:

1) get working_size to have a correct value (for entries compatibility)
2) track down the variance in text_time recording

I'm going to work on the wc-1 TODO, and part 2. If you could track why
working_size comes out as -1 in wc-ng, then we could nail this.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1506663
Received on 2009-04-01 14:41:58 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.