mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-19 06:17:33 +03:00
Resolve transcripts
This commit is contained in:
parent
b1e10df0fb
commit
6669243e13
@ -6,10 +6,10 @@
|
||||
|
||||
The `ucm` tool tracks edits to hashes in an object called a _patch_. When patches get merged, sometimes those patches will have conflicting edits. The `replace` command helps resolve such conflicts.
|
||||
|
||||
First, let's make a new namespace, `example.resolve`:
|
||||
First, let's make a new namespace, `example.resolve` and add the builtins:
|
||||
|
||||
```ucm
|
||||
.> cd example.resolve
|
||||
```ucm:hide
|
||||
.example.resolve> builtins.merge
|
||||
```
|
||||
|
||||
Now let's add a term named `a.foo`:
|
||||
|
@ -5,10 +5,12 @@ The `ucm` tool tracks edits to hashes in an object called a _patch_. When patche
|
||||
First, let's make a new namespace, `example.resolve`:
|
||||
|
||||
```ucm
|
||||
.> cd example.resolve
|
||||
|
||||
☝️ The namespace .example.resolve is empty.
|
||||
|
||||
.example.resolve> builtins.merge
|
||||
|
||||
Done.
|
||||
|
||||
```
|
||||
Now let's add a term named `a.foo`:
|
||||
|
||||
@ -74,7 +76,7 @@ foo = 43
|
||||
⍟ These names already exist. You can `update` them to your
|
||||
new definition:
|
||||
|
||||
foo : Nat
|
||||
foo : ##Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
@ -82,7 +84,7 @@ foo = 43
|
||||
|
||||
⍟ I've updated these names to your new definition:
|
||||
|
||||
foo : Nat
|
||||
foo : ##Nat
|
||||
|
||||
```
|
||||
And make a different change in the `b` namespace:
|
||||
@ -106,7 +108,7 @@ foo = 44
|
||||
⍟ These names already exist. You can `update` them to your
|
||||
new definition:
|
||||
|
||||
foo : Nat
|
||||
foo : ##Nat
|
||||
|
||||
```
|
||||
```ucm
|
||||
@ -114,7 +116,7 @@ foo = 44
|
||||
|
||||
⍟ I've updated these names to your new definition:
|
||||
|
||||
foo : Nat
|
||||
foo : ##Nat
|
||||
|
||||
```
|
||||
The `a` and `b` namespaces now each contain a patch named `patch`. We can view these:
|
||||
@ -254,16 +256,10 @@ We can resolve the name conflict by deleting one of the names.
|
||||
|
||||
Resolved name conflicts:
|
||||
|
||||
1. ┌ example.resolve.c.foo#a84tg4er4k : Nat
|
||||
2. └ example.resolve.c.foo#emomp74i93 : Nat
|
||||
1. ┌ foo#a84tg4er4k : ##Nat
|
||||
2. └ foo#emomp74i93 : ##Nat
|
||||
↓
|
||||
3. example.resolve.c.foo#a84tg4er4k : Nat
|
||||
|
||||
Name changes:
|
||||
|
||||
Original Changes
|
||||
4. example.resolve.a.foo ┐ 5. example.resolve.c.foo#emomp74i93 (removed)
|
||||
6. example.resolve.c.foo#emomp74i93 ┘
|
||||
3. foo#a84tg4er4k : ##Nat
|
||||
|
||||
Tip: You can use `undo` or `reflog` to undo this change.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user