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

Re: Issue #2092: a file with unreasonable mtime can result in a corrupt "entries" file

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-08-01 22:55:32 CEST

Julian Foad <julianfoad@btopenworld.com> writes:

> a) When reading any file's mtime from the operating system, validate
> it and throw an error (refuse to handle the file) if it is
> unreasonable.
>
> b) Always preserve whatever mtime the operating system gives, ensuring
> that our "entries" file can represent it, reasonable or otherwise.
> This might involve the year being negative or more than four digits
> ... yuck.
>
> c) Ensure that we always write a well-formed "entries" file by writing
> some valid but fairly unreasonable time string instead of the totally
> unreasonable mtime of the file.

I don't like any of those, I'd prefer one of:

  d) Remove the checking from the string-to-mtime conversion so that
  the conversion reproduces the original "unreasonable" mtime and
  everything just works.

  e) Add checks to the mtime-to-string conversion so that it matches
  the string-to-mtime conversion, if the checks fail just omit the
  timestamp from the entries file. Everything just works but some
  operations will run a little slower. (This is (a) but without
  throwing an error.)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 1 22:58:46 2005

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.