was aiming for the implied project/branch name, but dunno how

This commit is contained in:
Arya Irani 2024-06-04 10:33:58 -04:00
parent d0ab586b9a
commit 7efaaef80e
4 changed files with 69 additions and 6 deletions

View File

@ -1729,7 +1729,7 @@ pullImpl name aliases pullMode addendum = do
These sourceProject sourceBranch ->
Right (Input.LibInstallI True (ProjectAndBranch sourceProject (Just sourceBranch)))
(Right source, Left _, Right path) ->
Left $
Left . P.indentN 2 $
P.wrap
( "I think you're wanting to merge"
<> case source of

View File

@ -2117,12 +2117,10 @@ notifyUser dir = \case
pure . P.wrap $
"I think you're wanting to merge"
<> sourcePretty
<> "into"
<> P.group (targetPretty <> ",")
<> "but"
<> "into the"
<> targetPretty
<> "doesn't exist. If you want, you can create it with"
<> (IP.makeExample IP.branchEmptyInputPattern [targetPretty] <> ",")
<> "branch, but it doesn't exist. If you want, you can create it with"
<> P.group (IP.makeExample IP.branchEmptyInputPattern [targetPretty] <> ",")
<> "and then"
<> IP.makeExample' IP.pull
<> "again."

View File

@ -0,0 +1,9 @@
```ucm
.> project.create-empty test
```
```ucm:error
test/main> pull @aryairani/test-almost-empty/main lib.base_latest
test/main> pull @aryairani/test-almost-empty/main a.b
test/main> pull @aryairani/test-almost-empty/main a
test/main> pull @aryairani/test-almost-empty/main .a
```

View File

@ -0,0 +1,56 @@
```ucm
.> project.create-empty test
🎉 I've created the project test.
🎨 Type `ui` to explore this project's code in your browser.
🔭 Discover libraries at https://share.unison-lang.org
📖 Use `help-topic projects` to learn more about projects.
Write your first Unison code with UCM:
1. Open scratch.u.
2. Write some Unison code and save the file.
3. In UCM, type `add` to save it to your new project.
🎉 🥳 Happy coding!
```
```ucm
test/main> pull @aryairani/test-almost-empty/main lib.base_latest
The use of `pull` to install libraries is now deprecated.
Going forward, you can use
`lib.install @aryairani/test-almost-empty/main`.
Downloaded 2 entities.
I installed @aryairani/test-almost-empty/main as
aryairani_test_almost_empty_main.
test/main> pull @aryairani/test-almost-empty/main a.b
I think you're wanting to merge
@aryairani/test-almost-empty/main into the a.b namespace, but
the `pull` command only supports merging into the top level of
a local project branch.
Use `help pull` to see some examples.
test/main> pull @aryairani/test-almost-empty/main a
I think you're wanting to merge
@aryairani/test-almost-empty/main into the a branch, but it
doesn't exist. If you want, you can create it with
`branch.empty a`, and then `pull` again.
test/main> pull @aryairani/test-almost-empty/main .a
I think you're wanting to merge
@aryairani/test-almost-empty/main into the .a namespace, but
the `pull` command only supports merging into the top level of
a local project branch.
Use `help pull` to see some examples.
```