Thanks a lot, Thomas! That was definitely helpful and helped me get unstuck.
I see now that `fill_cache` <https://github.com/Engil/Canopy/blob/b93dad3591a1d1edfbd998dc651b7a44ea8a416a/canopy_store.ml#L97-L122> iterates over the tree/files in master (or a specified remote branch) and then gets the create and update times for each of those files by iterating over every commit in history. By the way, Irmin looks great and looking forward to using it more! Cheers, Gabriel On Sun, Nov 6, 2016 at 7:41 AM, Thomas Gazagnaire <[email protected]> wrote: > Hi, > > > I'm trying to implement a 'recent activity' feed in Canopy( > https://github.com/Engil/Canopy) which uses Irmin as datastore. It stores > data in-memory > > and populates the store with data from a remote Git repository. Will > `Store.iter` iterate through each commit that was in the repo? > > Store.iter will only iterate over the tree/files of the commit that you > are considering. > > The full history is available via Store.History. Luckily for you, Engil > already wrote a function iterating over the history which is used to find > the date of creation of a file, you can see it here: > > https://github.com/Engil/Canopy/blob/b93dad3591a1d1edfbd998dc651b7a > 44ea8a416a/canopy_store.ml#L63-L78 > > In that function, `key` is the file that you want to know things about, > and the `aux` function iterated over every commit to find the creation and > update times of that file. > > Topological.fold is defined in OCamlGraph: http://ocamlgraph.lri.fr/doc/ > Topological.Make.html#VALfold > > Hope this helps, > Thomas > > -- Gabe Jaldon
_______________________________________________ MirageOS-devel mailing list [email protected] https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
