[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Merging in Irmin
On 9 April 2015 at 19:18, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote: >> There are two cases. If the branch already contains a commit: >> 1. I use View.of_path to get the view. >> 2. I use BC.of_head to make a temporary branch. >> 3. I commit to the temporary branch with View.update_path. >> 4. After testing the commit, I use BC.compare_and_set_head to commit >> to the main branch. >> >> If the branch is empty: >> 1. I use View.empty to get the view. >> 2. I commit directly to the master branch with View.update_path (no >> testing is possible in this case). >> >> This works - it would just be a bit neater if there was a uniform way >> to make a commit from a view. > > Agreed. I have a ticket open to be able to start an empty store with a named > branch. I should fix it and that should help. >> >>> I've been playing with that API a little bit but that's not very easy to do >>> actually (currently View depends on BC, and adding your function will make >>> the whole thing recursive). I can either: >>> 1. add the function in View (ie. `View.make_head: db -> task -> >>> parents:head list -> contents:t -> head`) which is a bit weird but should >>> work; >>> 2/ or I can expose a staging area as a HRW store (i.e. without the subpath >>> functions which appear in the View signature), so all updates should go >>> through that module and that will be incompatible with normal views. >>> 3. or I can implement immutable views to have a proper staging area using >>> immutable prefix trees. >>> >>> I'm in favour of 1. for now on and hopefully one day we'll have 3. Is it >>> fine with you? >> >> Sounds good to me. Thanks! > > I've done that in https://github.com/mirage/irmin/pull/188 That's great :-) I've updated my code to use this and I've started writing my own merge logic. I had some trouble checking it with git due to https://github.com/mirage/irmin/issues/190 but it's not a major problem. Thanks! -- 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 |