MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / getMercurialBranchName

Function getMercurialBranchName

Scripts/BuildScripts/generate_build_scripts.py:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 print( "7z finished" )
15
16def getMercurialBranchName():
17 print( 'Retrieving Mercurial bookmark name' )
18 process = subprocess.Popen( ['hg', 'log', '--template', '{bookmarks}\n', '-r', 'bookmark() & .'], stdout=subprocess.PIPE )
19 (output, err) = process.communicate()
20 exitCode = process.wait()
21
22 if exitCode == 0:
23 output = output.decode()
24 branchName = output.replace( '\n', '' )
25 return branchName
26 else:
27 return None
28
29def getGitBranchName():
30 print( 'Retrieving git branch name' )

Callers 1

Calls 2

waitMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected