mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
three delete examples
This commit is contained in:
parent
2e2fc04bdd
commit
bbbac576f8
@ -151,6 +151,108 @@ proj/main> view foo
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
## Alice deletes x bob adds y
|
||||
|
||||
```ucm:hide
|
||||
.> project.create-empty proj
|
||||
proj/main> builtins.mergeio
|
||||
```
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
proj/main> branch topic
|
||||
proj/main> delete.term foo
|
||||
proj/topic>
|
||||
```
|
||||
|
||||
```unison
|
||||
bar : ()
|
||||
bar = ()
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/topic> add
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
proj/main> ls
|
||||
```
|
||||
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
## Alice adds x bob deletes y
|
||||
|
||||
```ucm:hide
|
||||
.> project.create-empty proj
|
||||
proj/main> builtins.mergeio
|
||||
```
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
proj/main> branch topic
|
||||
proj/topic> delete.term foo
|
||||
proj/main>
|
||||
```
|
||||
|
||||
```unison
|
||||
bar : ()
|
||||
bar = ()
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
proj/main> ls
|
||||
```
|
||||
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
## Alice deletes x bob deletes x
|
||||
|
||||
```ucm:hide
|
||||
.> project.create-empty proj
|
||||
proj/main> builtins.mergeio
|
||||
```
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> add
|
||||
proj/main> branch topic
|
||||
proj/topic> delete.term foo
|
||||
proj/main> delete.term foo
|
||||
```
|
||||
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
proj/main> ls
|
||||
```
|
||||
|
||||
```ucm:hide
|
||||
.> project.delete proj
|
||||
```
|
||||
|
||||
## Altered dependent
|
||||
|
||||
```ucm:hide
|
||||
|
@ -328,6 +328,213 @@ proj/main> view foo
|
||||
foo : Nat
|
||||
foo = 2
|
||||
|
||||
```
|
||||
## Alice deletes x bob adds y
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
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`:
|
||||
|
||||
foo : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
foo : Nat
|
||||
|
||||
proj/main> branch topic
|
||||
|
||||
Done. I've created the topic branch based off of main.
|
||||
|
||||
Tip: Use `merge /topic /main` to merge your work back into the
|
||||
main branch.
|
||||
|
||||
proj/main> delete.term foo
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
```unison
|
||||
bar : ()
|
||||
bar = ()
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
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`:
|
||||
|
||||
bar : ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/topic> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
bar : ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
|
||||
I merged topic into main.
|
||||
|
||||
proj/main> ls
|
||||
|
||||
1. bar (())
|
||||
2. builtin/ (627 terms, 89 types)
|
||||
|
||||
```
|
||||
## Alice adds x bob deletes y
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
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`:
|
||||
|
||||
foo : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
foo : Nat
|
||||
|
||||
proj/main> branch topic
|
||||
|
||||
Done. I've created the topic branch based off of main.
|
||||
|
||||
Tip: Use `merge /topic /main` to merge your work back into the
|
||||
main branch.
|
||||
|
||||
proj/topic> delete.term foo
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
```unison
|
||||
bar : ()
|
||||
bar = ()
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
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`:
|
||||
|
||||
bar : ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
bar : ()
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
|
||||
I merged topic into main.
|
||||
|
||||
proj/main> ls
|
||||
|
||||
1. bar (())
|
||||
2. builtin/ (627 terms, 89 types)
|
||||
|
||||
```
|
||||
## Alice deletes x bob deletes x
|
||||
|
||||
```unison
|
||||
foo : Nat
|
||||
foo = 1
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
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`:
|
||||
|
||||
foo : Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> add
|
||||
|
||||
⍟ I've added these definitions:
|
||||
|
||||
foo : Nat
|
||||
|
||||
proj/main> branch topic
|
||||
|
||||
Done. I've created the topic branch based off of main.
|
||||
|
||||
Tip: Use `merge /topic /main` to merge your work back into the
|
||||
main branch.
|
||||
|
||||
proj/topic> delete.term foo
|
||||
|
||||
Done.
|
||||
|
||||
proj/main> delete.term foo
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
```ucm
|
||||
proj/main> merge2 /topic
|
||||
|
||||
😶
|
||||
|
||||
proj/main was already up-to-date with proj/topic.
|
||||
|
||||
proj/main> ls
|
||||
|
||||
1. builtin/ (627 terms, 89 types)
|
||||
|
||||
```
|
||||
## Altered dependent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user