From 6d2629a9365521372d74b2862737805bfe49562f Mon Sep 17 00:00:00 2001 From: mlaier Date: Wed, 23 Sep 2009 14:48:13 +0000 Subject: Improve on r197334: Find the most recently merged svn revision, too. If we get a svn revision that matches HEAD use rXXX=GIT otherwise use rXXX+GIT. Submitted by: avg MFC after: 3 days X-MFC: not stable/8 before 8.0 --- sys/conf/newvers.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/conf') diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 49c09e1..cabee5a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -114,9 +114,16 @@ case "$d" in svn=`$git_cmd svn find-rev $git 2>/dev/null` if [ -n "$svn" ] ; then svn=" r${svn}" - git="-${git}" + git="=${git}" else - git=" ${git}" + svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \ + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + if [ -n $svn ] ; then + svn=" r${svn}" + git="+${git}" + else + git=" ${git}" + fi fi if $git_cmd --work-tree=${SRCDIR} diff-index \ --name-only HEAD | read dummy; then -- cgit v1.1