run_vcs_commit_id_command
- run_vcs_commit_id_command(*, vcs_name: str, commit_id_command: List[str] | Tuple[str, ...], local_install_basepath: Path, need_to_exist_path_child: str = '.', check_dirty_command: List[str] | Tuple[str, ...] | None = None) VcsInfo | None [source]
Inner function of commit_id retrieval functions.
- Parameters:
vcs_name (str) – Name if the vcs, which will be used as part of the result.
commit_id_command (Union[List[str], Tuple[str, ...]]) – Shell command to return the commit_id. E.g. for
git
:("git", "log", "--before", f"'{date_string}'", "-n", "1", "--pretty=format:%H",)
local_install_basepath (Path) – Basepath of the local installation.
need_to_exist_path_child (str) – Childitem that needs to exists inside of local_install_basepath. E.g. for
git
:".git"
. by default “.”check_dirty_command (Optional[Union[List[str], Tuple[str, ...]]]) – Command to be run for checking if a directory contains uncommitted changes. E.g. for
git
: ``(“git”, “status”, “-s”)``by default None
- Returns:
(vcs_name, commit_id)
- Return type:
Optional[VcsInfo]
See also
get_local_git_commit_id