Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156677567
D17653.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17653.id.diff
View Options
Index: sys/conf/newvers.sh
===================================================================
--- sys/conf/newvers.sh
+++ sys/conf/newvers.sh
@@ -149,6 +149,7 @@
i=`${MAKE:-make} -V KERN_IDENT`
compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -w 'version')
+svn_x=
for dir in /usr/bin /usr/local/bin; do
if [ ! -z "${svnversion}" ] ; then
break
@@ -160,6 +161,7 @@
${dir}/svnversion $(realpath ${0}) >/dev/null 2>&1
if [ $? -eq 0 ]; then
svnversion=${dir}/svnversion
+ svn_x=${dir}/svn
break
fi
fi
@@ -169,8 +171,10 @@
/usr/bin/svnliteversion $(realpath ${0}) >/dev/null 2>&1
if [ $? -eq 0 ]; then
svnversion=/usr/bin/svnliteversion
+ svn_x=/usr/bin/svnlite
else
svnversion=
+ svn_x=
fi
fi
@@ -198,15 +202,18 @@
done
fi
-if [ -n "$svnversion" ] ; then
- svn=`cd ${SYSDIR} && $svnversion 2>/dev/null`
+if [ -n "$svnversion" -a -n "$svn_x" ] ; then
+ svn_l=`$svn_x info --show-item last-changed-revision ${SYSDIR} 2>/dev/null`
+ svn=`$svnversion ${SYSDIR} 2>/dev/null`
case "$svn" in
[0-9]*[MSP]|*:*)
- svn=" r${svn}"
+ svn_l=${svn_l}${svn##*[0-9]}
+ svn_r=${svn%%[A-Z]*}
+ svn=" r${svn_l}/${svn_r}"
modified=true
;;
[0-9]*)
- svn=" r${svn}"
+ svn=" r${svn_l}/${svn}"
;;
*)
unset svn
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 3:20 PM (12 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33097241
Default Alt Text
D17653.id.diff (1 KB)
Attached To
Mode
D17653: Teach newvers.sh how to get the last revision on the branch
Attached
Detach File
Event Timeline
Log In to Comment