[darcs-users] 'darcs add' loses inital file contents, a timestamp problem?

David Roundy droundy at abridgegame.org
Wed May 21 16:15:53 UTC 2003


On Wed, May 21, 2003 at 06:00:00PM +0200, Yann Vernier wrote:
> Wouldn't a more correct approach to that problem be to also check the
> size of the files? I'm totally new to Haskell, but assuming
> getFileStatus is something like stat(), you'll have not only
> modification time but file size, and for this check, you're only looking
> for difference, not really the age. 

That's a good idea.  I'll add that check as well.

> While I can't quite read Haskell yet, it looks to me like wait_a_bit in
> wait_a_moment is doing a recursive busywait. If you really need a delay,
> please simply sleep (it ought to be in the library somewhere).

True.  Originally I wrote it that way because I wasn't sure what the
time units were for the file modification time (EpochTime).  I've since
learned that it is seconds (yuck), so sleeping a second would work.  Will
make this change, too.
-- 
David Roundy
http://civet.berkeley.edu/droundy/




More information about the darcs-users mailing list