[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r19660 - in branches/merge-tracking: notes subversion/include subversion/libsvn_subr

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2006-05-18 01:33:29 CEST

Daniel Rall wrote:
> These APIs seems ideal for unit tests. Dan, do you already have some,
> or shall I put some tests together?

I was trying to push it through python so i could write some tests (I
have a c file i'm using).

>
> A few comments inline.
>
> On Wed, 17 May 2006, dberlin@tigris.org wrote:
> ...
>> --- (empty file)
>> +++ branches/merge-tracking/subversion/include/svn_mergeinfo.h Wed May 17 09:39:14 2006
>> @@ -0,0 +1,48 @@
> ...
>> + * @file svn_mergeinfo.h
>> + * @brief mergeinfo handling and processing
> ...
>> +/** Parse the mergeinfo stored @a *input (ending at @a end), into @a
>> + * hash mapping from svn_pathrev_t to arrays of svn_merge_info_t.
>> + * Perform temporary allocations in @a pool.
>> + * @since New in 1.5.
>> + */
>> +svn_error_t *
>> +parse_mergeinfo(const char **input, const char *end, apr_hash_t *hash,
>> + apr_pool_t *pool);
> ...
>
> Will svn_mergeinfo.h be scoped to a very tight API (as possiblly
> indicated by the "info" in its name), or do you think it'll provide a
> home for other merge tracking-related APIs?

It will only have functions that related to modifying the info
(including parsing it, merging it, condensing it, etc).
>
> How about SVN_MERGE_RANGE_SINGLE_REV (or SVN_MERGE_RANGE_ONE_REV or
> SVN_MERGE_RANGE_REV) and SVN_MERGE_RANGE_SPAN as alternate names?

Sure, whatever.
> Do we have to name this union, or can it be completely anonymous?

Anonymous unions are not C89 :)

>
>> -} merge_info_t;
>> +} svn_merge_info_t;
>> +
>> +typedef struct svn_pathrev_pair_t
>> +{
>> + const char *path;
>> + svn_revnum_t revnum;
>> +} svn_pathrev_pair_t;
> ...
>
> Surprising that we don't already have this data structure. :)

We have something like it in opt, but it's a bit different.
>
> Long line here which could be wrapped. Error message text should have
> _() markup for L10N.

>
>> *revision = result;
>>
>> *input = endptr;
>> return SVN_NO_ERROR;
>> }
>
>
>> +/* pathname -> PATHNAME@REVISION */
>
> Why is PATHNAME@REVISION capitalized in the doc string?

Because it is part of the grammar, and this is pretty much the standard
way grammars are written in text (tokens are capitalized) I have not
commented them more than the grammar for the moment.

  Should it

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 18 01:33:56 2006

This is an archived mail posted to the Subversion Dev mailing list.