mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
clay: fix %init for -merge
This commit is contained in:
parent
d70431a6b0
commit
17fa15336f
@ -388,7 +388,7 @@
|
|||||||
++ thread-fail
|
++ thread-fail
|
||||||
|= [=yarn =term =tang]
|
|= [=yarn =term =tang]
|
||||||
^- (quip card ^state)
|
^- (quip card ^state)
|
||||||
%- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
|
:: %- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
|
||||||
=/ =tid (yarn-to-tid yarn)
|
=/ =tid (yarn-to-tid yarn)
|
||||||
=/ fail-cards (thread-say-fail tid term tang)
|
=/ fail-cards (thread-say-fail tid term tang)
|
||||||
=^ cards state (thread-clean yarn)
|
=^ cards state (thread-clean yarn)
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
:: Produce a mime cache
|
:: Produce a mime cache
|
||||||
::
|
::
|
||||||
++ checkout-cache
|
++ checkout-cache
|
||||||
|= [=desk deletes=(set path) changes=(map path cage)]
|
|= [=ship =desk deletes=(set path) changes=(map path cage)]
|
||||||
=/ m (strand ,(map path (unit mime)))
|
=/ m (strand ,(map path (unit mime)))
|
||||||
^- form:m
|
^- form:m
|
||||||
;< our=@p bind:m get-our:strandio
|
;< our=@p bind:m get-our:strandio
|
||||||
|
@ -1122,7 +1122,6 @@
|
|||||||
::
|
::
|
||||||
=/ ford-disc=disc:ford
|
=/ ford-disc=disc:ford
|
||||||
?: =(p.ali-disc p.bob-disc)
|
?: =(p.ali-disc p.bob-disc)
|
||||||
|
|
||||||
ali-disc
|
ali-disc
|
||||||
bob-disc
|
bob-disc
|
||||||
|^
|
|^
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
::
|
::
|
||||||
=/ =ankh (checkout:clay-commit ank.dome deletes cast-results)
|
=/ =ankh (checkout:clay-commit ank.dome deletes cast-results)
|
||||||
;< mim=(map path (unit mime)) bind:m
|
;< mim=(map path (unit mime)) bind:m
|
||||||
(checkout-cache:clay-commit desk deletes cast-results)
|
(checkout-cache:clay-commit our desk deletes cast-results)
|
||||||
:: Send to clay
|
:: Send to clay
|
||||||
::
|
::
|
||||||
=/ args [desk r.new-yaki rang ankh mim]
|
=/ args [desk r.new-yaki rang ankh mim]
|
||||||
|
@ -23,8 +23,11 @@
|
|||||||
=/ ali-tako=tako (~(got by hit.ali-dome) let.ali-dome)
|
=/ ali-tako=tako (~(got by hit.ali-dome) let.ali-dome)
|
||||||
=+ .^(=ali=yaki %cs (weld start-path /yaki/(scot %uv ali-tako)))
|
=+ .^(=ali=yaki %cs (weld start-path /yaki/(scot %uv ali-tako)))
|
||||||
=+ .^(=bob=dome %cv start-path)
|
=+ .^(=bob=dome %cv start-path)
|
||||||
=/ bob-tako=tako (~(got by hit.bob-dome) let.bob-dome)
|
=/ bob-yaki=(unit yaki)
|
||||||
=+ .^(=bob=yaki %cs (weld start-path /yaki/(scot %uv bob-tako)))
|
?~ let.bob-dome
|
||||||
|
~
|
||||||
|
=/ bob-tako=tako (~(got by hit.bob-dome) let.bob-dome)
|
||||||
|
`.^(=bob=yaki %cs (weld start-path /yaki/(scot %uv bob-tako)))
|
||||||
::
|
::
|
||||||
;< =merge-result bind:m (merge ali-yaki bob-yaki)
|
;< =merge-result bind:m (merge ali-yaki bob-yaki)
|
||||||
?~ merge-result
|
?~ merge-result
|
||||||
@ -34,7 +37,7 @@
|
|||||||
;< [=ankh changes=(map path cage)] bind:m
|
;< [=ankh changes=(map path cage)] bind:m
|
||||||
(checkout bob-dome new.u.merge-result [deletes changes]:u.merge-result)
|
(checkout bob-dome new.u.merge-result [deletes changes]:u.merge-result)
|
||||||
;< mim=(map path (unit mime)) bind:m
|
;< mim=(map path (unit mime)) bind:m
|
||||||
(checkout-cache:clay-commit bob-desk deletes.u.merge-result changes)
|
(checkout-cache:clay-commit ali-ship ali-desk deletes.u.merge-result changes)
|
||||||
=/ args [bob-desk r.new.u.merge-result rang ankh mim]
|
=/ args [bob-desk r.new.u.merge-result rang ankh mim]
|
||||||
;< ~ bind:m
|
;< ~ bind:m
|
||||||
(send-raw-card:strandio %pass /merg/[bob-desk]/[ali-desk] %arvo %c %park args)
|
(send-raw-card:strandio %pass /merg/[bob-desk]/[ali-desk] %arvo %c %park args)
|
||||||
@ -50,15 +53,13 @@
|
|||||||
lat=(map lobe blob)
|
lat=(map lobe blob)
|
||||||
==
|
==
|
||||||
++ merge
|
++ merge
|
||||||
|= [=ali=yaki =bob=yaki]
|
|= [=ali=yaki bob-yaki=(unit yaki)]
|
||||||
|^
|
|
||||||
=/ m (strand ,merge-result)
|
=/ m (strand ,merge-result)
|
||||||
^- form:m
|
^- form:m
|
||||||
?- germ
|
?: ?=(%init germ)
|
||||||
::
|
::
|
||||||
:: If this is an %init merge, we set the ali's commit to be bob's.
|
:: If this is an %init merge, we set the ali's commit to be bob's.
|
||||||
::
|
::
|
||||||
%init
|
|
||||||
%: pure:m
|
%: pure:m
|
||||||
~
|
~
|
||||||
conflicts=~
|
conflicts=~
|
||||||
@ -68,6 +69,9 @@
|
|||||||
changes=~(key by q.ali-yaki)
|
changes=~(key by q.ali-yaki)
|
||||||
lat=~
|
lat=~
|
||||||
==
|
==
|
||||||
|
=/ bob-yaki (need bob-yaki)
|
||||||
|
|^
|
||||||
|
?- germ
|
||||||
::
|
::
|
||||||
:: If this is a %this merge, we check to see if ali's and bob's commits
|
:: If this is a %this merge, we check to see if ali's and bob's commits
|
||||||
:: are the same, in which case we're done. Otherwise, we check to see
|
:: are the same, in which case we're done. Otherwise, we check to see
|
||||||
@ -123,7 +127,9 @@
|
|||||||
?: (~(has in (reachable-takos r.bob-yaki)) r.ali-yaki)
|
?: (~(has in (reachable-takos r.bob-yaki)) r.ali-yaki)
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
?. (~(has in (reachable-takos r.ali-yaki)) r.bob-yaki)
|
?. (~(has in (reachable-takos r.ali-yaki)) r.bob-yaki)
|
||||||
(strand-fail:strandio %bad-fine-merge ~)
|
%^ error %bad-fine-merge
|
||||||
|
leaf+"tried fast-forward but is not ancestor or descendant"
|
||||||
|
~
|
||||||
%: pure:m
|
%: pure:m
|
||||||
~
|
~
|
||||||
conflicts=~
|
conflicts=~
|
||||||
@ -193,7 +199,7 @@
|
|||||||
|= [=start=path =lobe]
|
|= [=start=path =lobe]
|
||||||
^- schematic:ford
|
^- schematic:ford
|
||||||
=+ .^(=blob %cs (weld start-path /blob/(scot %uv lobe)))
|
=+ .^(=blob %cs (weld start-path /blob/(scot %uv lobe)))
|
||||||
=/ =disc:ford [our bob-desk]
|
=/ =disc:ford [ali-ship ali-desk]
|
||||||
?- -.blob
|
?- -.blob
|
||||||
%direct (page-to-schematic disc q.blob)
|
%direct (page-to-schematic disc q.blob)
|
||||||
%delta [%pact disc $(lobe q.q.blob) (page-to-schematic disc r.blob)]
|
%delta [%pact disc $(lobe q.q.blob) (page-to-schematic disc r.blob)]
|
||||||
@ -205,4 +211,12 @@
|
|||||||
[%volt disc page]
|
[%volt disc page]
|
||||||
[%$ p.page [%atom %t ~] q.page]
|
[%$ p.page [%atom %t ~] q.page]
|
||||||
--
|
--
|
||||||
|
::
|
||||||
|
++ error
|
||||||
|
|= [=term =tang]
|
||||||
|
%: strand-fail:strandio term
|
||||||
|
leaf+"failed merge from {<ali-ship>}/{<ali-desk>} to {<our>}/{<bob-desk>}"
|
||||||
|
leaf+"with strategy germ"
|
||||||
|
tang
|
||||||
|
==
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user