|
17 | 17 | expand_dir, |
18 | 18 | find_home_config_files, |
19 | 19 | merge_duplicate_workspace_roots, |
20 | | - normalize_workspace_roots, |
21 | 20 | save_config_yaml, |
22 | 21 | save_config_yaml_with_items, |
23 | 22 | workspace_root_label, |
@@ -539,23 +538,8 @@ def _prepare_no_merge_items( |
539 | 538 | Style.RESET_ALL, |
540 | 539 | ) |
541 | 540 |
|
542 | | - normalization_changes = 0 |
543 | | - if path is None: |
544 | | - ( |
545 | | - raw_config, |
546 | | - _normalization_map, |
547 | | - normalization_conflicts, |
548 | | - normalization_changes, |
549 | | - ) = normalize_workspace_roots( |
550 | | - raw_config, |
551 | | - cwd=cwd, |
552 | | - home=home, |
553 | | - ) |
554 | | - for message in normalization_conflicts: |
555 | | - log.warning(message) |
556 | | - |
557 | 541 | workspace_label, relabelled = _ensure_workspace_label_for_merge(raw_config) |
558 | | - config_was_relabelled = relabelled or (normalization_changes > 0) |
| 542 | + config_was_relabelled = relabelled |
559 | 543 | workspace_section = raw_config.get(workspace_label) |
560 | 544 | if not isinstance(workspace_section, dict): |
561 | 545 | log.error( |
@@ -657,28 +641,9 @@ def _prepare_no_merge_items( |
657 | 641 | return |
658 | 642 |
|
659 | 643 | ordered_items = _build_ordered_items(top_level_items, raw_config) |
660 | | - normalization_applied = False |
661 | | - if path is None: |
662 | | - for entry in ordered_items: |
663 | | - section = entry["section"] |
664 | | - if not isinstance(section, dict): |
665 | | - continue |
666 | | - try: |
667 | | - path_key = canonicalize_workspace_path(entry["label"], cwd=cwd) |
668 | | - except Exception: |
669 | | - continue |
670 | | - normalized_label = workspace_root_label( |
671 | | - path_key, |
672 | | - cwd=cwd, |
673 | | - home=home, |
674 | | - preserve_cwd_label=True, |
675 | | - ) |
676 | | - if normalized_label != entry["label"]: |
677 | | - entry["label"] = normalized_label |
678 | | - normalization_applied = True |
679 | 644 |
|
680 | 645 | workspace_label, target_index, relabelled = _prepare_no_merge_items(ordered_items) |
681 | | - config_was_relabelled = relabelled or normalization_applied |
| 646 | + config_was_relabelled = relabelled |
682 | 647 |
|
683 | 648 | duplicate_sections = _collect_duplicate_sections(ordered_items) |
684 | 649 | for label, sections in duplicate_sections.items(): |
|
0 commit comments