Skip to content

Support Merge when renaming a command#474

Merged
kairu-ms merged 6 commits intoAzure:devfrom
ReaNAiveD:merge-rename
Apr 1, 2025
Merged

Support Merge when renaming a command#474
kairu-ms merged 6 commits intoAzure:devfrom
ReaNAiveD:merge-rename

Conversation

@ReaNAiveD
Copy link
Copy Markdown
Member

@ReaNAiveD ReaNAiveD commented Mar 25, 2025

  • Reuse the logic of _add_cfg_editors to support merge and update command_tree of workspace.

@ReaNAiveD ReaNAiveD requested review from Copilot and kairu-ms March 25, 2025 05:22
@ReaNAiveD ReaNAiveD self-assigned this Mar 25, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 kairu-ms merged commit 5044d67 into Azure:dev Apr 1, 2025
3 checks passed
@AllyW AllyW mentioned this pull request Apr 14, 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)):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

_build_command_tree_leaf_from_aaz_ref hasn't check aaz_ref, caused #528.

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