Skip to content

Commit 4c0b80e

Browse files
committed
Set up history-comments transcripts
1 parent 499c2dc commit 4c0b80e

4 files changed

Lines changed: 34 additions & 1 deletion

File tree

transcripts/run-transcripts.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ transcripts_location="transcripts/share-apis"
2121
for dir in "$transcripts_location"/*(/); do
2222
# Extract the directory name (transcript name)
2323
transcript="${dir:t}"
24-
24+
2525
# If the first argument is missing, run all transcripts, otherwise run only transcripts which match a prefix of the argument
2626
if [ -z "${1:-}" ] || [[ "$transcript" == "$1"* ]]; then
2727
pg_reset_fixtures
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
```ucm:hide
2+
scratch/main> pull @test/history-comments/main
3+
scratch/main> history
4+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
```ucm:hide
2+
history-comments/main> builtins.mergeio lib.builtins
3+
```
4+
5+
Add some history, then set comments on it.
6+
7+
```unison:hide
8+
x = 1
9+
```
10+
11+
```ucm
12+
scratch/main> config.set author.name Unison
13+
scratch/main> history.comment /main: "Initial commit with variable x set to 1"
14+
scratch/main> alias.term x y
15+
scratch/main> history.comment /main: "Renamed x to y"
16+
scratch/main> history
17+
scratch/main> push @test/history-comments/main
18+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env zsh
2+
3+
set -e
4+
5+
source "../../transcript_helpers.sh"
6+
7+
# Create some history
8+
transcript_ucm transcript prelude.md
9+
10+
# Pull the history
11+
transcript_ucm transcript comment-pull.md

0 commit comments

Comments
 (0)