MCPcopy Create free account
hub / github.com/colmap/colmap / get_git_revision

Function get_git_revision

doc/conf.py:19–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def get_git_revision():
20 try:
21 commit_id = (
22 subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])
23 .decode()
24 .strip()
25 )
26 commit_date = (
27 subprocess.check_output(
28 ["git", "log", "-1", "--format=%cd", "--date=short"]
29 )
30 .decode()
31 .strip()
32 )
33 return f"{commit_id} ({commit_date})"
34 except Exception:
35 return "Unknown"
36
37
38# If extensions (or modules to document with autodoc) are in another directory,

Callers 1

conf.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected