Skip to content

Commit

Permalink
Fix up transcript outpu
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Aug 29, 2024
1 parent f716f12 commit 2ea35dd
Show file tree
Hide file tree
Showing 17 changed files with 220 additions and 45 deletions.
2 changes: 1 addition & 1 deletion transcripts/share-apis/code-browse/prelude.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```ucm:hide
.> project.create-empty code-browse
scratch/main> project.create-empty code-browse
code-browse/main> builtins.mergeio
```

Expand Down
2 changes: 1 addition & 1 deletion transcripts/share-apis/contribution-diffs/prelude.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```ucm:hide
.> project.create-empty contribution-diff
scratch/main> project.create-empty contribution-diff
contribution-diff/main> branch /diff-start
contribution-diff/diff-start> builtins.mergeio
```
Expand Down
2 changes: 1 addition & 1 deletion transcripts/share-apis/contributions/contribution-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Let's set up a main branch with two feature branches:
`main <- feature-one <- feature-two`

```ucm:hide
.> project.create-empty bca-updates
scratch/main> project.create-empty bca-updates
bca-updates/main>
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
## Best Common Ancestor updates

In order to provide relevant diffs, Share finds the best common ancestor of the two branches being compared.
In order to provide relevant diffs, Share finds the best common ancestor of the two branches being compared.
I.e. The most recent commit that is an ancestor of both branches.

Let's set up a main branch with two feature branches:
Let's set up a main branch with two feature branches:

`main <- feature-one <- feature-two`

```unison
``` unison
term = "start"
```

```ucm
``` ucm
bca-updates/main> add
⍟ I've added these definitions:
Expand All @@ -35,11 +35,11 @@ bca-updates/main> branch /feature-one
`switch /main` then `merge /feature-one`.
```
```unison
``` unison
term = "feature-one"
```

```ucm
``` ucm
bca-updates/feature-one> update
Okay, I'm searching the branch for code that needs to be
Expand All @@ -65,11 +65,11 @@ bca-updates/feature-one> branch /feature-two
first `switch /feature-one` then `merge /feature-two`.
```
```unison
``` unison
term = "feature-two"
```

```ucm
``` ucm
bca-updates/feature-two> update
Okay, I'm searching the branch for code that needs to be
Expand All @@ -88,3 +88,4 @@ bca-updates/feature-two> push @transcripts/bca-updates/feature-two
```
See the script, we will create a contribution, then will merge and push branches to see how things change.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ucm
.> clone @transcripts/bca-updates/main
.> clone @transcripts/bca-updates/feature-one
scratch/main> clone @transcripts/bca-updates/main
scratch/main> clone @transcripts/bca-updates/feature-one
-- Merge the feature branch, then push the merged branch to main
@transcripts/bca-updates/main> merge /feature-one
@transcripts/bca-updates/main> push @transcripts/bca-updates/main
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
```ucm
.> clone @transcripts/bca-updates/main
``` ucm
scratch/main> clone @transcripts/bca-updates/main
Downloaded 3 entities.
Cloned @transcripts/bca-updates/main.
.> clone @transcripts/bca-updates/feature-one
scratch/main> clone @transcripts/bca-updates/feature-one
Downloaded 3 entities.
Expand Down
2 changes: 1 addition & 1 deletion transcripts/share-apis/definition-diffs/prelude.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Uses state from above as well 👆

```ucm:hide
.> project.create-empty definition-diff
scratch/main> project.create-empty definition-diff
definition-diff/main> branch /before
definition-diff/before> builtins.mergeio
```
Expand Down
2 changes: 1 addition & 1 deletion transcripts/share-apis/projects-flow/prelude.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ someTerm = lib.someLib.depNum
```

```ucm
.> project.create-empty transcriptproject
scratch/main> project.create-empty transcriptproject
transcriptproject/main> add
transcriptproject/main> push
```
Original file line number Diff line number Diff line change
@@ -1,8 +1,87 @@
{
"body": "Not Found",
"body": {
"missingDefinitions": [],
"termDefinitions": {
"#1apeg4vfn6t5jm65ldj9h8j4340u2uvqq62ih99fi80nqrrqj76vgb694fpcaci2c2t95bcupljq8b04m4vu70qq85mhr777i39i3jg": {
"bestTermName": "depNum",
"defnTermTag": "Plain",
"signature": [
{
"annotation": {
"contents": "##Nat",
"tag": "HashQualifier"
},
"segment": "##Nat"
}
],
"termDefinition": {
"contents": [
{
"annotation": {
"contents": "lib.someLib.depNum",
"tag": "HashQualifier"
},
"segment": "lib.someLib.depNum"
},
{
"annotation": {
"tag": "TypeAscriptionColon"
},
"segment": " :"
},
{
"annotation": null,
"segment": " "
},
{
"annotation": {
"contents": "##Nat",
"tag": "HashQualifier"
},
"segment": "##Nat"
},
{
"annotation": null,
"segment": "\n"
},
{
"annotation": {
"contents": "lib.someLib.depNum",
"tag": "HashQualifier"
},
"segment": "lib.someLib.depNum"
},
{
"annotation": {
"tag": "BindingEquals"
},
"segment": " ="
},
{
"annotation": null,
"segment": " "
},
{
"annotation": {
"contents": "#gjmq673r1v",
"tag": "HashQualifier"
},
"segment": "#gjmq673r1v"
}
],
"tag": "UserObject"
},
"termDocs": [],
"termNames": [
"lib.someLib.depNum"
]
}
},
"typeDefinitions": {}
},
"status": [
{
"status_code": 404
"status_code": 200
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,87 @@
{
"body": "Not Found",
"body": {
"missingDefinitions": [],
"termDefinitions": {
"#3r86bb0g1gn0ugqcf1hcvchic4rmlkep93agjdni44rfpf8m8pn9n3rtfq0jo4kovhv1nus01eqiivgdk2b20snsarln4n57dbk88m0": {
"bestTermName": "someTerm",
"defnTermTag": "Plain",
"signature": [
{
"annotation": {
"contents": "##Nat",
"tag": "HashQualifier"
},
"segment": "##Nat"
}
],
"termDefinition": {
"contents": [
{
"annotation": {
"contents": "someTerm",
"tag": "HashQualifier"
},
"segment": "someTerm"
},
{
"annotation": {
"tag": "TypeAscriptionColon"
},
"segment": " :"
},
{
"annotation": null,
"segment": " "
},
{
"annotation": {
"contents": "##Nat",
"tag": "HashQualifier"
},
"segment": "##Nat"
},
{
"annotation": null,
"segment": "\n"
},
{
"annotation": {
"contents": "someTerm",
"tag": "HashQualifier"
},
"segment": "someTerm"
},
{
"annotation": {
"tag": "BindingEquals"
},
"segment": " ="
},
{
"annotation": null,
"segment": " "
},
{
"annotation": {
"contents": "#1apeg4vfn6t5jm65ldj9h8j4340u2uvqq62ih99fi80nqrrqj76vgb694fpcaci2c2t95bcupljq8b04m4vu70qq85mhr777i39i3jg",
"tag": "TermReference"
},
"segment": "depNum"
}
],
"tag": "UserObject"
},
"termDocs": [],
"termNames": [
"someTerm"
]
}
},
"typeDefinitions": {}
},
"status": [
{
"status_code": 404
"status_code": 200
}
]
}
15 changes: 15 additions & 0 deletions transcripts/share-apis/projects-flow/project-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
"tags": [],
"updatedAt": "<TIMESTAMP>",
"visibility": "private"
},
{
"createdAt": "<TIMESTAMP>",
"isFaved": false,
"numFavs": 0,
"owner": {
"handle": "@transcripts",
"name": "Transcript User",
"type": "user"
},
"slug": "transcriptproject",
"summary": null,
"tags": [],
"updatedAt": "<TIMESTAMP>",
"visibility": "private"
}
],
"status": [
Expand Down
2 changes: 1 addition & 1 deletion transcripts/sync-apis/pull-without-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ x = 1
Create a project, add some history, then push it.

```ucm
.> project.create-empty myproject
scratch/main> project.create-empty myproject
myproject/main> add
myproject/main> move.term x y
myproject/main> move.term y z
Expand Down
8 changes: 4 additions & 4 deletions transcripts/sync-apis/pull-without-history.output.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
```unison
``` unison
x = 1
```

```ucm
``` ucm
Loading changes detected in scratch.u.
Expand All @@ -17,8 +17,8 @@ x = 1
```
Create a project, add some history, then push it.

```ucm
.> project.create-empty myproject
``` ucm
scratch/main> project.create-empty myproject
🎉 I've created the project myproject.
Expand Down
2 changes: 1 addition & 1 deletion transcripts/sync-apis/sync.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```ucm:hide
.> project.create-empty proj
scratch/main> project.create-empty proj
proj/main> builtins.merge
```

Expand Down
Loading

0 comments on commit 2ea35dd

Please sign in to comment.