Support Merge when renaming a command#474
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends the merge functionality when renaming a command by reusing the existing _add_cfgs logic to update the command_tree of a workspace.
- Removed the inline conflict resolution logic in _add_command_tree_leaf.
- Introduced calls to remove_cfg and _add_cfg_editors to handle command renaming and merging.
kairu-ms
approved these changes
Apr 1, 2025
Merged
necusjz
reviewed
Oct 23, 2025
| reusable_leaf = self._reusable_leaves.pop(tuple(cmd_names), None) | ||
| if reusable_leaf: | ||
| new_cmd = reusable_leaf | ||
| elif aaz_ref and (ref_v_name := aaz_ref.get(' '.join(cmd_names), None)) and (aaz_leaf := self.aaz_specs.find_command(*cmd_names)): |
Member
There was a problem hiding this comment.
_build_command_tree_leaf_from_aaz_ref hasn't check aaz_ref, caused #528.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_add_cfg_editorsto support merge and updatecommand_treeof workspace.