Re: sys/conf/newvers.sh vs. subversion-1.7

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Mon, 24 Oct 2011 14:48:39 -0700
On 10/24/2011 10:14, Craig Rodrigues wrote:
> On Fri, Oct 21, 2011 at 10:47 PM, Doug Barton <dougb_at_freebsd.org> 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/
Received on Mon Oct 24 2011 - 19:48:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC