LSSTApplications  16.0-10-g0ee56ad+4,16.0-11-ga33d1f2+4,16.0-12-g3ef5c14+2,16.0-12-g71e5ef5+17,16.0-12-gbdf3636+2,16.0-13-g118c103+2,16.0-13-g8f68b0a+2,16.0-15-gbf5c1cb+3,16.0-16-gfd17674+2,16.0-17-g7c01f5c+2,16.0-18-g0a50484,16.0-20-ga20f992+7,16.0-21-g0e05fd4+5,16.0-21-g15e2d33+3,16.0-22-g62d8060+3,16.0-22-g847a80f+3,16.0-25-gf00d9b8,16.0-28-g3990c221+3,16.0-3-gf928089+2,16.0-32-g88a4f23+4,16.0-34-gd7987ad+2,16.0-37-gc7333cb+1,16.0-4-g10fc685+1,16.0-4-g18f3627+25,16.0-4-g5f3a788+25,16.0-5-gaf5c3d7+3,16.0-5-gcc1f4bb,16.0-6-g3b92700+3,16.0-6-g4412fcd+2,16.0-6-g7235603+3,16.0-69-g2562ce1b+1,16.0-7-g0913a87,16.0-8-g14ebd58+3,16.0-8-g2df868b,16.0-8-g4cec79c+5,16.0-8-gadf6c7a,16.0-82-g59ec2a54a,16.0-9-g5400cdc+1,16.0-9-ge6233d7+4,master-g2880f2d8cf+2,v17.0.rc1
LSSTDataManagementBasePackage
Functions
lsst.sconsUtils.vcs.git Namespace Reference

Functions

def guessVersionName ()
 
def guessFingerprint ()
 

Function Documentation

◆ guessFingerprint()

def lsst.sconsUtils.vcs.git.guessFingerprint ( )
Return (fingerprint, modified) where fingerprint is the repository's SHA1

Definition at line 26 of file git.py.

26 def guessFingerprint():
27  """Return (fingerprint, modified) where fingerprint is the repository's SHA1"""
28  fingerprint, modified = "0x0", False
29 
30  if not os.path.exists(".git"):
31  state.log.warn("Cannot guess fingerprint without .git directory; will be set to '%s'."
32  % fingerprint)
33  else:
34  status = utils.runExternal("git status --porcelain --untracked-files=no", fatal=True)
35  if status.strip():
36  modified = True
37  output = utils.runExternal("git rev-parse HEAD", fatal=False)
38 
39  fingerprint = output.strip()
40 
41  return fingerprint, modified
42 
def guessFingerprint()
Definition: git.py:26

◆ guessVersionName()

def lsst.sconsUtils.vcs.git.guessVersionName ( )
Guess a version name

Definition at line 13 of file git.py.

13 def guessVersionName():
14  """Guess a version name"""
15 
16  if not os.path.exists(".git"):
17  state.log.warn("Cannot guess version without .git directory; version will be set to 'unknown'.")
18  return "unknown"
19  status = utils.runExternal("git status --porcelain --untracked-files=no", fatal=True)
20  if status.strip():
21  raise RuntimeError("Error with git version: uncommitted changes")
22  desc = utils.runExternal("git describe --tags --always", fatal=True)
23  return desc.strip()
24 
25 
def guessVersionName()
Definition: git.py:13