Persist VCS branch/revision info into the graph metadata table.
(repo_root: Path, store: "GraphStore")
| 474 | |
| 475 | |
| 476 | def _store_vcs_metadata(repo_root: Path, store: "GraphStore") -> None: |
| 477 | """Persist VCS branch/revision info into the graph metadata table.""" |
| 478 | vcs = detect_vcs(repo_root) |
| 479 | if vcs == "git": |
| 480 | branch, sha = _git_branch_info(repo_root) |
| 481 | if branch: |
| 482 | store.set_metadata("git_branch", branch) |
| 483 | if sha: |
| 484 | store.set_metadata("git_head_sha", sha) |
| 485 | elif vcs == "svn": |
| 486 | branch, rev = _svn_revision_info(repo_root) |
| 487 | if branch: |
| 488 | store.set_metadata("svn_branch", branch) |
| 489 | if rev: |
| 490 | store.set_metadata("svn_revision", rev) |
| 491 | |
| 492 | |
| 493 | def get_changed_files(repo_root: Path, base: str = "HEAD~1") -> list[str]: |
no test coverage detected