Propagate the mtime from a file up to /. This is *VERY* useful for things like using du -m (see du patch) to find changed files and to feed replication tools (among others). We have been using it and it's working properly (at least for us). Notes: Fri Nov 19 15:01:16 EST 2004 rsc I'm not convinced that setting f->dir.atime when f->up == nil has any effect at all. I'd like to figure that out before applying. russ Tue Jan 4 10:34:47 EST 2005 rsc I've been convinced that it's not right to change mtime. Perhaps there should be a new rmtime or something like that. It's also not clear how to make it work in the presence of binds. Wed Oct 25 16:43:24 EDT 2006 geoff I think you can ignore the binds and just ascend the fossil tree. If fossil exposed something with the same properties (will change if a directory or anything under it changes) as the underlying venti score, but not the score itself, that would probably work just as well. Perhaps an MD5 hash that fossil, not venti, could maintain. It would really help with vacing dumps. Reference: /n/sources/patch/saved/fossilmtime Date: Sun Feb 24 00:53:45 CET 2008 Reviewed-by: geoff --- /sys/src/cmd/fossil/file.c Sun Feb 24 00:53:45 2008 +++ /sys/src/cmd/fossil/file.c Sun Feb 24 00:53:44 2008 @@ -1663,6 +1663,15 @@ if(f->mode == OReadOnly) return; + /* We can get (recursively) here with root files + * that don't have f->up. Their metadata + * can't be changed. So we update just + * the times. + */ + if (f->up == nil){ + f->dir.atime = f->dir.mtime = time(0L); + return; + } fileMetaLock(f); f->dir.atime = f->dir.mtime = time(0L); if(strcmp(f->dir.mid, mid) != 0){ @@ -1673,11 +1682,8 @@ f->dirty = 1; fileMetaUnlock(f); -/*RSC: let's try this */ -/*presotto - lets not if(f->up) fileWAccess(f->up, mid); -*/ } static int