> I'm thinking of some table indexed by path, then revision number, with
> some nice, meaningful ordering to allow range searches...

Those indexes could become really huge. Oh ... I see Berkeley DB uses
stores the keys using adaptive compression. That's less of a problem, then.

(What's interesting is that once you have such an index, you can throw
away directory entry lists, because your index implicitly contains the
directory structure. That's nice if you have large directories, because
suddenly directory lookups take logarithmic instead of linear time. With
the right ordering, you can represent a whole directory with a
consecutive range of keys. The only #$@! little detail is that you'd get
large batches of identical paths with different node rev numbers.