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.
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/PKG-INFO +1 -1
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/_version.py +2 -2
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/branch.py +15 -6
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_helpers.py +6 -6
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/.gitignore +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/LICENSE +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/README.md +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/__init__.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/__main__.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/add.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/api.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/app_api.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/bootstrap.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/cli.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/cli_helpers.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/collaborator.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/convert_monorepo.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/doctor.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/errors.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_run.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/git_set_branch.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/ignore_files.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/init.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/logging.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/managed_blocks.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/open.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/paths.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/registry.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/remove.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/repo_urls.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/repos.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/resources/init_readme.md +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/service.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/settings.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_agents.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_github.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_devcontainer.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_extensions.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_helpers.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_launch.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_settings.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/sync_vscode_tasks.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/utils.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/multi/worktree.py +0 -0
- {multi_workspace-3.2.9 → multi_workspace-3.2.10}/pyproject.toml +0 -0
|
@@ -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.
|
|
22
|
-
__version_tuple__ = version_tuple = (3, 2,
|
|
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,
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
|
56
|
-
"
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|