| Index: tools/utils.py
|
| diff --git a/tools/utils.py b/tools/utils.py
|
| index 06fe0acf21a5b6d59b418b1d1145c018258a1d71..36ad7e1567dedaedd6121e5a88dfba68bb4623c7 100644
|
| --- a/tools/utils.py
|
| +++ b/tools/utils.py
|
| @@ -149,6 +149,21 @@ def GetSVNRevision():
|
| p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
|
| stderr = subprocess.STDOUT, shell=IsWindows())
|
| output, not_used = p.communicate()
|
| + revision = ParseSvnInfoOutput(output)
|
| + if revision:
|
| + return revision
|
| +
|
| + # maybe the builder is using git-svn, try that
|
| + p = subprocess.Popen(['git', 'svn', 'info'], stdout = subprocess.PIPE,
|
| + stderr = subprocess.STDOUT, shell=IsWindows())
|
| + output, not_used = p.communicate()
|
| + revision = ParseSvnInfoOutput(output)
|
| + if revision:
|
| + return revision
|
| +
|
| + return None
|
| +
|
| +def ParseSvnInfoOutput(output):
|
| for line in output.split('\n'):
|
| if 'Revision' in line:
|
| return (line.strip().split())[1]
|
|
|