Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error message when no movement target is found. #4284

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

essiene
Copy link
Contributor

@essiene essiene commented Aug 15, 2024

If movement commands don't find a target commit, they fail. However,
it's usually not intuitive why they fail because in non-edit mode the
start commit is the parent of the working commit.

Adding the start commit change hash to the error message makes it easier
for the user to figure out what is going on.

Part of #3947

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from feb66f0 to 379b33b Compare August 15, 2024 21:36
@essiene essiene marked this pull request as ready for review August 15, 2024 21:39
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch 3 times, most recently from f067ef5 to 6ecc2da Compare August 15, 2024 23:58
@essiene essiene changed the title Add the start change id to error message when no movement target is found. Update error message when no movement target is found. Aug 16, 2024
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch from 1a73a47 to 2fcbb68 Compare August 16, 2024 19:28
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch 2 times, most recently from 62c0187 to 75b7379 Compare August 16, 2024 19:29
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch from 2fcbb68 to 43c3e3f Compare August 16, 2024 19:29
martinvonz
martinvonz previously approved these changes Aug 16, 2024
cli/src/movement_util.rs Outdated Show resolved Hide resolved
cli/src/movement_util.rs Outdated Show resolved Hide resolved
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 75b7379 to 7058399 Compare August 16, 2024 21:20
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch 2 times, most recently from 92730f0 to 63d516b Compare August 16, 2024 21:41
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 7058399 to 100991e Compare August 16, 2024 21:41
@martinvonz martinvonz dismissed their stale review August 16, 2024 22:02

Undoing approval until we've figured out what to do about commits with more than 1 parent

@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch from 63d516b to c534c21 Compare August 17, 2024 12:31
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 100991e to e395474 Compare August 18, 2024 00:22
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch from c534c21 to e76ec87 Compare August 18, 2024 00:22
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from e395474 to 9ea300d Compare August 18, 2024 01:06
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch 2 times, most recently from 944bd6a to d0c7cc3 Compare August 18, 2024 01:18
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 9ea300d to c513edf Compare August 18, 2024 01:18
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch from d0c7cc3 to 2661065 Compare August 18, 2024 01:33
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from c513edf to c3bf86e Compare August 18, 2024 01:33
@essiene essiene force-pushed the essiene/push-pmsvoxtkupkp branch from 80cf4d2 to 666be54 Compare August 19, 2024 12:09
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 9957ca5 to eb78142 Compare August 19, 2024 14:49
@essiene essiene force-pushed the essiene/push-pmsvoxtkupkp branch from 666be54 to 41714af Compare August 19, 2024 14:49
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from eb78142 to 0dde77f Compare August 20, 2024 12:58
@essiene essiene force-pushed the essiene/push-pmsvoxtkupkp branch from 41714af to 7173dd9 Compare August 20, 2024 12:58
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 0dde77f to c639970 Compare August 20, 2024 13:20
@essiene essiene force-pushed the essiene/push-pmsvoxtkupkp branch from 7173dd9 to f0d6c53 Compare August 20, 2024 14:07
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from c639970 to 09535dc Compare August 20, 2024 14:14
@essiene essiene changed the base branch from essiene/push-pmsvoxtkupkp to essiene/push-utlmxzpwopxr August 20, 2024 14:17
@essiene essiene requested a review from martinvonz August 20, 2024 14:18
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch 2 times, most recently from 429d9e9 to 3742158 Compare August 20, 2024 14:28
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 09535dc to b5cbfaa Compare August 20, 2024 14:31
Base automatically changed from essiene/push-utlmxzpwopxr to main August 20, 2024 14:46
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch 3 times, most recently from 9c9da31 to 3a3d234 Compare August 23, 2024 09:21
cli/src/movement_util.rs Outdated Show resolved Hide resolved
cli/src/movement_util.rs Outdated Show resolved Hide resolved
cli/src/movement_util.rs Outdated Show resolved Hide resolved
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch 3 times, most recently from 1d8e082 to fe7a206 Compare August 24, 2024 00:23
@essiene essiene requested a review from yuja August 24, 2024 00:27
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch 3 times, most recently from 1c3b69e to 3bd14c8 Compare August 24, 2024 14:54
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

cli/src/movement_util.rs Outdated Show resolved Hide resolved
cli/src/movement_util.rs Outdated Show resolved Hide resolved
cli/tests/test_next_prev_commands.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
If movement commands don't find a target commit, they fail. However,
it's usually not intuitive why they fail because in non-edit mode the
start commit is the parent of the working commit.

Adding the start commit change hash to the error message makes it easier
for the user to figure out what is going on.

Also, specifying 'No **other** descendant...' helps make it clear what
`jj` is really looking for.

Part of #3947
@essiene essiene force-pushed the essiene/push-psqruoxnkoyy branch from 3bd14c8 to 30c4a88 Compare August 25, 2024 08:45
@essiene essiene merged commit f9dc058 into main Aug 25, 2024
31 checks passed
@essiene essiene deleted the essiene/push-psqruoxnkoyy branch August 25, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants