-
Notifications
You must be signed in to change notification settings - Fork 343
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
Panic during an incomplete conflict resolution #2611
Comments
We've discussed this thoroughly in Discord and Martin recognized that this can happen when intermediate conflicts aren't resolved and any further command auto-squashes the still unfinished resolution. We still shouldn't fail on an assertion but the immediate action to warn on incomplete resolutions should prevent anyone else hitting it. |
Does resolving all conflicts in the working copy fix the panic? I'm trying to figure out how to recover from this state. EDIT: It does fix the panic! |
Also just balancing the conflicts to not hit the assertion also helps. |
## [0.22.0] - 2024-10-02 ### Breaking changes * Fixing [#4239](jj-vcs/jj#4239) means the ordering of some messages have changed. * Invalid `ui.graph.style` configuration is now an error. * The builtin template `branch_list` has been renamed to `bookmark_list` as part of the `jj branch` deprecation. ### Deprecations * `jj branch` has been deprecated in favor of `jj bookmark`. **Rationale:** Jujutsu's branches don't behave like Git branches, which a confused many newcomers, as they expected a similar behavior given the name. We've renamed them to "bookmarks" to match the actual behavior, as we think that describes them better, and they also behave similar to Mercurial's bookmarks. * `jj obslog` is now called `jj evolution-log`/`jj evolog`. `jj obslog` remains as an alias. * `jj unsquash` has been deprecated in favor of `jj squash` and `jj diffedit --restore-descendants`. **Rationale:** `jj squash` can be used in interactive mode to pull changes from one commit to another, including from a parent commit to a child commit. For fine-grained dependent diffs, such as when the parent and the child commits must successively modify the same location in a file, `jj diffedit --restore-descendants` can be used to set the parent commit to the desired content without altering the content of the child commit. * The `git.push-branch-prefix` config has been deprecated in favor of `git.push-bookmark-prefix`. * `conflict()` and `file()` revsets have been renamed to `conflicts()` and `files()` respectively. The old names are still around and will be removed in a future release. ### New features * The new config option `snapshot.auto-track` lets you automatically track only the specified paths (all paths by default). Use the new `jj file track` command to manually tracks path that were not automatically tracked. There is no way to list untracked files yet. Use `git status` in a colocated workspace as a workaround. [#323](jj-vcs/jj#323) * `jj fix` now allows fixing unchanged files with the `--include-unchanged-files` flag. This can be used to more easily introduce automatic formatting changes in a new commit separate from other changes. * `jj workspace add` now accepts a `--sparse-patterns=<MODE>` option, which allows control of the sparse patterns for a newly created workspace: `copy` (inherit from parent; default), `full` (full working copy), or `empty` (the empty working copy). * New command `jj workspace rename` that can rename the current workspace. * `jj op log` gained an option to include operation diffs. * `jj git clone` now accepts a `--remote <REMOTE NAME>` option, which allows to set a name for the remote instead of using the default `origin`. * `jj op undo` now reports information on the operation that has been undone. * `jj squash`: the `-k` flag can be used as a shorthand for `--keep-emptied`. * CommitId / ChangeId template types now support `.normal_hex()`. * `jj commit` and `jj describe` now accept `--author` option allowing to quickly change author of given commit. * `jj diffedit`, `jj abandon`, and `jj restore` now accept a `--restore-descendants` flag. When used, descendants of the edited or deleted commits will keep their original content. * `jj git fetch -b <remote-git-branch-name>` will now warn if the branch(es) can not be found in any of the specified/configured remotes. * `jj split` now lets the user select all changes in interactive mode. This may be used to keeping all changes into the first commit while keeping the current commit description for the second commit (the newly created empty one). * Author and committer names are now yellow by default. ### Fixed bugs * Update working copy before reporting changes. This prevents errors during reporting from leaving the working copy in a stale state. * Fixed panic when parsing invalid conflict markers of a particular form. ([#2611](jj-vcs/jj#2611)) * Editing a hidden commit now makes it visible. * The `present()` revset now suppresses missing working copy error. For example, `present(@)` evaluates to `none()` if the current workspace has no working-copy commit.
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [martinvonz/jj](https://github.com/martinvonz/jj) | minor | `v0.21.0` -> `v0.22.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>martinvonz/jj (martinvonz/jj)</summary> ### [`v0.22.0`](https://github.com/martinvonz/jj/releases/tag/v0.22.0) [Compare Source](jj-vcs/jj@v0.21.0...v0.22.0) ##### Breaking changes - Fixing [#​4239](jj-vcs/jj#4239) means the ordering of some messages have changed. - Invalid `ui.graph.style` configuration is now an error. - The builtin template `branch_list` has been renamed to `bookmark_list` as part of the `jj branch` deprecation. ##### Deprecations - `jj branch` has been deprecated in favor of `jj bookmark`. **Rationale:** Jujutsu's branches don't behave like Git branches, which a confused many newcomers, as they expected a similar behavior given the name. We've renamed them to "bookmarks" to match the actual behavior, as we think that describes them better, and they also behave similar to Mercurial's bookmarks. - `jj obslog` is now called `jj evolution-log`/`jj evolog`. `jj obslog` remains as an alias. - `jj unsquash` has been deprecated in favor of `jj squash` and `jj diffedit --restore-descendants`. **Rationale:** `jj squash` can be used in interactive mode to pull changes from one commit to another, including from a parent commit to a child commit. For fine-grained dependent diffs, such as when the parent and the child commits must successively modify the same location in a file, `jj diffedit --restore-descendants` can be used to set the parent commit to the desired content without altering the content of the child commit. - The `git.push-branch-prefix` config has been deprecated in favor of `git.push-bookmark-prefix`. - `conflict()` and `file()` revsets have been renamed to `conflicts()` and `files()` respectively. The old names are still around and will be removed in a future release. ##### New features - The new config option `snapshot.auto-track` lets you automatically track only the specified paths (all paths by default). Use the new `jj file track` command to manually tracks path that were not automatically tracked. There is no way to list untracked files yet. Use `git status` in a colocated workspace as a workaround. [#​323](jj-vcs/jj#323) - `jj fix` now allows fixing unchanged files with the `--include-unchanged-files` flag. This can be used to more easily introduce automatic formatting changes in a new commit separate from other changes. - `jj workspace add` now accepts a `--sparse-patterns=<MODE>` option, which allows control of the sparse patterns for a newly created workspace: `copy` (inherit from parent; default), `full` (full working copy), or `empty` (the empty working copy). - New command `jj workspace rename` that can rename the current workspace. - `jj op log` gained an option to include operation diffs. - `jj git clone` now accepts a `--remote <REMOTE NAME>` option, which allows to set a name for the remote instead of using the default `origin`. - `jj op undo` now reports information on the operation that has been undone. - `jj squash`: the `-k` flag can be used as a shorthand for `--keep-emptied`. - CommitId / ChangeId template types now support `.normal_hex()`. - `jj commit` and `jj describe` now accept `--author` option allowing to quickly change author of given commit. - `jj diffedit`, `jj abandon`, and `jj restore` now accept a `--restore-descendants` flag. When used, descendants of the edited or deleted commits will keep their original content. - `jj git fetch -b <remote-git-branch-name>` will now warn if the branch(es) can not be found in any of the specified/configured remotes. - `jj split` now lets the user select all changes in interactive mode. This may be used to keeping all changes into the first commit while keeping the current commit description for the second commit (the newly created empty one). - Author and committer names are now yellow by default. ##### Fixed bugs - Update working copy before reporting changes. This prevents errors during reporting from leaving the working copy in a stale state. - Fixed panic when parsing invalid conflict markers of a particular form. ([#​2611](jj-vcs/jj#2611)) - Editing a hidden commit now makes it visible. - The `present()` revset now suppresses missing working copy error. For example, `present(@​)` evaluates to `none()` if the current workspace has no working-copy commit. ##### Contributors Thanks to the people who made this release happen! - Austin Seipp ([@​thoughtpolice](https://github.com/thoughtpolice)) - Danny Hooper ([@​hooper](https://github.com/hooper)) - Emily Shaffer ([@​nasamuffin](https://github.com/nasamuffin)) - Essien Ita Essien ([@​essiene](https://github.com/essiene)) - Ethan Brierley ([@​eopb](https://github.com/eopb)) - Ilya Grigoriev ([@​ilyagr](https://github.com/ilyagr)) - Kevin Liao ([@​kevincliao](https://github.com/kevincliao)) - Lukas Wirth ([@​Veykril](https://github.com/Veykril)) - Martin von Zweigbergk ([@​martinvonz](https://github.com/martinvonz)) - Mateusz Mikuła ([@​mati865](https://github.com/mati865)) - mlcui ([@​mlcui-corp](https://github.com/mlcui-corp)) - Philip Metzger ([@​PhilipMetzger](https://github.com/PhilipMetzger)) - Samuel Tardieu ([@​samueltardieu](https://github.com/samueltardieu)) - Stephen Jennings ([@​jennings](https://github.com/jennings)) - Tyler Goffinet ([@​qubitz](https://github.com/qubitz)) - Vamsi Avula ([@​avamsi](https://github.com/avamsi)) - Yuya Nishihara ([@​yuja](https://github.com/yuja)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Description
This happened at
$WORK
, so this is a recollection. This happened while resolving another large conflict (8-sided if I remember correctly). It would be nice if we didn't panic during merge-tree creation, as it rendersjj st
and other commands useless.Steps to Reproduce the Problem
jj st
to see if we have pending conflicts to solve.Expected Behavior
jj log
orjj st
don't panic.Actual Behavior
We hit an assertion in
lib/src/merge.rs
, which expects an even amount of adds and an odd amount of removes.Specifications
The text was updated successfully, but these errors were encountered: