svn commit: r310279 - head/sys/conf
Ed Maste
emaste at FreeBSD.org
Mon Dec 19 17:31:36 UTC 2016
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=
More information about the svn-src-head
mailing list