vcspull add - vcspull.cli.add¶
Add single repository functionality for vcspull.
- vcspull.cli.add.create_add_subparser(parser)[source]¶
Create
vcspull addargument subparser.- Return type:
None
- Parameters:
parser (argparse.ArgumentParser) – The parser to configure
- vcspull.cli.add._resolve_workspace_path(workspace_root, repo_path_str, *, cwd)[source]¶
Resolve workspace path from arguments.
- Return type:
- Parameters:
workspace_root (str | None) – Workspace root path from user
repo_path_str (str | None) – Repo path from user
cwd (pathlib.Path) – Current working directory
- Returns:
Resolved workspace path
- Return type:
- vcspull.cli.add._detect_git_remote(repo_path)[source]¶
Return the
originremote URL for a Git repository if available.
- vcspull.cli.add._normalize_detected_url(remote)[source]¶
Return display and config URLs derived from a detected remote.
- vcspull.cli.add._build_ordered_items(top_level_items, raw_config)[source]¶
Return deep-copied top-level items preserving original ordering.
- vcspull.cli.add._aggregate_from_ordered_items(items)[source]¶
Collapse ordered top-level items into a mapping grouped by label.
- vcspull.cli.add._collect_duplicate_sections(items)[source]¶
Return mapping of labels to their repeated sections (>= 2 occurrences).
- vcspull.cli.add.handle_add_command(args)[source]¶
Entry point for the
vcspull addCLI command.- Return type:
None
- Parameters:
args (argparse.Namespace)
- vcspull.cli.add.add_repo(name, url, config_file_path_str, path, workspace_root_path, dry_run, *, merge_duplicates=True)[source]¶
Add a repository to the vcspull configuration.
- Return type:
- Parameters:
name (str) – Repository name for the config
url (str) – Repository URL
config_file_path_str (str | None) – Path to config file, or None to use default
path (str | None) – Local path where repo will be cloned
workspace_root_path (str | None) – Workspace root to use in config
dry_run (bool) – If True, preview changes without writing
merge_duplicates (bool)