Complete switch to git
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
import os
|
||||
import urllib.request
|
||||
from ambuild.command import Command
|
||||
from ambuild.command import ShellCommand
|
||||
|
||||
try:
|
||||
import urllib.request as urllib
|
||||
except ImportError:
|
||||
import urllib2 as urllib
|
||||
|
||||
class IterateDebugInfoCommand(Command):
|
||||
def run(self, master, job):
|
||||
pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'rt')
|
||||
|
||||
+6
-5
@@ -7,12 +7,13 @@ import ambuild.command as command
|
||||
|
||||
#Quickly try to ascertain the current repository revision
|
||||
def GetVersion():
|
||||
args = ['hg', 'parent', '-R', AMBuild.sourceFolder]
|
||||
p = command.RunDirectCommand(AMBuild, args)
|
||||
m = re.match('changeset:\s+(\d+):(.+)', p.stdoutText)
|
||||
if m == None:
|
||||
rev = command.RunDirectCommand(AMBuild, ['git', 'rev-list', '--count', 'HEAD']).stdoutText.strip()
|
||||
cset = command.RunDirectCommand(AMBuild, ['git', 'log', '--pretty=format:%h', '-n', '1']).stdoutText.strip()
|
||||
|
||||
if not rev or not cset:
|
||||
raise Exception('Could not determine repository version')
|
||||
return m.groups()
|
||||
|
||||
return (rev, cset)
|
||||
|
||||
def PerformReversioning():
|
||||
rev, cset = GetVersion()
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Lemons.
|
||||
|
||||
Reference in New Issue
Block a user