You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <pe...@famlundblad.se> on 2006/02/08 07:52:56 UTC

Re: svn commit: r18390 - trunk/subversion/include

On Tue, 7 Feb 2006 striker@tigris.org wrote:

> Modified: trunk/subversion/include/svn_diff.h
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/include/svn_diff.h?rev=18390&p1=trunk/subversion/include/svn_diff.h&p2=trunk/subversion/include/svn_diff.h&r1=18389&r2=18390
> ==============================================================================
> --- trunk/subversion/include/svn_diff.h	(original)
> +++ trunk/subversion/include/svn_diff.h	Tue Feb  7 22:59:24 2006
> @@ -110,7 +110,10 @@
>    svn_error_t *(*datasource_close)(void *diff_baton,
>                                     svn_diff_datasource_e datasource);
>
> -  /** Get the next "token" from the datasource of type @a datasource. */
> +  /** Get the next "token" from the datasource of type @a datasource.
> +   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
> +   *  Leave @a token and @a hash untouched when the datasource is exhausted.
Really?  I'd say "Set @a token to NULL and leave @a hash untouched
when...".  That's how the implementation behaves.  Fixing, if you don't
object.

Thanks,
//Peter

> +   */
>    svn_error_t *(*datasource_get_next_token)(apr_uint32_t *hash, void **token,
>                                              void *diff_baton,
>                                              svn_diff_datasource_e datasource);
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by Sander Striker <st...@apache.org>.
Peter N. Lundblad wrote:
> On Tue, 7 Feb 2006 striker@tigris.org wrote:
> 
> 
>>Modified: trunk/subversion/include/svn_diff.h
>>Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/include/svn_diff.h?rev=18390&p1=trunk/subversion/include/svn_diff.h&p2=trunk/subversion/include/svn_diff.h&r1=18389&r2=18390
>>==============================================================================
>>--- trunk/subversion/include/svn_diff.h	(original)
>>+++ trunk/subversion/include/svn_diff.h	Tue Feb  7 22:59:24 2006
>>@@ -110,7 +110,10 @@
>>   svn_error_t *(*datasource_close)(void *diff_baton,
>>                                    svn_diff_datasource_e datasource);
>>
>>-  /** Get the next "token" from the datasource of type @a datasource. */
>>+  /** Get the next "token" from the datasource of type @a datasource.
>>+   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
>>+   *  Leave @a token and @a hash untouched when the datasource is exhausted.
> 
> Really?  I'd say "Set @a token to NULL and leave @a hash untouched
> when...".  That's how the implementation behaves.  Fixing, if you don't
> object.

I thought I had made the driver code clear *token before doing the
datasource_get_next_token() callback, but my memory may be slipping.
Yes, it is slipping.  Looking at svn_diff__get_tokens() you are
absolutely right.  "Set @token to NULL when the @a datasource is exhausted.".

Thanks,

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by Julian Foad <ju...@btopenworld.com>.
Sander Striker wrote:
> Julian Foad wrote:
>> Julian Foad wrote:
>>
>>>>> +   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
>>>
>>> Please can you say what type of data is in the hash.
>>
>> That was a bit curt of me.  Of course I meant "Thank you very much for 
>> improving the doc string thus far.  As you're going to be changing it 
>> again, it would be great if you would add some information about the 
>> types of the hash keys and values."  It sounds like the values are 
>> "void *token"; maybe the keys are ... I dunno, line numbers?
> 
> Erm, 'hash' is the hash value, a number.  It isn't a hash table mapping
> keys to values.

D'oh!  Silly me.  Thanks, Sander.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by Sander Striker <st...@apache.org>.
Julian Foad wrote:
> Julian Foad wrote:
> 
>> Peter N. Lundblad wrote:
>>
>>> On Tue, 7 Feb 2006 striker@tigris.org wrote:
>>>
>>>> --- trunk/subversion/include/svn_diff.h    (original)
>>>> +++ trunk/subversion/include/svn_diff.h    Tue Feb  7 22:59:24 2006
>>>> @@ -110,7 +110,10 @@
>>>>   svn_error_t *(*datasource_close)(void *diff_baton,
>>>>                                    svn_diff_datasource_e datasource);
>>>>
>>>> -  /** Get the next "token" from the datasource of type @a 
>>>> datasource. */
>>>> +  /** Get the next "token" from the datasource of type @a datasource.
>>>> +   *  Return a "token" in @a *token.   Return a hash of "token" in 
>>>> @a *hash.
>>>> +   *  Leave @a token and @a hash untouched when the datasource is 
>>>> exhausted.
>>>
>>>
>>> Really?  I'd say "Set @a token to NULL and leave @a hash untouched
>>> when...".  That's how the implementation behaves.  Fixing, if you don't
>>> object.
>>
>>
>> Please can you say what type of data is in the hash.
> 
> 
> That was a bit curt of me.  Of course I meant "Thank you very much for 
> improving the doc string thus far.  As you're going to be changing it 
> again, it would be great if you would add some information about the 
> types of the hash keys and values."  It sounds like the values are "void 
> *token"; maybe the keys are ... I dunno, line numbers?

Erm, 'hash' is the hash value, a number.  It isn't a hash table mapping
keys to values.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Sun, 12 Feb 2006, Julian Foad wrote:

> Julian Foad wrote:
> > Peter N. Lundblad wrote:
> >> On Tue, 7 Feb 2006 striker@tigris.org wrote:
> >>
> >>> --- trunk/subversion/include/svn_diff.h    (original)
> >>> +++ trunk/subversion/include/svn_diff.h    Tue Feb  7 22:59:24 2006
> >>> @@ -110,7 +110,10 @@
> >>>   svn_error_t *(*datasource_close)(void *diff_baton,
> >>>                                    svn_diff_datasource_e datasource);
> >>>
> >>> -  /** Get the next "token" from the datasource of type @a datasource. */
> >>> +  /** Get the next "token" from the datasource of type @a datasource.
> >>> +   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
> >>> +   *  Leave @a token and @a hash untouched when the datasource is exhausted.
> >>
> >> Really?  I'd say "Set @a token to NULL and leave @a hash untouched
> >> when...".  That's how the implementation behaves.  Fixing, if you don't
> >> object.
> >
> > Please can you say what type of data is in the hash.
>
> That was a bit curt of me.  Of course I meant "Thank you very much for
> improving the doc string thus far.  As you're going to be changing it again, it
> would be great if you would add some information about the types of the hash
> keys and values."  It sounds like the values are "void *token"; maybe the keys
> are ... I dunno, line numbers?
>
Well, Julian, no problem regarding your first way of saying this:-) I'm
keeping this in mind when working on the diff code.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> Peter N. Lundblad wrote:
>> On Tue, 7 Feb 2006 striker@tigris.org wrote:
>>
>>> --- trunk/subversion/include/svn_diff.h    (original)
>>> +++ trunk/subversion/include/svn_diff.h    Tue Feb  7 22:59:24 2006
>>> @@ -110,7 +110,10 @@
>>>   svn_error_t *(*datasource_close)(void *diff_baton,
>>>                                    svn_diff_datasource_e datasource);
>>>
>>> -  /** Get the next "token" from the datasource of type @a datasource. */
>>> +  /** Get the next "token" from the datasource of type @a datasource.
>>> +   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
>>> +   *  Leave @a token and @a hash untouched when the datasource is exhausted.
>>
>> Really?  I'd say "Set @a token to NULL and leave @a hash untouched
>> when...".  That's how the implementation behaves.  Fixing, if you don't
>> object.
> 
> Please can you say what type of data is in the hash.

That was a bit curt of me.  Of course I meant "Thank you very much for 
improving the doc string thus far.  As you're going to be changing it again, it 
would be great if you would add some information about the types of the hash 
keys and values."  It sounds like the values are "void *token"; maybe the keys 
are ... I dunno, line numbers?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r18390 - trunk/subversion/include

Posted by Julian Foad <ju...@btopenworld.com>.
Peter N. Lundblad wrote:
> On Tue, 7 Feb 2006 striker@tigris.org wrote:
> 
> 
>>Modified: trunk/subversion/include/svn_diff.h
>>Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/include/svn_diff.h?rev=18390&p1=trunk/subversion/include/svn_diff.h&p2=trunk/subversion/include/svn_diff.h&r1=18389&r2=18390
>>==============================================================================
>>--- trunk/subversion/include/svn_diff.h	(original)
>>+++ trunk/subversion/include/svn_diff.h	Tue Feb  7 22:59:24 2006
>>@@ -110,7 +110,10 @@
>>   svn_error_t *(*datasource_close)(void *diff_baton,
>>                                    svn_diff_datasource_e datasource);
>>
>>-  /** Get the next "token" from the datasource of type @a datasource. */
>>+  /** Get the next "token" from the datasource of type @a datasource.
>>+   *  Return a "token" in @a *token.   Return a hash of "token" in @a *hash.
>>+   *  Leave @a token and @a hash untouched when the datasource is exhausted.
> 
> Really?  I'd say "Set @a token to NULL and leave @a hash untouched
> when...".  That's how the implementation behaves.  Fixing, if you don't
> object.

Please can you say what type of data is in the hash.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org