diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2013-07-24 09:06:50 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2013-07-24 09:06:50 +0000 |
commit | 3878413821626bf353d3070af89a246f9476a142 (patch) | |
tree | 9e2a0b6968556dfb19e93b789f0a61ef6aac9a3b /sys/conf/newvers.sh | |
parent | 5393fdd26f48fc1fed099c7706fa2871894f7132 (diff) | |
download | src-3878413821626bf353d3070af89a246f9476a142.tar.gz src-3878413821626bf353d3070af89a246f9476a142.zip |
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
Notes
Notes:
svn path=/head/; revision=253602
Diffstat (limited to 'sys/conf/newvers.sh')
-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 0ce11aadd981..94bfef18264f 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}" |