unison/unison-src/transcripts/copy-patch.output.md
2021-05-28 13:47:31 -06:00

1.0 KiB

Test that copying a patch works as expected

x = 1
.> add

  ⍟ I've added these definitions:
  
    x : ##Nat

Change the definition of x so something goes in our patch:

x = 2
.> update foo.patch

  ⍟ I've updated these names to your new definition:
  
    x : ##Nat

Copy the patch and make sure it's still there.

.> copy.patch foo.patch bar.patch

  Done.

.> ls foo

  1. patch (patch)

.> view.patch foo.patch

  Edited Terms: #jk19sm5bf8 -> x
  
  Tip: To remove entries from a patch, use
       delete.term-replacement or delete.type-replacement, as
       appropriate.

.> ls bar

  1. patch (patch)

.> view.patch bar.patch

  Edited Terms: #jk19sm5bf8 -> x
  
  Tip: To remove entries from a patch, use
       delete.term-replacement or delete.type-replacement, as
       appropriate.

Now move the patch.

.> move.patch foo.patch qux.patch

  Done.

The moved patch should be gone.

.> view.patch foo.patch

  This patch is empty.

.> ls foo

  nothing to show