bpo-27593: Get SCM build info from git instead of hg (#1327)
Based on commit 5c4b0d063aba0a68c325073f5f312a2c9f40d178 by Ned
Deily, which is based on original patches by Brett Cannon and Steve
Dower.
Remove also the private _Py_svnversion() function and SVNVERSION
variable.
Note: Py_SubversionRevision() and Py_SubversionShortBranch() are
unchanged, they are part of the public API.
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index aeff38a..b153ef6 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1426,9 +1426,9 @@
SET_SYS_FROM_STRING("subversion",
Py_BuildValue("(ssz)", "CPython", branch,
svn_revision));
- SET_SYS_FROM_STRING("_mercurial",
- Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(),
- _Py_hgversion()));
+ SET_SYS_FROM_STRING("_git",
+ Py_BuildValue("(szz)", "CPython", _Py_gitidentifier(),
+ _Py_gitversion()));
SET_SYS_FROM_STRING("dont_write_bytecode",
PyBool_FromLong(Py_DontWriteBytecodeFlag));
SET_SYS_FROM_STRING("api_version",