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
Collaborator

@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 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-psqruoxnkoyy branch 2 times, most recently from 62c0187 to 75b7379 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-utlmxzpwopxr branch 2 times, most recently from 92730f0 to 63d516b 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 2 times, most recently from 944bd6a to d0c7cc3 Compare August 18, 2024 01:18
@essiene essiene changed the base branch from essiene/push-pmsvoxtkupkp to essiene/push-utlmxzpwopxr August 20, 2024 14:17
@essiene essiene force-pushed the essiene/push-utlmxzpwopxr branch 2 times, most recently from 429d9e9 to 3742158 Compare August 20, 2024 14:28
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
Collaborator

@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 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.

None yet

4 participants