multi-workspace 3.2.9__tar.gz → 3.2.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/PKG-INFO +1 -1
  2. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/_version.py +2 -2
  3. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/branch.py +15 -6
  4. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_helpers.py +6 -6
  5. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/.gitignore +0 -0
  6. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/LICENSE +0 -0
  7. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/README.md +0 -0
  8. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/__init__.py +0 -0
  9. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/__main__.py +0 -0
  10. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/add.py +0 -0
  11. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/api.py +0 -0
  12. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/app_api.py +0 -0
  13. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/bootstrap.py +0 -0
  14. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/cli.py +0 -0
  15. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/cli_helpers.py +0 -0
  16. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/collaborator.py +0 -0
  17. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/convert_monorepo.py +0 -0
  18. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/doctor.py +0 -0
  19. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/errors.py +0 -0
  20. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_run.py +0 -0
  21. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_set_branch.py +0 -0
  22. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/ignore_files.py +0 -0
  23. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/init.py +0 -0
  24. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/logging.py +0 -0
  25. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/managed_blocks.py +0 -0
  26. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/open.py +0 -0
  27. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/paths.py +0 -0
  28. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/registry.py +0 -0
  29. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/remove.py +0 -0
  30. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/repo_urls.py +0 -0
  31. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/repos.py +0 -0
  32. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/resources/init_readme.md +0 -0
  33. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/service.py +0 -0
  34. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/settings.py +0 -0
  35. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync.py +0 -0
  36. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_agents.py +0 -0
  37. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_github.py +0 -0
  38. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode.py +0 -0
  39. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_devcontainer.py +0 -0
  40. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_extensions.py +0 -0
  41. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_helpers.py +0 -0
  42. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_launch.py +0 -0
  43. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_settings.py +0 -0
  44. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_tasks.py +0 -0
  45. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/utils.py +0 -0
  46. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/worktree.py +0 -0
  47. {multi_workspace-3.2.9 → multi_workspace-3.2.10}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multi-workspace
3
- Version: 3.2.9
3
+ Version: 3.2.10
4
4
  Summary: Multi
5
5
  Project-URL: Repository, https://github.com/gabemontague/multi
6
6
  Project-URL: Issues, https://github.com/gabemontague/multi/issues
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '3.2.9'
22
- __version_tuple__ = version_tuple = (3, 2, 9)
21
+ __version__ = version = '3.2.10'
22
+ __version_tuple__ = version_tuple = (3, 2, 10)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -14,9 +14,10 @@ logger = logging.getLogger(__name__)
14
14
  def report_branches(paths: Paths) -> bool:
15
15
  """Log the current branch of the root repo and each sub-repo.
16
16
 
17
- Read-only: works with dirty working trees, mismatched branches, and
18
- detached HEADs (for example in worktrees created by `multi worktree add`).
19
- Returns True when every repo is on its expected branch.
17
+ Read-only: works with dirty working trees, mismatched branches, detached
18
+ HEADs (for example in worktrees created by `multi worktree add`), and
19
+ sub-repos that have not been synced yet (reported as missing).
20
+ Returns True when every repo is present and on its expected branch.
20
21
  """
21
22
  root_branch = describe_head(paths.root_dir)
22
23
  logger.info(f"{paths.root_dir.name} (root): {root_branch}")
@@ -27,7 +28,14 @@ def report_branches(paths: Paths) -> bool:
27
28
 
28
29
  all_match = True
29
30
  for repo in load_repos(paths):
30
- branch = describe_head(repo.path)
31
+ try:
32
+ branch = describe_head(repo.path)
33
+ except GitError:
34
+ # Missing or uninitialized sub-repo: report it and keep going so
35
+ # the rest of the workspace is still listed.
36
+ all_match = False
37
+ logger.warning(f"{repo.name}: (missing — run `multi sync`)")
38
+ continue
31
39
  expected_branch = repo.fixed_branch or root_branch
32
40
  if branch == expected_branch:
33
41
  logger.info(f"{repo.name}: {branch}")
@@ -52,6 +60,7 @@ def branch_cmd() -> None:
52
60
  paths = Paths(Path.cwd())
53
61
  if not report_branches(paths):
54
62
  raise GitError(
55
- "Repositories are not all on their expected branches. "
56
- "Use `multi set-branch` (with clean working trees) to fix."
63
+ "Repositories are missing or not on their expected branches. "
64
+ "Run `multi sync` to clone missing repos, or `multi set-branch` "
65
+ "(with clean working trees) to fix branch mismatches."
57
66
  )
@@ -28,12 +28,12 @@ def _open_repo_for_branch_lookup(repo_path: Path) -> git.Repo:
28
28
  try:
29
29
  return git.Repo(repo_path)
30
30
  except (InvalidGitRepositoryError, NoSuchPathError) as e:
31
- msg = (
32
- f"Could not determine current branch for {repo_path}: not a git repository. "
33
- "Initialize it with `git init -b main` or run `multi sync` from the workspace root."
34
- )
35
- logger.error(msg)
36
- raise GitError(msg) from e
31
+ # No logging here: callers (or the CLI error wrapper) report the
32
+ # error exactly once.
33
+ raise GitError(
34
+ f"Could not determine current branch for {repo_path.name}: not a git "
35
+ "repository. Run `multi sync` from the workspace root."
36
+ ) from e
37
37
 
38
38
 
39
39
  def get_current_branch(repo_path: Path) -> str: