From 508fe537ffcade0425acb9ce03b15f691a2f4766 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 2 Aug 2010 17:16:56 +0000 Subject: (svn r20309) -Fix [FS#3953]: Mercurial (trunk) revision detection fails when different heads are used --- findversion.sh | 2 +- projects/determineversion.vbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/findversion.sh b/findversion.sh index 18068ad30..95ba71201 100755 --- a/findversion.sh +++ b/findversion.sh @@ -107,7 +107,7 @@ elif [ -d "$ROOT_DIR/.hg" ]; then HASH=`LC_ALL=C hg id -i | cut -c1-12` REV="h`echo $HASH | cut -c1-8`" BRANCH=`hg branch | sed 's@^default$@@'` - REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"` + REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc}\n" | 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 9d300bd60..fa4109244 100755 --- a/projects/determineversion.vbs +++ b/projects/determineversion.vbs @@ -249,7 +249,7 @@ Function DetermineSVNVersion() End If ' line <> "default" End If ' Err.Number = 0 - Set oExec = WshShell.Exec("hg log -r " & hash & ":0 -k " & Chr(34) & "svn" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../") + Set oExec = WshShell.Exec("hg log -f -k " & Chr(34) & "(svn r" & Chr(34) & " -l 1 --template " & Chr(34) & "{desc}\n" & Chr(34) & " ../") If Err.Number = 0 Then revision = Mid(OExec.StdOut.ReadLine(), 7) revision = Mid(revision, 1, InStr(revision, ")") - 1) -- cgit v1.2.3-70-g09d2