clay: add support for labeling commits

- add helper arm `label:de`
- update relevant code to take in arbitrary aeons
This commit is contained in:
Yaseen 2021-11-12 15:35:06 -05:00
parent 0a2bd43d1d
commit 25ce97cade
4 changed files with 28 additions and 7 deletions

View File

@ -8,7 +8,13 @@
::
:- %say
|= $: [now=@da eny=@uvJ bec=beak]
[arg=[syd=desk lab=@tas ~] ~]
[arg=[syd=desk lab=@tas ~] aeon=aeon:clay ~]
==
:: handle optional aeon
::
=/ aey=(unit aeon:clay)
?: =(0 aeon)
~
`aeon
:- %kiln-label
[syd lab]:arg
[syd.arg lab.arg aey]

View File

@ -1211,9 +1211,9 @@
abet:abet:(install:vats +<)
::
++ poke-label
|= [syd=desk lab=@tas]
|= [syd=desk lab=@tas aey=(unit aeon)]
=+ pax=/(scot %p our)/[syd]/[lab]
(poke-info "labeled {(spud pax)}" `[syd %| lab])
(poke-info "labeled {(spud pax)}" `[syd %| lab aey])
::
++ poke-merge
|= kiln-merge

View File

@ -850,7 +850,7 @@
+$ mool [=case paths=(set (pair care path))] :: requests in desk
+$ nori :: repository action
$% [%& p=soba] :: delta
[%| p=@tas] :: label
[%| p=@tas q=(unit aeon)] :: label
== ::
+$ nuri :: repository action
$% [%& p=suba] :: delta

View File

@ -1445,6 +1445,15 @@
==
==
::
:: Attach label to aeon
::
++ label
|= [bel=@tas aey=(unit aeon)]
^+ ..park
=/ yon ?~(aey let.dom u.aey)
=. lab.dom (~(put by lab.dom) bel yon)
..park
::
:: Porcelain commit
::
++ info
@ -4374,8 +4383,14 @@
::
%info
?: ?=(%| -.dit.req)
~| %labelling-not-implemented
!!
:: initial pass. doing it directly inline rather than putting any logic into ++de
=/ bel=@tas p.dit.req
=/ aey=(unit aeon) q.dit.req
=^ mos ruf
=/ den ((de now rof hen ruf) our des.req)
abet:(label:den bel aey)
:: ~& "labeling current aeon {<let.dom>} on {<des.req>}"
[mos ..^$]
=/ [deletes=(set path) changes=(map path cage)]
=/ =soba p.dit.req
=| deletes=(set path)