summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-08-30 13:15:36 +0000
committerglx <glx@openttd.org>2008-08-30 13:15:36 +0000
commitbb92a7ab08fdd51f2b6902b7cd2b8d4b1427ff39 (patch)
tree9e11a6a5e60837148cbd6c8d1fec9dd1f005cba3 /projects
parent0b88f0cf54d43207e340388fcbc7a368d3ff8f0a (diff)
downloadopenttd-bb92a7ab08fdd51f2b6902b7cd2b8d4b1427ff39.tar.xz
(svn r14194) -Fix: don't use hardcoded character offsets to get hg revision. This make it similar to svn and git (ie without the ':').
Diffstat (limited to 'projects')
-rwxr-xr-xprojects/determineversion.vbs5
1 files changed, 3 insertions, 2 deletions
diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs
index 896d3e5e0..2920e958d 100755
--- a/projects/determineversion.vbs
+++ b/projects/determineversion.vbs
@@ -199,7 +199,7 @@ Function DetermineSVNVersion()
Set oExec = WshShell.Exec("git symbolic-ref HEAD")
If Err.Number = 0 Then
line = oExec.StdOut.ReadLine()
- line = Mid(line, InStrRev(line, "/")+1)
+ line = Mid(line, InStrRev(line, "/") + 1)
If line <> "master" Then
version = version & "-" & line
End If
@@ -214,7 +214,8 @@ Function DetermineSVNVersion()
Loop
End If
If Err.Number = 0 And oExec.ExitCode = 0 Then
- version = "h" & Mid(OExec.StdOut.ReadLine(), 19, 8)
+ line = OExec.StdOut.ReadLine()
+ version = "h" & Mid(line, InStrRev(line, ":") + 1, 8)
Set oExec = WshShell.Exec("hg status ../src")
If Err.Number = 0 Then
Do