Date: Sun, 10 Sep 2017 19:12:01 +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: r323394 - head/sys/conf Message-ID: <201709101912.v8AJC16k064822@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Sun Sep 10 19:12:01 2017 New Revision: 323394 URL: https://svnweb.freebsd.org/changeset/base/323394 Log: newvers.sh: accept "git-svn-id:" at the start of a line only This prevents incorrect subversion revision detection when "git svn" is not being used to get the sources but git is available. Previously old subversion revisions included in commit messages were favoured over the more recent and correct revisions in git notes. For example cf1f35574722 represents r315395 but was treated as r313908 which is referenced in the commit message. Commits following r315395/cf1f35574722 but before another commit with a git-svn-id reference in the commit message would be treated as r313908 as well. Patch from PR updated to accommodate the initial four space indent in `git log` ouptut. PR: 221848 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 2 weeks Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Sep 10 19:00:38 2017 (r323393) +++ head/sys/conf/newvers.sh Sun Sep 10 19:12:01 2017 (r323394) @@ -218,7 +218,7 @@ if [ -n "$git_cmd" ] ; then svn=" r${svn}" git="=${git}" else - svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \ + svn=`$git_cmd log | grep '^ git-svn-id:' | head -1 | \ sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` if [ -z "$svn" ] ; then svn=`$git_cmd log --format='format:%N' | \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709101912.v8AJC16k064822>