unison/unison-src/transcripts/mergeloop.output.md
Rúnar b5cae909fc
Fix #1276 hang on push (#1279)
* 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.
2020-03-02 17:32:07 -05:00

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