From owner-freebsd-current@FreeBSD.ORG Mon Oct 24 21:48:40 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 264C9106566C for ; Mon, 24 Oct 2011 21:48:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D3DA014FB6B; Mon, 24 Oct 2011 21:48:39 +0000 (UTC) Message-ID: <4EA5DD37.30902@FreeBSD.org> Date: Mon, 24 Oct 2011 14:48:39 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Craig Rodrigues References: <20111020114844.GK59810@albert.catwhisker.org> <20111020122121.GL59810@albert.catwhisker.org> <201110211636.05917.jhb@freebsd.org> <20111021211221.GV59810@albert.catwhisker.org> <4EA21842.5000808@FreeBSD.org> <4EA2590B.90008@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: sys/conf/newvers.sh vs. subversion-1.7 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:48:40 -0000 On 10/24/2011 10:14, Craig Rodrigues wrote: > On Fri, Oct 21, 2011 at 10:47 PM, Doug Barton wrote: >> On 10/21/2011 22:42, Craig Rodrigues wrote: >>> Hi, >>> >>> I tried following: >>> >>> (1) Run svnversion in non-svn directory: >>> >>> return status == 0 >> >> Return status isn't everything. :) >> >>> prints out "exported" >> >> In my case (1.7) it says "Unversioned directory" >> >> But my point (which perhaps I should have made more explicit) is that >> given the fact that svnversion handles non-svn directories gracefully >> it's faster (simpler, etc.) to just run foo=`svnversion` and then make >> sure that $foo is rational than it is to run 2 commands. >> >> Doug > > > Hi, > > What logic can we use to make sure svnversion returns a rational value? Make sure that the response starts with a number. > It looks like the output of svnversion for non-svn directories is > inconsistent between versions of Subversion. The non-svn responses vary, the svn responses don't. :) -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/