def get_repo_latest_revision_hash(repo_path):
 try:
  (exit_code, stdout, _) = run_command(cmd=['git', 'rev-parse', 'HEAD'], cwd=repo_path)
 except Exception:
  revision_hash = 'unknown'
 else:
  if (exit_code == 0):
   revision_hash = stdout.strip()
  else:
   revision_hash = 'unknown'
 return revision_hash

def get_repo_latest_revision_hash ( repo_path ) : try : ( exit_code , stdout , _ ) = run_command ( cmd = [ 'git' , 'rev-parse' , 'HEAD' ] , cwd = repo_path ) except Exception : revision_hash = 'unknown' else : if ( exit_code == 0 ) : revision_hash = stdout . strip ( ) else : revision_hash = 'unknown' return revision_hash
return a hash to the latest revision in the provided repo .