Chris Snook wrote:Jack Stone wrote:The idea was that if you did an ls you would get the latest version ofI have one right now:
the file without the :revision_num. The only visible version would be
the latest version, i.e. the current system would not change. The idea
was that it would only show earlier versions if they were specifically
requested with a :revision_num suffix. In that case the
filesystem/kernel would need to recognise the suffix and return the
earlier version of the file.
The only userspace it would break is files with :num in their name, as I
haven't seen any files like that I don't think its too big a problem but
the way of specifiying revisions could be changed.
Jack
$ ls /tmp/ksocket-csnook/kdeinit*
/tmp/ksocket-csnook/kdeinit__0 /tmp/ksocket-csnook/kdeinit-:0
Note, I did not pass any special arguments to ls to make it pull up that
file. You'd have to modify ls to make it do that. You'd also need to
modify everything else out there. There are decades of programs out
there that would behave differently with the interface you propose.
The more fundamental problem with your proposed interface is that it
treats a filesystem like an opaque server, instead of a transparent data
structure. You want files to be completely invisible to applications
that don't know about it, unless the user requests it. Unfortunately,
it doesn't work that way. Applications ask for a directory listing, and
will open the requested file if and only if the filename in question
appears in that listing. If you want to use this opaque server model,
you'd be better served putting it in some parallel file system (say,
/backup) that won't interfere with naive applications accessing the
mundane data. Personally, I like your idea of putting the older
versions in the same directory hierarchy, but I think you'd have to use
.foo hidden directories to do it right.
The whole idea of the file system is that it wouldn't return the file in
the file listing. The user would have to know that the file system was
versioning to access the older versions as they would explicitly have to
request them.
Jack