Changeset - r21905:a48ab9bcdc72
[Not reviewed]
master
0 2 0
planetmaker - 10 years ago 2014-11-09 16:37:07
planetmaker@openttd.org
(svn r27059) -Change: [Makefile] Make sure to use plain mercurial output unaltered by personal presets
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1028,25 +1028,25 @@ check_params() {
 
	fi
 

	
 
	if [ -d "$ROOT_DIR/.svn" ] && [ -n "`svn help 2>/dev/null`" ]; then
 
		log 1 "checking revision... svn detection"
 
	elif [ -d "$ROOT_DIR/../.svn" ] && [ -n "`svn help 2>/dev/null`" ] && [ -n "`LC_ALL=C svn info $ROOT_DIR/.. | grep '^URL:.*tags$'`" ]; then
 
		# subversion changed its behaviour; now not all folders have a .svn folder,
 
		# but only the root folder. Since making tags requires a (sparse) checkout
 
		# of the tags folder, the folder of the tag does not have a .svn folder
 
		# anymore and this fails to detect the subversion repository checkout.
 
		log 1 "checking revision... svn detection (tag)"
 
	elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
 
		log 1 "checking revision... git detection"
 
	elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then
 
	elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
 
		log 1 "checking revision... hg detection"
 
	elif [ -f "$ROOT_DIR/.ottdrev" ]; then
 
		log 1 "checking revision... source tarball"
 
	else
 
		log 1 "checking revision... no detection"
 
		log 1 "WARNING: there is no means to determine the version."
 
		log 1 "WARNING: please use a subversion, mercurial, or git checkout of OpenTTD."
 
		log 1 "WARNING: you can only join game servers that have been compiled without"
 
		log 1 "WARNING:   version detection."
 
		log 1 "WARNING: there is a great chance you desync."
 
		log 1 "WARNING: USE WITH CAUTION!"
 

	
findversion.sh
Show inline comments
 
@@ -97,30 +97,30 @@ elif [ -d "$ROOT_DIR/.git" ]; then
 
	REV_NR=`LC_ALL=C git log --pretty=format:%s --grep="^(svn r[0-9]*)" -1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
	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
 
	TAG="`git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null | sed 's@\^0$@@'`"
 
	if [ -n "$TAG" ]; then
 
		BRANCH=""
 
		REV="$TAG"
 
	fi
 
elif [ -d "$ROOT_DIR/.hg" ]; then
 
	# We are a hg checkout
 
	if [ -n "`hg status | grep -v '^?'`" ]; then
 
	if [ -n "`HGPLAIN= hg status | grep -v '^?'`" ]; then
 
		MODIFIED="2"
 
	fi
 
	HASH=`LC_ALL=C hg id -i | cut -c1-12`
 
	HASH=`LC_ALL=C HGPLAIN= hg id -i | cut -c1-12`
 
	REV="h`echo $HASH | cut -c1-8`"
 
	BRANCH="`hg branch | sed 's@^default$@@'`"
 
	BRANCH="`HGPLAIN= hg branch | sed 's@^default$@@'`"
 
	TAG="`hg id -t | grep -v 'tip$'`"
 
	if [ -n "$TAG" ]; then
 
		BRANCH=""
 
		REV="$TAG"
 
	fi
 
	REV_NR=`LC_ALL=C hg log -f -k "(svn r" -l 1 --template "{desc|firstline}\n" | grep "^(svn r[0-9]*)" | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
	if [ -z "$REV_NR" ]; then
 
		# No rev? Maybe it is a custom hgsubversion clone
 
		REV_NR=`LC_ALL=C hg parent --template="{svnrev}"`
 
	fi
 
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
 
	# We are an exported source bundle
0 comments (0 inline, 0 general)