unison/unison-src/transcripts/mergeloop.output.md
2020-05-15 18:30:01 -04:00

2.1 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

  ☝️  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

.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.

  ☝️  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

.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.

  ☝️  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.
  
  ⊙ #0ucrusr0bl
  ⑃
  #0lf1cvdccp
  #ofcsecdak0