MCPcopy
hub / github.com/tirth8205/code-review-graph / _store_vcs_metadata

Function _store_vcs_metadata

code_review_graph/incremental.py:476–490  ·  view source on GitHub ↗

Persist VCS branch/revision info into the graph metadata table.

(repo_root: Path, store: "GraphStore")

Source from the content-addressed store, hash-verified

474
475
476def _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
493def get_changed_files(repo_root: Path, base: str = "HEAD~1") -> list[str]:

Callers 2

full_buildFunction · 0.85
incremental_updateFunction · 0.85

Calls 4

detect_vcsFunction · 0.85
_git_branch_infoFunction · 0.85
_svn_revision_infoFunction · 0.85
set_metadataMethod · 0.80

Tested by

no test coverage detected