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

cli: let backend decide whether merge with root can be performed #3394

Merged
merged 4 commits into from
Mar 30, 2024

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Mar 29, 2024

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

yuja added 4 commits March 29, 2024 22:31
I don't think it adds any contextual information. TreeMergeError is somewhat
similar to BackendError.
Perhaps, there will be more error types that hold BackendError internally, but
this change is good enough to handle a merge error.
One less CLI revset helper. It might look odd that "jj rebase" says "Merge
failed" whereas "jj new" doesn't, but that depends on where the BackendError
is detected.
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

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

Thanks. Nice cleanup

@yuja yuja merged commit 08b5b66 into jj-vcs:main Mar 30, 2024
16 checks passed
@yuja yuja deleted the push-mwzuqszqqrtn branch March 30, 2024 02:14
@bnjmnt4n
Copy link
Member

Should we also remove special handling of this such as the following?
https://github.com/martinvonz/jj/blob/08b5b66ad41146491339efff5670cba4a81e56f4/cli/src/commands/new.rs#L137-L142

Not sure if there are any other similar cases.

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.

3 participants