diff options
author | glx <glx@openttd.org> | 2008-09-17 16:06:05 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2008-09-17 16:06:05 +0000 |
commit | 083014b868193789adf7f299ca4d72eb861c0fa3 (patch) | |
tree | 3f9a845687951bc6a0aca699e171916d7801339d | |
parent | b9b3489eedc06f1d957103a0436a20c30300a8eb (diff) | |
download | openttd-083014b868193789adf7f299ca4d72eb861c0fa3.tar.xz |
(svn r14355) -Fix: latest svn revision detection from hg log always gave the latest relative to tip revision, not to the current working revision
-rwxr-xr-x | findversion.sh | 2 | ||||
-rwxr-xr-x | projects/determineversion.vbs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/findversion.sh b/findversion.sh index 0849608d3..184d5121d 100755 --- a/findversion.sh +++ b/findversion.sh @@ -94,7 +94,7 @@ elif [ -d "$ROOT_DIR/.hg" ]; then HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3 | cut -c1-8` REV="h$HASH" BRANCH=`hg branch | sed 's/^default$//'` - REV_NR=`LC_ALL=C hg log -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"` + REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s/.*(svn r\([0-9]*\)).*/\1/"` else # We don't know MODIFIED="1" diff --git a/projects/determineversion.vbs b/projects/determineversion.vbs index 330a53f6b..301f3097e 100755 --- a/projects/determineversion.vbs +++ b/projects/determineversion.vbs @@ -41,7 +41,7 @@ Sub UpdateFiles(version) revision = Mid(revision, 1, InStr(revision, "-") - 1) End If Case "h" ' mercurial (hg) - Set oExec = WshShell.Exec("hg log -k " & Chr(34) & "svn" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../src") + Set oExec = WshShell.Exec("hg log -r " & Mid(version, 2, 8) & ":0 -k " & Chr(34) & "svn" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../src") If Err.Number = 0 Then revision = Mid(OExec.StdOut.ReadLine(), 7) revision = Mid(revision, 1, InStr(revision, ")") - 1) |