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

Re: trivial yet very serious bug, suggestions welcome

From: Paul Smith <pausmith_at_nortelnetworks.com>
Date: 2001-10-30 00:23:49 CET

%% Karl Fogel <kfogel@newton.ch.collab.net> writes:

>> Waiting 1s after a checkout or update is one solution; that's what
>> CVS seems to do (it checks whether the 1s has already elapsed since
>> the "last_register_time" and does a sleep(1) if not; that check
>> might be overkill for us since we can't use global variables).
>> Touching the checked out files so that their last modified time is
>> 1s in the past is another solution.

  kf> Yup. Will do some solution like the above; it won't be a huge
  kf> performance hit, since it only affects files that are being
  kf> written out anyway.

  kf> Have filed issue #542, targeted for Alpha.

Be careful with timestamps.

Remember that they can behave differently if your repository is on an
NFS filesystem, for example, if the server's clock is not identical to
your local clock (which happens quite often).

If you update a file "normally" (by modifying it or creating it or
whatever), then it's the server's responsibility to set the timestamp so
it will be in relation to the server's clock. But, if you explicitly
set the time on the file then it will obviously be in relation to your
local clock.

I'm not sure that there's any issue here for your situation, but I think
it's a good idea to keep this in mind; for example, if you let the
server set some mod times, but you hard-set them yourself on other
files, then even if you wait a second they could be the same value!

Better to come up with a scheme which either always lets the server
update (I think this is what the sleep() method does; you wait at least
one second to get some differentiation and you don't hand-set any
timestamps) or in which you always set the time (I think this would be
painful).

I didn't completely grok the issue you're discussing so if this is
stupid just ignore me--I've had more than my share of timestamp problems
working with GNU make so I'm sensitive to these things :).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <pausmith@nortelnetworks.com> HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:46 2006

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