Changeset - r15638:dcccc7b23ed3
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-08-02 18:37:37
rubidium@openttd.org
(svn r20313) -Fix (r20309): Mercurial version detection picked up a bit more than it should've picked up.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
findversion.sh
Show inline comments
 
@@ -98,25 +98,25 @@ elif [ -d "$ROOT_DIR/.git" ]; then
 
	if [ -z "$REV_NR" ]; then
 
		# No rev? Maybe it is a custom git-svn clone
 
		REV_NR=`LC_ALL=C git log --pretty=format:%b --grep="git-svn-id:.*@[0-9]*" -1 | sed "s@.*\@\([0-9]*\).*@\1@"`
 
	fi
 
elif [ -d "$ROOT_DIR/.hg" ]; then
 
	# We are a hg checkout
 
	if [ -n "`hg status | grep -v '^?'`" ]; then
 
		MODIFIED="2"
 
	fi
 
	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 -f -k "(svn r" -l 1 --template "{desc}\n" | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
	REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc}\n" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
else
 
	# We don't know
 
	MODIFIED="1"
 
	BRANCH=""
 
	REV=""
 
	REV_NR=""
 
fi
 

	
 
if [ "$MODIFIED" -eq "2" ]; then
 
	REV="${REV}M"
 
fi
 

	
0 comments (0 inline, 0 general)