From: Ian Campbell Subject: Re: [PATCH] scmversion: Improve svn interaction. Date: Thu, 1 Aug 2013 16:44:17 +0100 Message-ID: <1375371857.7382.133.camel@kazak.uk.xensource.com> References: <1375361143-26607-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1375361143-26607-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Ian Jackson , Keir Fraser , Marek Marczykowski , Jan Beulich , Xen-devel List-Id: xen-devel@lists.xenproject.org On Thu, 2013-08-01 at 13:45 +0100, Andrew Cooper wrote: > Prevent running svn if .svn is not found; some versions of svn will > unconditionally create it. I was kind of hoping "improve" might mean "delete" ;-) We must have inherited this from the Linux version. I can't imagine any reason why you would ever have wanted to import Xen (or Linux for that matter) into a svn tree. Ian. > > Signed-off-by: Andrew Cooper > CC: Marek Marczykowski > CC: Keir Fraser > CC: Jan Beulich > CC: Ian Campbell > CC: Ian Jackson > --- > 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" >