Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2016 17:31:35 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310279 - head/sys/conf
Message-ID:  <201612191731.uBJHVZHA083759@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Dec 19 17:31:34 2016
New Revision: 310279
URL: https://svnweb.freebsd.org/changeset/base/310279

Log:
  newvers.sh: consider as modified SVN mixed revision and other cases
  
  The newvers -R option is intended to include build metadata (e.g. user,
  host, time) if the build is from an unmodified VCS tree. For subversion
  it considered a trailing 'M' as an indication of a modified tree, and
  any other version string as modified.
  
  Also include mixed revision checkouts (e.g. 123:126), switched (123S)
  and partial (123P) working copies as modified: the revision number is
  insufficient to uniquely determine which source was used for the build.
  
  Reported by:	gjb
  Reviewed by:	gjb
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D8853

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Mon Dec 19 17:10:30 2016	(r310278)
+++ head/sys/conf/newvers.sh	Mon Dec 19 17:31:34 2016	(r310279)
@@ -197,12 +197,17 @@ fi
 
 if [ -n "$svnversion" ] ; then
 	svn=`cd ${SYSDIR} && $svnversion 2>/dev/null`
-	if expr "$svn" : ".*M" >/dev/null; then
-		modified=true
-	fi
 	case "$svn" in
-	[0-9]*)	svn=" r${svn}" ;;
-	*)	unset svn ;;
+	[0-9]*[MSP]|*:*)
+		svn=" r${svn}"
+		modified=true
+		;;
+	[0-9]*)
+		svn=" r${svn}"
+		;;
+	*)
+		unset svn
+		;;
 	esac
 fi
 
@@ -270,7 +275,7 @@ if [ -n "$hg_cmd" ] ; then
 fi
 
 include_metadata=true
-while getopts r opt; do
+while getopts rR opt; do
 	case "$opt" in
 	r)
 		include_metadata=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612191731.uBJHVZHA083759>