port empty namespace merge test to new merge

This commit is contained in:
Mitchell Rosen 2024-06-26 12:13:18 -04:00
parent 93fc35e2c7
commit 596cb39b2e
5 changed files with 30 additions and 28 deletions

View File

@ -12,9 +12,11 @@ x = 23
.> fork b1 b2
.b2> alias.term x abc
```
```unison:hide
fslkdjflskdjflksjdf = 663
```
```ucm
.b0> add
.> merge.old b0 b1

View File

@ -28,14 +28,6 @@ The history of the namespace should be empty.
.> history mynamespace
```
Merging an empty namespace should be a no-op
```ucm:error
.empty> history
.empty> merge.old .mynamespace
.empty> history
```
Add and then delete a term to add some history to a deleted namespace.
```unison:hide

View File

@ -54,26 +54,6 @@ The history of the namespace should be empty.
☝️ The namespace .mynamespace is empty.
```
Merging an empty namespace should be a no-op
```ucm
☝️ The namespace .empty is empty.
.empty> history
☝️ The namespace .empty is empty.
.empty> merge.old .mynamespace
⚠️
The namespace .mynamespace doesn't exist.
.empty> history
☝️ The namespace .empty is empty.
```
Add and then delete a term to add some history to a deleted namespace.

View File

@ -456,6 +456,17 @@ project/alice> merge /bob
.> project.delete project
```
## No-op merge: merge empty namespace into empty namespace
```ucm
project/main> branch topic
project/main> merge /topic
```
```ucm:hide
.> project.delete project
```
## Merge failure: someone deleted something
If either Alice or Bob delete something, so long as the other person didn't update it (in which case we ignore the delete, as explained above), then the delete goes through.

View File

@ -469,6 +469,23 @@ project/alice> merge /bob
I fast-forward merged project/bob into project/alice.
```
## No-op merge: merge empty namespace into empty namespace
```ucm
project/main> branch topic
Done. I've created the topic branch based off of main.
Tip: To merge your work back into the main branch, first
`switch /main` then `merge /topic`.
project/main> merge /topic
😶
project/main was already up-to-date with project/topic.
```
## Merge failure: someone deleted something