[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Irmin API newbie questions
> I've added a somewhat functional Irmin abstraction to CueKeeper now to > try this out. Here's the interface I made: > > https://github.com/talex5/cuekeeper/blob/master/git_storage_s.mli > > This doesn't provide access to all Irmin's features of course, but it > shows everything I'm using and it's probably easier for beginners. The > main differences are: Very interesting. I'm wondering which part of the Irmin public API is already too complex to expose to the user, and what should be refactor to look much like your Git-like interface. I'll think about it. I quite like your simplified interface ... > - The LCA calculation is slow > (https://github.com/mirage/irmin/issues/160) so I used Thomas's > suggestions of limiting the number of common ancestors to 1. However, > this could give the wrong answer in some cases. I think Irmin just > needs to be smarter about pruning the search when it finds a common > node. my plan is to add a way 1) to detect fast-forward and stop the exploration much more quicker in that case and 2) use timestamps to guide the explorations (or even provide a timestamp optional flag to guide the exploration only using the timestamps as Git is doing -- this would break in some cases so it would not be the default). > - I couldn't find a way to make a commit without a parent without > using a named branch. The special-case initialisation code could go > away if Irmin allowed that. I'll fix that.[1] > - fast_forward_to checks that the update is a fast-forward to avoid > data-loss, but it's not quite atomic. Ideally, Irmin would provide > this function itself and lock the backend. I guess you don't need this function if `merge` is doing the right job. I'm fixing this. > (Also, my history API isn't very good. I want someone with a commit to > be able to look at the parents, but I didn't see a way to map a > graph's nodes from commit IDs to commits. Therefore, I currently turn > the history into a flat list of log entries.) This history graph gives you a graph of commits ID. You can then use Imrin.History.pred[2] (in the OCamlGraph API) to get the predecessors (the parents) of a node. Best, Thomas [1] https://github.com/mirage/irmin/issues/161 [2] http://ocamlgraph.lri.fr/doc/Sig.G.html#VALpred > > > -- > Dr Thomas Leonard http://0install.net/ > GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 > GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |