[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] scmversion: Improve svn interaction.



Prevent running svn if .svn is not found; some versions of svn will
unconditionally create it.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 xen/tools/scmversion |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/tools/scmversion b/xen/tools/scmversion
index b0c3b95..ccc6334 100755
--- a/xen/tools/scmversion
+++ b/xen/tools/scmversion
@@ -77,7 +77,7 @@ scm_version()
        fi
 
        # Check for svn and a svn repo.
-       if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last 
Changed Rev'`; then
+       if test -d .svn && rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 
2>/dev/null | grep '^Last Changed Rev'`; then
                rev=`echo $rev | awk '{print $NF}'`
                printf -- 'svn:%s' "$rev"
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.