diff options
author | avg <avg@FreeBSD.org> | 2013-07-24 09:06:50 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-07-24 09:06:50 +0000 |
commit | de45286f858c8751ce5dbe524c912ffae439a765 (patch) | |
tree | 9e2a0b6968556dfb19e93b789f0a61ef6aac9a3b /sys/conf | |
parent | 23dd88269dadbadd0193a7d5e8aea06b20ab7283 (diff) | |
download | FreeBSD-src-de45286f858c8751ce5dbe524c912ffae439a765.zip FreeBSD-src-de45286f858c8751ce5dbe524c912ffae439a765.tar.gz |
newvers.sh: add another git-svn fallback
This time it is for a git mirror that stores svn revisions as
git notes, e.g. https://github.com/freebsd/freebsd
MFC after: 10 days
Sponsored by: HybridCluster
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/newvers.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 0ce11aa..94bfef1 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -132,6 +132,11 @@ if [ -n "$git_cmd" ] ; then else svn=`$git_cmd log | fgrep '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' | \ + grep '^svn ' | head -1 | \ + sed -n 's/^.*revision=\([0-9][0-9]*\).*$/\1/p'` + fi if [ -n "$svn" ] ; then svn=" r${svn}" git="+${git}" |