unison/unison-src/transcripts/empty-namespaces.output.md
Greg Pfeil 1dc181b99a
Update the transcripts with cmark
`cmark`’s pretty-printer matches our output pretty well, with a few differences:
- it puts a space between the fence and the info string for in code blocks;
- it prefers `-` over `*` for bulleted lists (as do I) and it indents them;
- it `\`-escapes certain chars very conservatively;
- it prefers indented/unfenced code blocks if there is no info string; and
- it prefers `*` over `_` (unlike any sane person).

This also shows how the change fixes a number of issues:
- fix2158-1.output.md also illustrates how this change fixes #1809;
- alias-many.output.md and input-parse-errors.output.md show how fenced
  code blocks without an info string would use the beginning of the
  content as the info string;
- transcripts-round-trip/main.output.md shows how output blocks for
  generated `unison` stanzas (which could contain nested fenced blocks)
  might not have long-enough fences; and
- error-messages.output.md and generic-parse-errors.output.md show how
  Unison errors were reported on the wrong line number (and thus the
  printed error lines were also incorrect).
2024-07-10 13:37:51 -06:00

2.2 KiB

Empty namespace behaviours

mynamespace.x = 1

The deleted namespace shouldn't appear in ls output.

scratch/main> ls

  nothing to show

scratch/main> find.verbose

  ☝️
  
  I couldn't find matches in this namespace, searching in
  'lib'...

  😶
  
  No results. Check your spelling, or try using tab completion
  to supply command arguments.
  
  `find.global` can be used to search outside the current
  namespace.

scratch/main> find mynamespace

  ☝️
  
  I couldn't find matches in this namespace, searching in
  'lib'...

  😶
  
  No results. Check your spelling, or try using tab completion
  to supply command arguments.
  
  `find.global` can be used to search outside the current
  namespace.

history

The history of the namespace should be empty.

scratch/main> history mynamespace

  ☝️  The namespace mynamespace is empty.

Add and then delete a term to add some history to a deleted namespace.

deleted.x = 1
stuff.thing = 2

fork

I should be allowed to fork over a deleted namespace

scratch/main> fork stuff deleted

  Done.

The history from the deleted namespace should have been overwritten by the history from stuff.

scratch/main> history stuff

  Note: The most recent namespace hash is immediately below this
        message.
  
  
  
  □ 1. #q2dq4tsno1 (start of history)

scratch/main> history deleted

  Note: The most recent namespace hash is immediately below this
        message.
  
  
  
  □ 1. #q2dq4tsno1 (start of history)

move.namespace

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.

scratch/main> delete.namespace moveoverme

  Done.

scratch/main> history moveme

  Note: The most recent namespace hash is immediately below this
        message.
  
  
  
  □ 1. #c5uisu4kll (start of history)

scratch/main> move.namespace moveme moveoverme

  Done.

scratch/main> history moveoverme

  Note: The most recent namespace hash is immediately below this
        message.
  
  
  
  □ 1. #c5uisu4kll (start of history)