Changeset - r10164:44f57076dea8
[Not reviewed]
master
0 2 0
glx - 16 years ago 2008-09-17 16:06:05
glx@openttd.org
(svn r14355) -Fix: latest svn revision detection from hg log always gave the latest relative to tip revision, not to the current working revision
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
findversion.sh
Show inline comments
 
@@ -91,13 +91,13 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
 
	if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
 
		MODIFIED="2"
 
	fi
 
	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"
 
	BRANCH=""
 
	REV=""
 
	REV_NR=""
projects/determineversion.vbs
Show inline comments
 
@@ -38,13 +38,13 @@ Sub UpdateFiles(version)
 
				modified = 0
 
			End If
 
			If InStr(revision, "-") Then
 
				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)
 
			End If
 
		Case "g" ' git
 
			Set oExec = WshShell.Exec("git log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1 ../src")
0 comments (0 inline, 0 general)