blob: 8d119e7f0b46c7f6521b084d5086dec978a8357e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import future.utils as fu
cdef extern from "library/cpp/svnversion/svnversion.h":
cdef const char* GetVCS() except +;
cdef const char* GetProgramSvnVersion() except +;
cdef int GetProgramSvnRevision() except +;
cdef int GetArcadiaLastChangeNum() except +;
cdef const char* GetProgramCommitId() except +;
cdef const char* GetProgramHash() except +;
cdef const char* GetBranch() except +;
cdef const char* GetTag() except +;
cdef int GetArcadiaPatchNumber() except +;
cdef int GetProgramBuildTimestamp() except +;
def svn_version():
return fu.bytes_to_native_str(GetProgramSvnVersion())
def svn_revision():
return GetProgramSvnRevision()
def svn_last_revision():
return GetArcadiaLastChangeNum()
def commit_id():
return fu.bytes_to_native_str(GetProgramCommitId())
def hash():
return fu.bytes_to_native_str(GetProgramHash())
def svn_branch():
return fu.bytes_to_native_str(GetBranch())
def svn_tag():
return fu.bytes_to_native_str(GetTag())
def svn_timestamp():
return GetProgramBuildTimestamp()
def patch_number():
return GetArcadiaPatchNumber()
def vcs():
return fu.bytes_to_native_str(GetVCS())
|