unison/unison-src/transcripts/empty-namespaces.output.md

159 lines
2.4 KiB
Markdown
Raw Normal View History

2021-12-06 23:44:40 +03:00
# Empty namespace behaviours
```unison
mynamespace.x = 1
```
2021-12-07 00:06:11 +03:00
The deleted namespace shouldn't appear in `ls` output.
2021-12-06 23:44:40 +03:00
```ucm
2021-12-07 00:06:11 +03:00
.> ls
nothing to show
2021-12-06 23:44:40 +03:00
2021-12-07 00:06:11 +03:00
```
```ucm
.> ls.verbose
😶
2021-12-06 23:44:40 +03:00
2021-12-07 00:06:11 +03:00
No results. Check your spelling, or try using tab completion
to supply command arguments.
2021-12-06 23:44:40 +03:00
```
```ucm
2021-12-07 00:06:11 +03:00
.> find mynamespace
2021-12-06 23:44:40 +03:00
2021-12-07 00:06:11 +03:00
😶
No results. Check your spelling, or try using tab completion
to supply command arguments.
2021-12-06 23:44:40 +03:00
```
2021-12-09 01:39:48 +03:00
## history
The history of the namespace should still exist if requested explicitly.
```ucm
.> history mynamespace
Note: The most recent namespace hash is immediately below this
message.
⊙ 1. #nvh8d4j0fm
- Deletes:
x
□ 2. #i52j9fd57b (start of history)
```
Merging an empty namespace should still copy its history if it has some.
```ucm
☝️ The namespace .empty is empty.
.empty> history
☝️ The namespace .empty is empty.
.empty> merge .mynamespace
Nothing changed as a result of the merge.
.empty> history
Note: The most recent namespace hash is immediately below this
message.
⊙ 1. #nvh8d4j0fm
- Deletes:
x
□ 2. #i52j9fd57b (start of history)
```
2021-12-09 01:39:48 +03:00
Add and then delete a term to add some history to a deleted namespace.
```unison
deleted.x = 1
stuff.thing = 2
```
## fork
2021-12-09 01:39:48 +03:00
I should be allowed to fork over a deleted namespace
```ucm
.> fork stuff deleted
Done.
```
The history from the `deleted` namespace should have been overwritten by the history from `stuff`.
```ucm
.> history stuff
Note: The most recent namespace hash is immediately below this
message.
□ 1. #q2dq4tsno1 (start of history)
2021-12-09 01:39:48 +03:00
.> history deleted
Note: The most recent namespace hash is immediately below this
message.
□ 1. #q2dq4tsno1 (start of history)
2021-12-09 01:39:48 +03:00
```
## move.namespace
```unison
moveoverme.x = 1
moveme.y = 2
```
I should be able to move a namespace over-top of a deleted namespace.
The history should be that of the moved namespace.
```ucm
.> delete.namespace moveoverme
Removed definitions:
1. x : ##Nat
Tip: You can use `undo` or `reflog` to undo this change.
.> history moveme
Note: The most recent namespace hash is immediately below this
message.
□ 1. #c5uisu4kll (start of history)
.> move.namespace moveme moveoverme
Done.
.> history moveoverme
Note: The most recent namespace hash is immediately below this
message.
□ 1. #c5uisu4kll (start of history)
```