1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 03:29:09 +00:00

(svn r14194) -Fix: don't use hardcoded character offsets to get hg revision. This make it similar to svn and git (ie without the ':').

This commit is contained in:
glx
2008-08-30 13:15:36 +00:00
parent 0b88f0cf54
commit bb92a7ab08
2 changed files with 5 additions and 4 deletions

View File

@@ -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