vcspull import - vcspull.cli._import

Import repository functionality for vcspull.

vcspull.cli._import.get_git_origin_url(repo_path)[source]

Get the origin URL from a git repository.

Return type:

Optional[str]

Parameters:

repo_path (pathlib.Path) – Path to the git repository

Returns:

The origin URL if found, None otherwise

Return type:

str | None

vcspull.cli._import.create_import_subparser(parser)[source]

Create vcspull import argument subparser.

Return type:

None

Parameters:

parser (ArgumentParser)

vcspull.cli._import._resolve_workspace_path(workspace_root, repo_path_str, *, cwd)[source]
Return type:

Path

Parameters:
  • workspace_root (str | None)

  • repo_path_str (str | None)

  • cwd (Path)

vcspull.cli._import.import_repo(name, url, config_file_path_str, path, workspace_root_path)[source]

Import a repository to the vcspull configuration.

Return type:

None

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

vcspull.cli._import.import_from_filesystem(scan_dir_str, config_file_path_str, recursive, workspace_root_override, yes)[source]

Scan filesystem for git repositories and import to vcspull config.

Return type:

None

Parameters:
  • scan_dir_str (str) – Directory to scan for git repositories

  • config_file_path_str (str | None) – Path to config file, or None to use default

  • recursive (bool) – Whether to scan subdirectories recursively

  • workspace_root_override (str | None) – Workspace root to use in config (overrides automatic detection)

  • yes (bool) – Whether to skip confirmation prompt