mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-15 04:11:34 +03:00
b5cae909fc
* Fix a bug that causes loops in Causal. * Ignore loops in Causal when calling sync. * Fix warnings in Causal test. * Added a regression test transcript.
2.5 KiB
2.5 KiB
Merge loop test
This tests for regressions of https://github.com/unisonweb/unison/issues/1276 where trivial merges cause loops in the history.
Let's make three identical namespaces with different histories:
a = 1
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
a : ##Nat
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
☝️ The namespace .x is empty.
.x> add
⍟ I've added these definitions:
a : ##Nat
b = 2
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
b : ##Nat
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
.x> add
⍟ I've added these definitions:
b : ##Nat
b = 2
I found and typechecked the definitions in scratch.u. This
file has been previously added to the codebase.
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
☝️ The namespace .y is empty.
.y> add
⍟ I've added these definitions:
b : ##Nat
a = 1
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
a : ##Nat
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
.y> add
⍟ I've added these definitions:
a : ##Nat
a = 1
b = 2
I found and typechecked the definitions in scratch.u. This
file has been previously added to the codebase.
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
☝️ The namespace .z is empty.
.z> add
⍟ I've added these definitions:
a : ##Nat
b : ##Nat
.> merge x y
Nothing changed as a result of the merge.
.> merge y z
Nothing changed as a result of the merge.
.> history z
Note: The most recent namespace hash is immediately below this
message.
This segment of history starts with a merge. Use
`history #som3n4m3space` to view history starting from a given
namespace hash.
#0lf1cvdccp
#2quan5n72t
#gjfovomom2
⑂
⊙ #bpfcuip0ru