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

Re: svn commit: r35136 - trunk/subversion/libsvn_client

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Mon, 12 Jan 2009 11:31:50 -0600

Joe Swatosh wrote:
> Hi Hyrum,
>
> On Fri, Jan 9, 2009 at 2:06 PM, Hyrum K. Wright <hyrum_at_hyrumwright.org> wrote:
>> Author: hwright
>> Date: Fri Jan 9 14:06:13 2009
>> New Revision: 35136
>>
>> Log:
>> Remove the use of a deprecated function.
>>
>> * subversion/libsvn_client/mergeinfo.c
>> (logs_for_mergeinfo_rangelist): Use the newest log API.
>>
>> Modified:
>> trunk/subversion/libsvn_client/mergeinfo.c
>>
>> Modified: trunk/subversion/libsvn_client/mergeinfo.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/mergeinfo.c?pathrev=35136&r1=35135&r2=35136
>> ==============================================================================
>> --- trunk/subversion/libsvn_client/mergeinfo.c Fri Jan 9 13:18:56 2009 (r35135)
>> +++ trunk/subversion/libsvn_client/mergeinfo.c Fri Jan 9 14:06:13 2009 (r35136)
>> @@ -1086,7 +1086,8 @@ logs_for_mergeinfo_rangelist(const char
>> {
>> apr_array_header_t *target;
>> svn_merge_range_t *oldest_range, *youngest_range;
>> - svn_opt_revision_t oldest_rev, youngest_rev;
>> + svn_opt_revision_range_t *revision_range;
>> + apr_array_header_t *ranges;
>> struct filter_log_entry_baton_t fleb;
>>
>> if (! rangelist->nelts)
>> @@ -1101,13 +1102,17 @@ logs_for_mergeinfo_rangelist(const char
>> APR_ARRAY_PUSH(target, const char *) = source_url;
>>
>> /* Calculate and construct the bounds of our log request. */
>> + revision_range = apr_pcalloc(pool, sizeof(*revision_range));
>> youngest_range = APR_ARRAY_IDX(rangelist, rangelist->nelts - 1,
>> svn_merge_range_t *);
>> - youngest_rev.kind = svn_opt_revision_number;
>> - youngest_rev.value.number = youngest_range->end;
>> + revision_range->start.kind = svn_opt_revision_number;
>> + revision_range->start.value.number = youngest_range->end;
>> oldest_range = APR_ARRAY_IDX(rangelist, 0, svn_merge_range_t *);
>> - oldest_rev.kind = svn_opt_revision_number;
>> - oldest_rev.value.number = oldest_range->start;
>> + revision_range->end.kind = svn_opt_revision_number;
>> + revision_range->end.value.number = oldest_range->start;
>> +
>> + ranges = apr_array_make(pool, 1, sizeof(svn_opt_revision_range_t *));
>> + APR_ARRAY_PUSH(ranges, svn_opt_revision_range_t *) = revision_range;
>>
>> /* Build the log filtering callback baton. */
>> fleb.rangelist = rangelist;
>> @@ -1116,8 +1121,8 @@ logs_for_mergeinfo_rangelist(const char
>> fleb.ctx = ctx;
>>
>> /* Drive the log. */
>> - SVN_ERR(svn_client_log4(target, &youngest_rev, &oldest_rev, &youngest_rev,
>> - 0, discover_changed_paths, FALSE, FALSE, revprops,
>> + SVN_ERR(svn_client_log5(target, &revision_range->start, ranges, 0,
>> + discover_changed_paths, FALSE, FALSE, revprops,
>> filter_log_entry_with_rangelist, &fleb, ctx, pool));
>>
>> /* Check for cancellation. */
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1014401
>>
>
> I haven't looked into it, but this commit starts the ruby bindings
> merge tests failing again:
>
> Started
> .....................................FF.....................................................................................................
> ...............................................................................
> Finished in 717.718 seconds.
>
> 1) Failure:
> test_merge(SvnClientTest)
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/my-assertions.rb:43:in
> `assert_equal_log_entries'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/my-assertions.rb:29:in
> `assert_equal_log_entries'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:970:in
> `assert_merge'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:181:in
> `make_context'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:937:in
> `assert_merge'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1036:in
> `test_merge':
> <[[{"/branch/sample.txt"=>["M", nil, -1]},
> 2,
> {"svn:author"=>"sample-user", "svn:log"=>"sample log"},
> false]]> expected but was
> <[[{"/trunk/sample.txt"=>["A", nil, -1],
> "/trunk"=>["A", nil, -1],
> "/branch"=>["A", nil, -1],
> "/branch/sample.txt"=>["A", nil, -1]},
> 1,
> {"svn:author"=>"sample-user", "svn:log"=>"sample log"},
> false]]>.
>
> 2) Failure:
> test_merge_peg(SvnClientTest)
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/my-assertions.rb:43:in
> `assert_equal_log_entries'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/my-assertions.rb:29:in
> `assert_equal_log_entries'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:970:in
> `assert_merge'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/util.rb:181:in
> `make_context'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:937:in
> `assert_merge'
> D:/SVN/src-trunk/subversion/bindings/swig/ruby/test/test_client.rb:1042:in
> `test_merge_peg':
> <[[{"/branch/sample.txt"=>["M", nil, -1]},
> 2,
> {"svn:author"=>"sample-user", "svn:log"=>"sample log"},
> false]]> expected but was
> <[[{"/trunk/sample.txt"=>["A", nil, -1],
> "/trunk"=>["A", nil, -1],
> "/branch"=>["A", nil, -1],
> "/branch/sample.txt"=>["A", nil, -1]},
> 1,
> {"svn:author"=>"sample-user", "svn:log"=>"sample log"},
> false]]>.
>
> 219 tests, 1469 assertions, 2 failures, 0 errors
> rake aborted!
>
>
> So it at least the behavior isn't the same.

r35187 reverted the original version, and r35188 added a new one. It passes the
swig-rb tests locally for me.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1019584
Received on 2009-01-12 18:32:13 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.