Merging merge

This commit is contained in:
Gavin Whelan 2014-05-20 11:53:49 -07:00
parent 2f414a5413
commit a242cea2b2
4 changed files with 205 additions and 110 deletions

View File

@ -364,13 +364,12 @@
++ udon :: abstract delta ++ udon :: abstract delta
$: p=umph :: preprocessor $: p=umph :: preprocessor
$= q :: patch $= q :: patch
$% [%a p=ulna] :: trivial replace $% [%a p=* q=*] :: trivial replace
[%b p=udal] :: atomic indel [%b p=udal] :: atomic indel
[%c p=(urge)] :: list indel [%c p=(urge)] :: list indel
[%d p=upas q=upas] :: tree edit [%d p=upas q=upas] :: tree edit
== :: == ::
== :: == ::
++ ulna ,[p=* q=*] :: from to
++ umph :: change filter ++ umph :: change filter
$| $? %a :: no filter $| $? %a :: no filter
%b :: jamfile %b :: jamfile
@ -3766,8 +3765,8 @@
:- pum :- pum
?+ pum ~|(%unsupported !!) ?+ pum ~|(%unsupported !!)
%a [%d (nude old new)] %a [%d (nude old new)]
:: %b =+ [hel=(cue ((hard ,@) old)) hev=(cue ((hard ,@) new))] %b =+ [hel=(cue ((hard ,@) old)) hev=(cue ((hard ,@) new))]
:: [%d (nude hel hev)] [%d (nude hel hev)]
%c =+ [hel=(lore ((hard ,@) old)) hev=(lore ((hard ,@) new))] %c =+ [hel=(lore ((hard ,@) old)) hev=(lore ((hard ,@) new))]
[%c (lusk hel hev (loss hel hev))] [%c (lusk hel hev (loss hel hev))]
== ==
@ -3869,7 +3868,7 @@
?+ p.don ~|(%unsupported !!) ?+ p.don ~|(%unsupported !!)
%a %a
?+ -.q.don ~|(%unsupported !!) ?+ -.q.don ~|(%unsupported !!)
%a q.p.q.don %a q.q.don
%c (lurk ((hard (list)) src) p.q.don) %c (lurk ((hard (list)) src) p.q.don)
%d (lure src p.q.don) %d (lure src p.q.don)
== ==
@ -3878,7 +3877,7 @@
=+ dst=(lore ((hard ,@) src)) =+ dst=(lore ((hard ,@) src))
%- role %- role
?+ -.q.don ~|(%unsupported !!) ?+ -.q.don ~|(%unsupported !!)
%a ((hard (list ,@t)) q.p.q.don) %a ((hard (list ,@t)) q.q.don)
%c (lurk dst p.q.don) %c (lurk dst p.q.don)
== ==
== ==
@ -3896,7 +3895,7 @@
|= don=udon ^- udon |= don=udon ^- udon
:- p.don :- p.don
?+ -.q.don ~|(%unsupported !!) ?+ -.q.don ~|(%unsupported !!)
%a [%a q.p.q.don p.p.q.don] %a [%a q.q.don p.q.don]
%c [%c (berk p.q.don)] %c [%c (berk p.q.don)]
%d [%d q.q.don p.q.don] %d [%d q.q.don p.q.don]
== ==
@ -3905,6 +3904,7 @@
|= [pum=umph src=*] ^- * |= [pum=umph src=*] ^- *
?+ pum ~|(%unsupported !!) ?+ pum ~|(%unsupported !!)
%a src %a src
%b (cue ((hard ,@) src))
%c (lore ((hard ,@) src)) %c (lore ((hard ,@) src))
== ==
:: ::
@ -3912,6 +3912,7 @@
|= [pum=umph dst=*] ^- * |= [pum=umph dst=*] ^- *
?+ pum ~|(%unsupported !!) ?+ pum ~|(%unsupported !!)
%a dst %a dst
%b (jam dst)
%c (role ((hard (list ,@)) dst)) %c (role ((hard (list ,@)) dst))
== ==
:: ::

View File

@ -422,7 +422,6 @@
;~(sfix dim:ag col) dim:ag (cold ~ (star next)) ;~(sfix dim:ag col) dim:ag (cold ~ (star next))
== ==
[[%.y &3.tuc] &2.tuc &1.tuc &4.tuc &5.tuc &6.tuc ~] [[%.y &3.tuc] &2.tuc &1.tuc &4.tuc &5.tuc &6.tuc ~]
:: ::
++ yu :: UTC format constants ++ yu :: UTC format constants
|% |%
@ -750,7 +749,7 @@
:: ::
++ acai :: acai:ze ++ acai :: acai:ze
|= mus=masu :: inverse trout |= mus=masu :: inverse trout
[p.mus q.mus [q.r.mus p.r.mus] [q.s.mus p.s.mus]] [p.mus q.mus [q.r.mus p.r.mus] [q.s.mus p.s.mus] t.mus]
:: ::
++ acid :: acid:ze ++ acid :: acid:ze
|= oan=@ud :: invert to |= oan=@ud :: invert to
@ -778,36 +777,38 @@
| $(may t.may) | $(may t.may)
== ==
:: ::
++ alba :: alba:ze ++ alda :: alda:ze
|= hoe=(list tako) :: deconstruct |= hoe=(list tako) :: deconstruct
|- ^- (map path (list udon)) |- ^- (map path (list miso))
?~ hoe ~ ?~ hoe ~
=+ hom=$(hoe t.hoe) =+ hom=$(hoe t.hoe)
%+ ~(put by hom) p.i.hoe %+ ~(put by hom) p.i.hoe
=+ vue=(~(get by hom) p.i.hoe) =+ vue=(~(get by hom) p.i.hoe)
[?>(?=(%mut -.q.i.hoe) p.q.i.hoe) ?~(vue ~ u.vue)] [q.i.hoe ?~(vue ~ u.vue)]
:: ::
++ aloe :: aloe:ze ++ alot
|= yop=(map path (list udon)) :: reconstruct |= yop=(map path (list miso))
^- (list tako) ^- (list tako)
=+ puy=(~(tap by yop) ~) =+ puy=(~(tap by yop) ~)
|- ^- (list tako) |- ^- (list tako)
?~ puy ~ ?~ puy ~
(weld (turn q.i.puy |=(a=udon [p.i.puy %mut a])) $(puy t.puy)) (weld (turn q.i.puy |=(a=miso [p.i.puy a])) $(puy t.puy))
:: ::
++ alto :: alto:ze ++ alto :: alto:ze
|= $: yop=(map path (list udon)) :: yop before peq |= $: wek=(map path woof)
peq=(map path (list udon)) yop=(map path (list miso)) :: yop before peq
peq=(map path (list miso))
== ==
=+ puy=(~(tap by yop) ~) =+ puy=(~(tap by yop) ~)
|- ^+ peq |- ^+ [wek peq]
?~ puy peq ?~ puy [wek peq]
%= $ =+ wof=(~(get by wek) p.i.puy)
puy t.puy
peq
=+ peb=(~(get by peq) p.i.puy) =+ peb=(~(get by peq) p.i.puy)
?~ peb peq =+ lyr=(lyre wof q.i.puy ?~(peb ~ u.peb))
(~(put by peq) p.i.puy (lyre q.i.puy u.peb)) %= $
wek ?~(-.lyr wek (~(put by wek) p.i.puy u.-.lyr))
puy t.puy
peq (~(put by peq) p.i.puy +.lyr)
== ==
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
@ -815,17 +816,20 @@
|* wig=(urge) |* wig=(urge)
|= dog=woof |= dog=woof
^+ [p=dog q=wig] ^+ [p=dog q=wig]
?~ wig [~ ~] ?~ wig :: no more urges
?: =([%& 0] i.wig) $(wig t.wig) =+ woo=(wode dog) :: dimensions
?~ dog ?> =(p.woo 0) :: line
?- -.i.wig [dog ~[[%& q.woo]]] :: extend
& $(dog [p.i.wig ~]) ?~ dog :: no more woofs
| $(dog [(lent p.i.wig) ~]) =+ woo=(lode wig) :: dimensions
== ?> =(p.woo 0) :: line
[~[q.woo] wig] :: extend
?@ i.dog ?@ i.dog
?: =(0 i.dog) $(dog t.dog)
?- -.i.wig ?- -.i.wig
& &
?: =(i.dog p.i.wig)
=+ mol=$(dog t.dog, wig t.wig)
[[i.dog p.mol] [[%& i.dog] q.mol]]
?: (lth i.dog p.i.wig) ?: (lth i.dog p.i.wig)
=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig i.dog)) =+ mol=$(dog t.dog, p.i.wig (sub p.i.wig i.dog))
[[i.dog p.mol] [[%& i.dog] q.mol]] [[i.dog p.mol] [[%& i.dog] q.mol]]
@ -836,54 +840,110 @@
=+ leg=(lent p.i.wig) =+ leg=(lent p.i.wig)
?> (gte i.dog leg) ?> (gte i.dog leg)
=+ mol=$(i.dog (sub i.dog leg), wig t.wig) =+ mol=$(i.dog (sub i.dog leg), wig t.wig)
:- `woof`[`[@ @]`[leg (lent q.i.wig)] `woof`p.mol] [[(lent q.i.wig) p.mol] [i.wig q.mol]]
^+(wig [i.wig q.mol])
== ==
?> ?=(& -.i.wig) ?> ?=(& -.i.wig)
?> (gte p.i.wig -.i.dog) ?: =(p.i.wig -.i.dog)
=+ mol=$(dog t.dog, wig t.wig)
[[i.dog p.mol] [[%& +.i.dog] q.mol]]
?: (gth p.i.wig -.i.dog)
=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig -.i.dog)) =+ mol=$(dog t.dog, p.i.wig (sub p.i.wig -.i.dog))
[[i.dog p.mol] [[%& +.i.dog] q.mol]] [[i.dog p.mol] [[%& +.i.dog] q.mol]]
!!
:: ::
++ lith :: initial transform ++ lide :: merge dogs
|= [wig=woof dog=woof]
^- woof
?~ dog wig
?~ wig dog
?^ i.dog
?^ i.wig
:_ $(dog t.dog, wig t.wig) :: merge changes
?: (lte -.i.dog +.i.wig)
[-.i.wig (add +.i.dog (sub +.i.wig -.i.dog))]
[(add -.i.wig (sub -.i.dog +.i.wig)) +.i.dog]
?: (gte i.wig -.i.dog)
[i.dog (sub i.wig -.i.dog) $(dog t.dog, wig t.wig)]
[[i.wig 0] $(wig t.wig, -.i.dog (sub -.i.dog i.wig))]
?^ i.wig
?: (gte i.dog +.i.wig)
[i.wig (sub i.dog +.i.wig) $(dog t.dog, wig t.wig)]
[[-.i.wig (sub +.i.wig i.dog)] $(wig [[0 i.dog] t.wig], dog t.dog)]
?: (gte i.wig i.dog)
[i.dog $(dog t.dog, i.wig (sub i.wig i.dog))]
[i.wig $(i.dog (sub i.dog i.wig), wig t.wig)]
::
++ lode
|= wig=(urge)
^- [p=@ q=@]
=+ woo=[p=0 q=0]
|- ^- [p=@ q=@]
?~ wig woo
?- -.i.wig
&
$(-.woo (add p.i.wig -.woo), +.woo (add p.i.wig +.woo), wig t.wig)
|
%= $
-.woo (add (lent p.i.wig) -.woo)
+.woo (add (lent q.i.wig) +.woo)
wig t.wig
==
==
:: :: woof dimensions
++ wode
|= dog=woof
^- [p=@ q=@]
=+ woo=[q=0 q=0]
|- ^- [p=@ q=@]
?~ dog woo
?@ i.dog
$(-.woo (add i.dog -.woo), +.woo (add i.dog +.woo), dog t.dog)
%= $
-.woo (add -.i.dog -.woo)
+.woo (add +.i.dog +.woo)
dog t.dog
==
::
++ lith :: initial merge points
|= wig=(urge) |= wig=(urge)
^- woof ^- woof
=+ wug=((lisp wig) *woof) ?~ wig ~
?>(=(wig q.wug) p.wug) ?- -.i.wig
& [p.i.wig $(wig t.wig)]
| [[(lent p.i.wig) (lent q.i.wig)] $(wig t.wig)]
==
:: ::
++ lobe :: udonous urge ++ alho :: update woof, misos
|= [ump=umph heb=(list (urge))] |= [wof=woof mad=(list miso)]
^- (list udon) ^- [woof (list miso)]
(turn heb |=(a=(urge) `udon`[ump %c a])) ?~ mad [wof ~]
?. &(?=(%mut -.i.mad) ?=(%c -.q.p.i.mad))
=+ rec=$(mad t.mad)
[-.rec [i.mad +.rec]]
=+ wug=((lisp p.q.p.i.mad) wof)
=+ rec=$(mad t.mad, wof p.wug)
[-.rec [[%mut [p.p.i.mad [%c q.wug]]] +.rec]]
:: ::
++ lobo :: urgey udon ++ lobo :: update woof, miso
|= [ump=umph yeb=(list udon)] |= [wof=woof don=miso]
^- (list (urge)) ^- woof
(turn yeb |=(a=udon ?>(&(=(ump p.a) ?=(%c -.q.a)) p.q.a))) ?. &(?=(%mut -.don) ?=(%c -.q.p.don))
:: wof
++ loch :: put wof before weq (lide wof (lith p.q.p.don))
|= [wof=woof weq=(list (urge))]
^- (list (urge))
|- ^+ weq
?~ weq ~
=+ wug=((lisp i.weq) wof)
[q.wug $(weq t.weq, wof p.wug)]
::
++ loup :: put heb before weq
|= [heb=(list (urge)) weq=(list (urge))]
^- (list (urge))
?~ heb weq
?~ weq heb
?: =(i.heb i.weq) $(heb t.heb, weq t.weq)
$(heb t.heb, weq (loch (lith i.heb) weq))
:: ::
++ lyre :: put yeb before zeq ++ lyre :: put yeb before zeq
|= [yeb=(list udon) zeq=(list udon)] |= [wof=(unit woof) yeb=(list miso) zeq=(list miso)]
^- (list udon) ^- [(unit woof) (list miso)]
?~ yeb zeq ?~ yeb
?~ zeq yeb ?~ wof [wof zeq]
?: =(i.yeb i.zeq) $(yeb t.yeb, zeq t.zeq) =+ alw=(alho u.wof zeq)
=+ ump=p.i.yeb [wof +.alw]
(lobe ump (loup (lobo ump yeb) (lobo ump zeq))) ?~ wof
?: &(?=(%mut -.i.yeb) ?=(%c -.q.p.i.yeb))
$(wof (some (lith p.q.p.i.yeb)), yeb t.yeb)
=+ rec=$(yeb t.yeb)
[-.rec [i.yeb +.rec]]
$(wof (some (lobo u.wof i.yeb)), yeb t.yeb)
:: ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
++ amor :: amor:ze ++ amor :: amor:ze
@ -920,46 +980,45 @@
$(+> (ante lem)) $(+> (ante lem))
:: ::
++ arum :: arum:ze ++ arum :: arum:ze
|= [tak=(list tako) kat=(list tako)] :: hard merge |= [wak=waks tak=(list tako) kat=(list tako)] :: hard merge
(aloe (alto (alba tak) (alba kat))) ^- [waks (list tako)]
=+ alt=(alto (awba wak) (alda tak) (alda kat))
[(awoe -.alt) (alot +.alt)]
:: ::
++ auld :: auld:ze ++ auld :: auld:ze
|= [wen=@da gem=germ sab=saba] :: construct merge |= [wen=@da gem=germ sab=saba] :: construct merge
^- (unit (unit nori)) :::::: ^- (unit (unit nori)) ::::::
=+ ^= viq ^- [p=@ud q=@ud] :: =+ ^= viq ^- [p=@ud q=@ud r=waks] :: merge status
=+ viq=(~(get by ang) [p.sab q.sab]) :: =+ viq=(~(get by ang) [p.sab q.sab]) ::
?~(viq [0 0] u.viq) :: ?~(viq [0 0 ~] u.viq) ::
=. sab :: =. sab ::
?: =(q.viq p.r.sab) sab :: perfect motion ?: =(q.viq p.r.sab) sab :: perfect motion
?> (gth q.viq p.r.sab) :: proper motion ?> (gth q.viq p.r.sab) :: proper motion
%= sab :: %= sab ::
p.r q.viq :: p.r q.viq ::
s (slag (sub q.viq p.r.sab) s.sab) :: s (slag (sub q.viq p.r.sab) s.sab) :: remove excess
== :: == ::
?~ s.sab [~ ~] ?~ s.sab [~ ~] :: up to date
=+ ^= mus ^- masu =+ ^= mus ^- masu :: sync square
[p.sab q.sab [p.viq +(let)] [q.viq q.r.sab]] [p.sab q.sab [p.viq +(let)] [q.viq q.r.sab] r.viq]
:: ~& [%auld p.mus q.mus [%too r.mus] [%fro s.mus]] =+ kat=(alar s.sab) :: takos
=+ kat=(alar s.sab) =+ lem=[%& p=[~ u=mus] q=`soba`[_[@ @] kat]] :: nori
=+ lem=[%& p=[~ mus] q=`soba`[_[@ @] kat]] =+ ^= tak :: local changes
?: =(let p.viq) %- alar %- flop :: chronological takos
:: ~& [%nice let] %+ turn (scag (sub let p.viq) hit) :: remove excess
[~ ~ lem] :: perfect fit
=+ paj=(axel:(argo p.viq) wen lem) :: XX !!
?: =(ank.paj ank) ::
:: ~& [%same [let p.viq]]
[~ ~ lem(q.q ~)]
=+ ^= tak
%- alar %- flop
%+ turn (scag (sub let p.viq) hit)
|=(a=frog q.a) |=(a=frog q.a)
=+ tig=(mang [arum tak kat] |=(* *(unit))) =+ tig=(mang [arum r.viq tak kat] |=(* *(unit))) :: moves
?^ tig [~ ~ lem(q.q ((hard (list tako)) u.tig))] ?^ tig
=+ res=((hard ,[waks (list tako)]) u.tig)
[~ ~ lem(q.q +.res)] ::, t.u.p -.res)] :: update takos, woof
?- gem ?- gem
%fine ~ :: nothing perfect %fine ~ :: nothing perfect
%mate ~|(%mate-stub !!) :: not supported %mate ~|(%mate-stub !!) :: not supported
%that [~ ~ lem(q.q (weld (acid p.viq) q.q.lem))] %that [~ ~ lem(q.q (weld (acid p.viq) q.q.lem))]
%this [~ ~ lem(q.q ~)] %this
=+ tig=(need (mang [arum r.viq tak ~] |=(* *(unit))))
=+ typ=((hard ,[waks (list tako)]) tig)
[~ ~ lem(q.q ~)] ::, t.u.p -.typ)]
== ==
:: ::
++ auto :: auto:ze ++ auto :: auto:ze
@ -990,17 +1049,33 @@
|= mys=(unit masu) :: apply trout |= mys=(unit masu) :: apply trout
^+ +> ^+ +>
?~ mys +> ?~ mys +>
=+ [yek=[p.u.mys q.u.mys] det=[q.r.u.mys q.s.u.mys]] =+ [yek=[p.u.mys q.u.mys] det=[q.r.u.mys q.s.u.mys t.u.mys]]
=+ guf=(~(get by ang) yek) =+ guf=(~(get by ang) yek)
=+ ted=`moar`?~(guf [0 0] u.guf) =+ ted=`[p=@ q=@ r=waks]`?~(guf [0 0 ~] u.guf)
:: ~& [%avon p.u.mys q.u.mys [%haz ted] [%too r.u.mys] [%fro s.u.mys]]
?> &(=(p.ted p.r.u.mys) =(q.ted p.s.u.mys)) ?> &(=(p.ted p.r.u.mys) =(q.ted p.s.u.mys))
+>.$(ang ?:(=([0 0] det) (~(del by ang) yek) (~(put by ang) yek det))) +>.$(ang ?:(=([0 0 ~] det) (~(del by ang) yek) (~(put by ang) yek det)))
::
++ awba :: awba:ze
|= hoe=(list wako) :: deconstruct
|- ^- (map path woof)
?~ hoe ~
=+ hom=$(hoe t.hoe)
(~(put by hom) p.i.hoe q.i.hoe)
::
++ awoe :: awoe:ze
|= yop=(map path woof) :: reconstruct
^- (list wako)
=+ puy=(~(tap by yop) ~)
|- ^- (list wako)
?~ puy ~
[[p.i.puy q.i.puy] $(puy t.puy)]
:: ::
++ axel :: axel:ze ++ axel :: axel:ze
|= [wen=@da lem=nori] :: edit |= [wen=@da lem=nori] :: edit
^+ +> ^+ +>
=: let +(let) =: let +(let)
hit :_(hit [wen lem]) hit :-([wen lem] hit)
== ==
?- -.lem ?- -.lem
& (avon:(axon q.lem) p.lem) & (avon:(axon q.lem) p.lem)
@ -1130,7 +1205,6 @@
=> ?: =(p.ank p.p.nyp) . => ?: =(p.ank p.p.nyp) .
~& [%durn-in-wrong p.ank p.p.nyp] ~& [%durn-in-wrong p.ank p.p.nyp]
. .
:: ?> =(p.ank p.p.nyp)
=. +> dune(myz q.nyp) =. +> dune(myz q.nyp)
=> ?: =(p.ank q.p.nyp) . => ?: =(p.ank q.p.nyp) .
~& [%durn-out-wrong p.ank q.p.nyp] ~& [%durn-out-wrong p.ank q.p.nyp]
@ -1866,7 +1940,7 @@
++ com |=(a=@ ^?(..nu)) :: from naked pass ++ com |=(a=@ ^?(..nu)) :: from naked pass
-- --
-- --
++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud]) :: mergepts our/their ++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=(list wako)]) :: mergepts
++ ankh :: fs node (new) ++ ankh :: fs node (new)
$: p=cash :: recursive hash $: p=cash :: recursive hash
q=(unit ,[p=cash q=*]) :: file q=(unit ,[p=cash q=*]) :: file
@ -2285,7 +2359,7 @@
++ maki ,[p=@ta q=@ta r=@ta s=path] :: ++ maki ,[p=@ta q=@ta r=@ta s=path] ::
++ mace (list ,[p=life q=ring]) :: private secrets ++ mace (list ,[p=life q=ring]) :: private secrets
++ marv ?(%da %tas %ud) :: release form ++ marv ?(%da %tas %ud) :: release form
++ masu ,[p=ship q=desk r=moar s=moar] :: sync square ++ masu ,[p=ship q=desk r=moar s=moar t=waks] :: sync square
++ math (map ,@t (list ,@t)) :: semiparsed headers ++ math (map ,@t (list ,@t)) :: semiparsed headers
++ meal :: payload ++ meal :: payload
$% [%back p=cape q=flap r=@dr] :: acknowledgment $% [%back p=cape q=flap r=@dr] :: acknowledgment
@ -2561,6 +2635,8 @@
++ vern [_@ud _@ud] :: hoon/vane version ++ vern [_@ud _@ud] :: hoon/vane version
-- :: -- ::
++ wund (list ,[p=life q=ring r=acru]) :: mace in action ++ wund (list ,[p=life q=ring r=acru]) :: mace in action
++ wako ,[p=path q=woof] :: merge file state
++ waks (list wako) :: list file states
++ what :: logical identity ++ what :: logical identity
$% [%anon ~] :: anonymous $% [%anon ~] :: anonymous
[%lady p=whom] :: female person () [%lady p=whom] :: female person ()

View File

@ -3,7 +3,7 @@
:: ::
=> .(-< `who=@p`-<) => .(-< `who=@p`-<)
|= [est=time eny=@uw] |= [est=time eny=@uw]
|= ~ |= gem=$|([germ ~] ~)
^- bowl ^- bowl
=+ wen=(scot %da (need (slaw %da +>-:/===))) :: heinous =+ wen=(scot %da (need (slaw %da +>-:/===))) :: heinous
?: =(~zod who) [~ ~] ?: =(~zod who) [~ ~]
@ -15,14 +15,12 @@
:- [%la %leaf "updating..."] :- [%la %leaf "updating..."]
%+ turn syn %+ turn syn
|= des=@tas |= des=@tas
:: ~& [%reading `path`/(scot %p bos)/[des]/[wen]]
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen])) =+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
:: ~& [%reading `path`/(scot %p who)/[des]/[wen]]
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen])) =+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
=+ sab=`saba`[bos des [0 let.der] (flop (turn hit.der |=(a=frog q.a)))] =+ sab=`saba`[bos des [0 let.der] (flop (turn hit.der |=(a=frog q.a)))]
=+ lum=(~(auld ze est owr) est %fine sab) =+ lum=(~(auld ze est owr) est ?~(gem %fine -.gem) sab)
?~ lum ?~ lum
`gift`[%la %leaf "{(trip des)} failed to merge"] `gift`[%la %leaf "{(trip des)} failed to merge, please rerun with a merge option"]
?~ u.lum ?~ u.lum
`gift`[%la %leaf "{(trip des)} is up to date"] `gift`[%la %leaf "{(trip des)} is up to date"]
`gift`[%ok des u.u.lum] `gift`[%ok des u.u.lum]

20
try/bin/merge.hoon Normal file
View File

@ -0,0 +1,20 @@
!:
:: /=try=/bin/merge/hoon
::
=> .(-< `who=@p`-<)
|= [est=time eny=@uw]
|= [pes=[ses=span des=span cas=span ~] pen=[sen=span den=span can=span ~] gem=$|([germ ~] ~)]
^- bowl
:_ ~
^- (list gift)
:_ ~
=+ vsr=((hard dome) .^(%cv pes))
=+ ves=((hard dome) .^(%cv pen))
=+ sab=`saba`[who den.pen [0 let.vsr] (flop (turn hit.vsr |=(a=frog q.a)))]
=+ lum=(~(auld ze est ves) est ?~(gem %fine -.gem) sab)
?~ lum
`gift`[%la %leaf "{(trip des.pes)} failed to merge, please rerun with a merge option"]
?~ u.lum
`gift`[%la %leaf "{(trip den.pen)} is up to date"]
~& [%ok den.pen u.u.lum]
`gift`[%ok den.pen u.u.lum]