unison/unison-src/transcripts/mergeloop.output.md
2023-05-17 11:36:58 -06:00

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

  Applying changes from patch...

.> merge y z

  Nothing changed as a result of the merge.

  Applying changes from patch...

.> 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.
  
  ⊙ 1. #b7fr6ifj87
  ⑃
  2. #9npggauqo9
  3. #dm4u1eokg1