diff options
author | rubidium <rubidium@openttd.org> | 2009-05-29 21:24:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-29 21:24:51 +0000 |
commit | 1448160e1e63a9a1945a91c79fe8c2068ba081bd (patch) | |
tree | 53310577ad47e2925323f0558ef07a431ffa223e | |
parent | 40f22c710e1b035eeb386cec34003299ef2a7e45 (diff) | |
download | openttd-1448160e1e63a9a1945a91c79fe8c2068ba081bd.tar.xz |
(svn r16462) -Change [FS#2930]: use a safer way to detect the hash of a mercurial repository (planetmaker)
-rwxr-xr-x | findversion.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/findversion.sh b/findversion.sh index f9ddd1bcb..1e607a7ac 100755 --- a/findversion.sh +++ b/findversion.sh @@ -93,7 +93,7 @@ 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` + HASH=`LC_ALL=C hg parents --template="{node}"` 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" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"` |