You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Barry Scott <ba...@barrys-emacs.org> on 2008/03/26 20:36:28 UTC
SVN 1.5 beta1 - info2 returns svn_info_t.size == 4294967295
I'm running svn 1.5 beta1 on Mac OS X 10.4.11 PowerPC.
svn_client_info2() for a wc file returned
working_size == 33
size == 4294967295
How should I interpret the value 4294967295?
Is there a symbol for this value?
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN 1.5 beta1 - info2 returns svn_info_t.size == 4294967295
Posted by Julian Foad <ju...@btopenworld.com>.
Karl Fogel wrote:
> Barry Scott <ba...@barrys-emacs.org> writes:
>
>>>On Wed, 26 Mar 2008, Barry Scott wrote:
>>>
>>>>I'm running svn 1.5 beta1 on Mac OS X 10.4.11 PowerPC.
>>>>
>>>>svn_client_info2() for a wc file returned
>>>>
>>>>working_size == 33
>>>>size == 4294967295
>>>>
>>>>How should I interpret the value 4294967295?
[...]
>>
>>But is this a bug or a feature?
>>
>>Should I be raising a bug report about this?
>
> If we're trying to put a negative value into an unsigned field, that's a
> bug already (it may be a symptom of some larger bug too). So yes,
> please raise a bug report, if you have a full reproduction recipe...
Barry, the documentation of svn_info_t says:
> /**
> * The size of the file in the repository (untranslated,
> * e.g. without adjustment of line endings and keyword
> * expansion). Only applicable for file -- not directory -- URLs.
> * For working copy paths, size will be @c SVN_INFO_SIZE_UNKNOWN.
> * @since New in 1.5.
> */
> apr_size_t size;
and
> #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
So this is a documented feature, not a bug.
There is in fact a bug nearby: the corresponding constant for the
"working_size" field has the wrong type: it's always negative:
> /**
> * The size of the file after being translated into its local
> * representation, or @c SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if
> * unknown. Not applicable for directories.
> * @since New in 1.5.
> */
> apr_size_t working_size;
and
> #define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN -1
I think the best fix for this would be to change the documentation of
"working_size" to say that the value used in this case is
SVN_INFO_SIZE_UNKNOWN, and to generalise the documentation of that constant to
allow it to apply to both fields.
Fixed in r30130.
(An alternative fix would be to use the signed "apr_off_t" instead of
"apr_size_t". This is the approach taken within svn_wc_entry_t where
SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN is applicable.)
These fields are new in 1.5 so proposing for back-port to 1.5.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN 1.5 beta1 - info2 returns svn_info_t.size == 4294967295
Posted by Karl Fogel <kf...@red-bean.com>.
Barry Scott <ba...@barrys-emacs.org> writes:
>> On Wed, 26 Mar 2008, Barry Scott wrote:
>>> I'm running svn 1.5 beta1 on Mac OS X 10.4.11 PowerPC.
>>>
>>> svn_client_info2() for a wc file returned
>>>
>>> working_size == 33
>>> size == 4294967295
>>>
>>> How should I interpret the value 4294967295?
>>
>> 4294967295 == 0xFFFFFFFF. It looks as though something stored the
>> value
>> -1 into a variable that was later interpreted as an unsigned 32-bit
>> integer.
>
> But is this a bug or a feature?
>
> Should I be raising a bug report about this?
If we're trying to put a negative value into an unsigned field, that's a
bug already (it may be a symptom of some larger bug too). So yes,
please raise a bug report, if you have a full reproduction recipe...
Thank you,
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN 1.5 beta1 - info2 returns svn_info_t.size == 4294967295
Posted by Barry Scott <ba...@barrys-emacs.org>.
On Mar 27, 2008, at 12:34, Alan Barrett wrote:
> On Wed, 26 Mar 2008, Barry Scott wrote:
>> I'm running svn 1.5 beta1 on Mac OS X 10.4.11 PowerPC.
>>
>> svn_client_info2() for a wc file returned
>>
>> working_size == 33
>> size == 4294967295
>>
>> How should I interpret the value 4294967295?
>
> 4294967295 == 0xFFFFFFFF. It looks as though something stored the
> value
> -1 into a variable that was later interpreted as an unsigned 32-bit
> integer.
But is this a bug or a feature?
Should I be raising a bug report about this?
Barry
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN 1.5 beta1 - info2 returns svn_info_t.size == 4294967295
Posted by Alan Barrett <ap...@cequrux.com>.
On Wed, 26 Mar 2008, Barry Scott wrote:
> I'm running svn 1.5 beta1 on Mac OS X 10.4.11 PowerPC.
>
> svn_client_info2() for a wc file returned
>
> working_size == 33
> size == 4294967295
>
> How should I interpret the value 4294967295?
4294967295 == 0xFFFFFFFF. It looks as though something stored the value
-1 into a variable that was later interpreted as an unsigned 32-bit
integer.
--apb (Alan Barrett)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org