clay: connect |commit to %park

Can remove the old commit flow once existing usage of %info is ported to
%park.
This commit is contained in:
Philip Monk 2020-03-24 16:48:18 -07:00
parent 531630e93a
commit 51ff5b8d67
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
2 changed files with 85 additions and 5 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:36d204827bdd31705146bd95b1323b86eb037413b6990c10ace14c133d31f010 oid sha256:4af34fec9a0a4a99b9c6294f8f1898dcfbdbb6b74a83ab77e2d49032532e53b2
size 13099016 size 13112651

View File

@ -498,6 +498,9 @@
== :: == ::
task:able:ford :: task:able:ford ::
== :: == ::
$: %g :: to %gall
$>(%deal task:able:gall) ::
== ::
$: %j :: by %jael $: %j :: by %jael
$>(%public-keys task:able:jael) :: $>(%public-keys task:able:jael) ::
== == :: == == ::
@ -528,6 +531,9 @@
$: %f :: by %ford $: %f :: by %ford
$>(%made gift:able:ford) :: $>(%made gift:able:ford) ::
== :: == ::
$: %g :: by %gall
$>(%unto gift:able:gall) ::
== ::
$: %j :: by %jael $: %j :: by %jael
$>(%public-keys gift:able:jael) :: $>(%public-keys gift:able:jael) ::
== :: == ::
@ -2920,7 +2926,7 @@
hut.ran (~(uni by hut.rang) hut.ran) hut.ran (~(uni by hut.rang) hut.ran)
lat.ran (~(uni by lat.rang) lat.ran) lat.ran (~(uni by lat.rang) lat.ran)
== ==
ergo wake:ergo
:: ::
++ ergo ++ ergo
^+ ..park ^+ ..park
@ -4279,8 +4285,12 @@
[hen %pass /two %c %info q.bem %& two] [hen %pass /two %c %info q.bem %& two]
== ==
=+ yak=(~(got by hut.ran.ruf) (~(got by hit.dom.u.dos) let.dom.u.dos)) =+ yak=(~(got by hut.ran.ruf) (~(got by hit.dom.u.dos) let.dom.u.dos))
=+ cos=(mode-to-soba q.yak (flop s.bem) all.req fis.req) =+ cos=(mode-to-commit q.yak (flop s.bem) all.req fis.req)
[hen %pass /both %c %info q.bem %& cos]~ =+ tid=:((cury cat 3) 'clay--' des.req '--' (scot %uv eny))
=+ arg=[~ `tid %commit !>([q.bem [- + ~]:cos])]
:~ [hen %pass /both %g %deal [our our] %spider %watch /thread-result/[tid]]
[hen %pass /both %g %deal [our our] %spider %poke %spider-start !>(arg)]
==
:: ::
%merg :: direct state up %merg :: direct state up
?: =(%$ des.req) ?: =(%$ des.req)
@ -4614,6 +4624,29 @@
[~ ..^$] [~ ..^$]
:: ::
%note [[hen %give +.q.hin]~ ..^$] %note [[hen %give +.q.hin]~ ..^$]
%unto
?- -.p.q.hin
%kick [~ ..^$]
%poke-ack
?~ p.p.q.hin
[~ ..^$]
[[hen %slip %d %flog %crud %into u.p.p.q.hin]~ ..^$]
::
%watch-ack
?~ p.p.q.hin
[~ ..^$]
[[hen %slip %d %flog %crud %into u.p.p.q.hin]~ ..^$]
::
%fact
:_ ..^$
?+ p.cage.p.q.hin [hen %slip %d %flog %crud %into >%strange-into< ~]~
%thread-done ~
%thread-fail
=+ !<([=term =tang] q.cage.p.q.hin)
[hen %slip %d %flog %crud %into >term< tang]~
==
==
::
%wake %wake
:: TODO: handle behn errors :: TODO: handle behn errors
:: ::
@ -4661,6 +4694,53 @@
^- rand ^- rand
[p q [p q.q]:r] [p q [p q.q]:r]
:: ::
:: By convention: paf == (weld pax pat)
::
++ mode-to-commit
|= [hat=(map path lobe) pax=path all=? mod=mode]
^- [deletes=(set path) changes=(map path cage)]
=/ deletes
%- silt
%+ turn
^- (list path)
%+ weld
^- (list path)
%+ murn mod
|= [pat=path mim=(unit mime)]
^- (unit path)
?^ mim
~
`pat
^- (list path)
?. all
~
=+ mad=(malt mod)
=+ len=(lent pax)
=/ descendants=(list path)
%+ turn
%+ skim ~(tap by hat)
|= [paf=path lob=lobe]
=(pax (scag len paf))
|= [paf=path lob=lobe]
(slag len paf)
%+ skim
descendants
|= pat=path
(~(has by mad) pat)
|= pat=path
(weld pax pat)
::
=/ changes
%- malt
%+ murn mod
|= [pat=path mim=(unit mime)]
^- (unit [path cage])
?~ mim
~
`[(weld pax pat) %mime !>(u.mim)]
::
[deletes changes]
::
++ mode-to-soba ++ mode-to-soba
|= {hat/(map path lobe) pax/path all/? mod/mode} |= {hat/(map path lobe) pax/path all/? mod/mode}
^- soba ^- soba