Author: svn-role
Date: Thu May 30 04:00:13 2013
New Revision: 1487716

URL: http://svn.apache.org/r1487716
Log:
Merge the r1479563 group from trunk:

 * r1479563, r1480119, r1487083
   Make svn_client_log5() callable from the Perl bindings.
   Justification:
     1.6 API that wasn't wrapped yet.
   Votes:
     +1: breser, rschupp

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    
subversion/branches/1.8.x/subversion/bindings/swig/include/svn_containers.swg
    subversion/branches/1.8.x/subversion/bindings/swig/include/svn_types.swg
    
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
    
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
    subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Client.pm
    subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Core.pm
    subversion/branches/1.8.x/subversion/bindings/swig/perl/native/t/3client.t
    subversion/branches/1.8.x/subversion/bindings/swig/svn_client.i

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1479563,1480119,1487083

Modified: subversion/branches/1.8.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu May 30 04:00:13 2013
@@ -64,13 +64,6 @@ Approved changes:
 # blocking issues.  If in doubt see this link for details:
 # 
http://subversion.apache.org/docs/community-guide/releasing.html#release-stabilization
 
- * r1479563, r1480119, r1487083
-   Make svn_client_log5() callable from the Perl bindings.
-   Justification:
-     1.6 API that wasn't wrapped yet.
-   Votes:
-     +1: breser, rschupp
-
  * r1477876, r1477891, r1478001, r1479605
    Fix a bug whereby a property conflict description always reported
      'unknown' for the node kind. Add a test which catches that bug.

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/include/svn_containers.swg
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/include/svn_containers.swg?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- 
subversion/branches/1.8.x/subversion/bindings/swig/include/svn_containers.swg 
(original)
+++ 
subversion/branches/1.8.x/subversion/bindings/swig/include/svn_containers.swg 
Thu May 30 04:00:13 2013
@@ -784,6 +784,12 @@
 }
 #endif
 
+#ifdef SWIGPERL
+%typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
+  $1 = svn_swig_pl_array_to_apr_array_revision_range($input, _global_pool);
+}
+#endif
+
 #ifdef SWIGRUBY
 %typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
   $1 = svn_swig_rb_array_to_apr_array_revision_range($input, _global_pool);

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/include/svn_types.swg
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/include/svn_types.swg?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/bindings/swig/include/svn_types.swg 
(original)
+++ subversion/branches/1.8.x/subversion/bindings/swig/include/svn_types.swg 
Thu May 30 04:00:13 2013
@@ -1173,7 +1173,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 */
 #ifdef SWIGPERL
 %typemap(in) svn_opt_revision_t * (svn_opt_revision_t rev) {
-    $1 = svn_swig_pl_set_revision(&rev, $input);
+  $1 = svn_swig_pl_set_revision(&rev, $input, TRUE);
 }
 #endif
 

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
 (original)
+++ 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
 Thu May 30 04:00:13 2013
@@ -106,6 +106,63 @@ static void *convert_pl_svn_string_t(SV 
     return (void *)result;
 }
 
+/* Convert a revision range and return a svn_opt_revision_range_t*.
+ * Value can be:
+ * - a _p_svn_opt_revision_range_t object
+ * - a reference to a two-element array, [start, end],
+ *   where start and end is anything accepted by svn_swig_pl_set_revision
+ * If value is not acceptable and *(svn_boolean_t *)ctx is FALSE,
+ * convert_pl_revision_range returns NULL, otherwise it croak()s.
+ */
+static void *convert_pl_revision_range(SV *value, void *ctx, apr_pool_t *pool)
+{
+    svn_boolean_t croak_on_error = *(svn_boolean_t *)ctx;
+
+    if (sv_isobject(value) && sv_derived_from(value, 
"_p_svn_opt_revision_range_t")) {
+        svn_opt_revision_range_t *range;
+        /* this will assign to range */
+        SWIG_ConvertPtr(value, (void **)&range, 
_SWIG_TYPE("svn_opt_revision_range_t *"), 0);
+        return range;
+    } 
+
+    if (SvROK(value) 
+        && SvTYPE(SvRV(value)) == SVt_PVAV
+        && av_len((AV *)SvRV(value)) == 1) {    
+        /* value is a two-element ARRAY */
+        AV* array = (AV *)SvRV(value);
+        svn_opt_revision_t temp_start, temp_end;
+        svn_opt_revision_t *start, *end;
+        svn_opt_revision_range_t *range;
+
+        /* Note: Due to how svn_swig_pl_set_revision works,
+         * either the passed in svn_opt_revision_t is modified
+         * (and the original pointer returned) or a different pointer 
+         * is returned. svn_swig_pl_set_revision may return NULL
+         * only if croak_on_error is FALSE.
+         */
+        start = svn_swig_pl_set_revision(&temp_start, 
+                                         *av_fetch(array, 0, 0), 
croak_on_error);
+        if (start == NULL)
+            return NULL;
+        end = svn_swig_pl_set_revision(&temp_end, 
+                                       *av_fetch(array, 1, 0), croak_on_error);
+        if (end == NULL)
+            return NULL;
+
+        /* allocate a new range and copy in start and end fields */
+        range = apr_palloc(pool, sizeof(*range));
+        range->start = *start;
+        range->end = *end;
+        return range;
+    } 
+
+    if (croak_on_error)
+        croak("unknown revision range: "
+              "must be an array of length 2 whose elements are acceptable "
+              "as opt_revision_t or a _p_svn_opt_revision_range_t object");
+    return NULL;
+}
+
 /* perl -> c hash convertors */
 static apr_hash_t *svn_swig_pl_to_hash(SV *source,
                                        pl_element_converter_t cv,
@@ -217,6 +274,42 @@ const apr_array_header_t *svn_swig_pl_ob
                               tinfo, pool);
 }
 
+/* Convert a single revision range or an array of revisions ranges
+ * Note: We can't simply use svn_swig_pl_to_array() as is, since 
+ * it immediatley checks whether source is an array reference and then
+ * proceeds to treat this as the "array of ..." case. But a revision range
+ * may be specified as a (two-element) array. Hence we first try to
+ * convert source as a single revision range. Failing that and if it's
+ * an array we then call svn_swig_pl_to_array(). Otherwise we croak().
+ */
+const apr_array_header_t *svn_swig_pl_array_to_apr_array_revision_range(
+        SV *source, apr_pool_t *pool)
+{
+    svn_boolean_t croak_on_error = FALSE;
+    svn_opt_revision_range_t *range;
+
+    if (range = convert_pl_revision_range(source, &croak_on_error, pool)) {
+        apr_array_header_t *temp = apr_array_make(pool, 1, 
+                                                  
sizeof(svn_opt_revision_range_t *));
+        temp->nelts = 1;
+        APR_ARRAY_IDX(temp, 0, svn_opt_revision_range_t *) = range;
+        return temp;
+    }
+
+    if (SvROK(source) && SvTYPE(SvRV(source)) == SVt_PVAV) {
+        croak_on_error = TRUE;
+        return svn_swig_pl_to_array(source, convert_pl_revision_range, 
+                                    &croak_on_error, pool);
+    }
+
+    croak("must pass a single revision range or a reference to an array of 
revision ranges");
+
+    /* This return is actually unreachable because of the croak above,
+     * however, Visual Studio's compiler doesn't like if all paths don't have
+     * a return and errors out otherwise. */ 
+    return NULL;
+}
+
 /* element convertors for c -> perl */
 typedef SV *(*element_converter_t)(void *value, void *ctx);
 
@@ -329,8 +422,13 @@ SV *svn_swig_pl_revnums_to_list(const ap
 }
 
 /* perl -> c svn_opt_revision_t conversion */
-svn_opt_revision_t *svn_swig_pl_set_revision(svn_opt_revision_t *rev, SV 
*source)
+svn_opt_revision_t *svn_swig_pl_set_revision(svn_opt_revision_t *rev, 
+                                             SV *source, 
+                                             svn_boolean_t croak_on_error)
 {
+#define maybe_croak(argv) do { if (croak_on_error) croak argv; \
+                               else return NULL; } while (0)
+
     if (source == NULL || source == &PL_sv_undef || !SvOK(source)) {
         rev->kind = svn_opt_revision_unspecified;
     }
@@ -361,33 +459,34 @@ svn_opt_revision_t *svn_swig_pl_set_revi
 
             char *end = strchr(input,'}');
             if (!end)
-                croak("unknown opt_revision_t string \"%s\": "
-                      "missing closing brace for \"{DATE}\"", input);
+                maybe_croak(("unknown opt_revision_t string \"%s\": "
+                             "missing closing brace for \"{DATE}\"", input));
             *end = '\0';
             err = svn_parse_date (&matched, &tm, input + 1, apr_time_now(),
                                   svn_swig_pl_make_pool ((SV *)NULL));
             if (err) {
                 svn_error_clear (err);
-                croak("unknown opt_revision_t string \"{%s}\": "
-                      "internal svn_parse_date error", input + 1);
+                maybe_croak(("unknown opt_revision_t string \"{%s}\": "
+                             "internal svn_parse_date error", input + 1));
             }
             if (!matched)
-                croak("unknown opt_revision_t string \"{%s}\": "
-                      "svn_parse_date failed to parse it", input + 1);
+                maybe_croak(("unknown opt_revision_t string \"{%s}\": "
+                             "svn_parse_date failed to parse it", input + 1));
 
             rev->kind = svn_opt_revision_date;
             rev->value.date = tm;
         } else
-            croak("unknown opt_revision_t string \"%s\": must be one of "
-                  "\"BASE\", \"HEAD\", \"WORKING\", \"COMMITTED\", "
-                  "\"PREV\" or a \"{DATE}\"", input);
+            maybe_croak(("unknown opt_revision_t string \"%s\": must be one of 
"
+                         "\"BASE\", \"HEAD\", \"WORKING\", \"COMMITTED\", "
+                         "\"PREV\" or a \"{DATE}\"", input));
     } else
-        croak("unknown opt_revision_t type: must be undef, a number, "
-              "a string (one of \"BASE\", \"HEAD\", \"WORKING\", "
-              "\"COMMITTED\", \"PREV\" or a \"{DATE}\") "
-              "or a _p_svn_opt_revision_t object");
+        maybe_croak(("unknown opt_revision_t type: must be undef, a number, "
+                     "a string (one of \"BASE\", \"HEAD\", \"WORKING\", "
+                     "\"COMMITTED\", \"PREV\" or a \"{DATE}\") "
+                     "or a _p_svn_opt_revision_t object"));
 
     return rev;
+#undef maybe_croak
 }
 
 /* put the va_arg in stack and invoke caller_func with func.

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
 (original)
+++ 
subversion/branches/1.8.x/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
 Thu May 30 04:00:13 2013
@@ -97,6 +97,8 @@ apr_hash_t *svn_swig_pl_hash_to_prophash
 const apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
                                                     swig_type_info *tinfo,
                                                     apr_pool_t *pool);
+const apr_array_header_t *svn_swig_pl_array_to_apr_array_revision_range(
+        SV *source, apr_pool_t *pool);
 
 SV *svn_swig_pl_array_to_list(const apr_array_header_t *array);
 /* Formerly used by pre-1.0 APIs. Now unused
@@ -107,7 +109,9 @@ SV *svn_swig_pl_convert_array(const apr_
 
 SV *svn_swig_pl_revnums_to_list(const apr_array_header_t *array);
 
-svn_opt_revision_t *svn_swig_pl_set_revision(svn_opt_revision_t *rev, SV 
*source);
+svn_opt_revision_t *svn_swig_pl_set_revision(svn_opt_revision_t *rev, 
+                                             SV *source,
+                                             svn_boolean_t croak_on_error);
 
 /* thunked log_message receiver function.  */
 svn_error_t * svn_swig_pl_thunk_log_receiver(void *baton,

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Client.pm
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Client.pm?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Client.pm 
(original)
+++ subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Client.pm 
Thu May 30 04:00:13 2013
@@ -12,8 +12,8 @@ BEGIN {
             checkout2 checkout update4 update3 update2 update switch2 switch
             add4 add3 add2 add mkdir4 mkdir3 mkdir2 mkdir delete3 delete2
             delete import3 import2 import commit4 commit3 commit2
-            commit status4 status3 status2 status log4 log3 log2 log blame4
-            blame3 blame2 blame diff4 diff3 diff2 diff diff_peg4
+            commit status4 status3 status2 status log5 log4 log3 log2 log 
+            blame4 blame3 blame2 blame diff4 diff3 diff2 diff diff_peg4
             diff_peg3 diff_peg2 diff_peg diff_summarize2
             diff_summarize diff_summarize_peg2 diff_summarize_peg
             merge3 merge2 merge merge_peg3 merge_peg2 merge_peg

Modified: subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Core.pm
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Core.pm?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Core.pm 
(original)
+++ subversion/branches/1.8.x/subversion/bindings/swig/perl/native/Core.pm Thu 
May 30 04:00:13 2013
@@ -703,6 +703,8 @@ use SVN::Base qw(Core svn_log_changed_pa
 
 =head2 svn_log_changed_path2_t
 
+An object to represent a path that changed for a log entry.
+
 =over 4
 
 =item $lcp-E<gt>action()
@@ -825,11 +827,56 @@ use SVN::Base qw(Core svn_opt_revision_t
 
 =head2 svn_opt_revision_t
 
+A revision, specified in one of C<SVN::Core::opt_revision_*> ways.
+
+=over 4
+
+=item $rev-E<gt>kind()
+
+An enum denoting how the revision C<$rev> was specified.  One of 
+C<$SVN::Core::opt_revision_unspecified>,
+C<$SVN::Core::opt_revision_number>,
+C<$SVN::Core::opt_revision_date>,
+C<$SVN::Core::opt_revision_committed>,
+C<$SVN::Core::opt_revision_previous>,
+C<$SVN::Core::opt_revision_base>,
+C<$SVN::Core::opt_revision_working>
+or C<$SVN::Core::opt_revision_head>.
+
+=item $rev-E<gt>value()
+
+Extra data about the revision. Only relevant if C<$rev-E<gt>kind> is
+C<$SVN::Core::opt_revision_number> (where it contains the revision number)
+or C<$SVN::Core::opt_revision_date> (where it contains a date).
+
+=back
+
 =cut
 
 package _p_svn_opt_revision_value_t;
 use SVN::Base qw(Core svn_opt_revision_value_t_);
 
+package _p_svn_opt_revision_range_t;
+use SVN::Base qw(Core svn_opt_revision_range_t_);
+
+=head2 svn_opt_revision_range_t
+
+An object representing a range of revisions.
+
+=over 4
+
+=item $range-E<gt>start()
+
+The first revision in the range, a C<_p_svn_opt_revision_t> object.
+
+=item $range-E<gt>end()
+
+The last revision in the range, a C<_p_svn_opt_revision_t> object.
+
+=back
+
+=cut
+
 package _p_svn_config_t;
 use SVN::Base qw(Core svn_config_);
 

Modified: 
subversion/branches/1.8.x/subversion/bindings/swig/perl/native/t/3client.t
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/perl/native/t/3client.t?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/bindings/swig/perl/native/t/3client.t 
(original)
+++ subversion/branches/1.8.x/subversion/bindings/swig/perl/native/t/3client.t 
Thu May 30 04:00:13 2013
@@ -20,7 +20,7 @@
 #
 #
 
-use Test::More tests => 262;
+use Test::More tests => 297;
 use strict;
 
 # shut up about variables that are only used once.
@@ -382,7 +382,7 @@ sub test_log_message_receiver {
   isa_ok($pool,'_p_apr_pool_t',
          'pool param is _p_apr_pool_t');
 }
-
+ 
 # TEST  log range $current_rev:$current_rev
 is($ctx->log("$reposurl/dir1/new",$current_rev,$current_rev,1,0,
              \&test_log_message_receiver), 
@@ -410,35 +410,56 @@ $ctx->log3([ $reposurl, @new_paths ],
 });
 
 sub get_full_log {
-    my ($rev) = @_;
+    my ($start, $end) = @_;
     my @log;
-    $ctx->log($reposurl, $rev, 0, 0, 0, sub { 
-        my (undef, $revision, $author, $date, $msg, undef) = @_; 
-        push @log, [ $revision, $author, $date, $msg ];
+    $ctx->log($reposurl, $start, $end, 1, 0, sub { 
+        my ($changed_paths, $revision, $author, $date, $msg, undef) = @_; 
+        # "unpack" the values of the $changed_paths hash 
+        # (_p_svn_log_changed_path_t objects) so that
+        # we can use is_deeply() to compare results
+        my %hash;
+        while (my ($path, $changed) = each %$changed_paths) {
+            foreach (qw( action copyfrom_path copyfrom_rev )) {
+                $hash{$path}{$_} = $changed->$_()
+            }
+        }
+        push @log, [ \%hash, $revision, $author, $date, $msg ];
     });
     return \@log;
 }
 
 # TEST
+my $full_log = get_full_log('HEAD',1);
+is(scalar @$full_log, $current_rev, "history up to 'HEAD'");
+
+# TEST
 my $opt_revision_head = SVN::_Core::new_svn_opt_revision_t();
 $opt_revision_head->kind($SVN::Core::opt_revision_head);
-is_deeply(get_full_log($opt_revision_head),      # got
-          get_full_log('HEAD'));                 # expected
+is_deeply(get_full_log($opt_revision_head,1),   # got
+          $full_log,                            # expected
+          "history up to svn_opt_revision_t of kind head");
+
+# TEST
+is_deeply(get_full_log($current_rev,1),         # got
+          $full_log,                            # expected
+          "history up to number $current_rev");
+
 # TEST
 my $opt_revision_number = SVN::_Core::new_svn_opt_revision_t();
 $opt_revision_number->kind($SVN::Core::opt_revision_number);
 $opt_revision_number->value->number($current_rev);
-is_deeply(get_full_log($opt_revision_number),    # got
-          get_full_log($current_rev));           # expected
+is_deeply(get_full_log($opt_revision_number,1), # got
+          $full_log,                            # expected
+          "history up to svn_opt_revision_t of kind number and value 
$current_rev");
 
 sub test_log_entry_receiver {
   my ($log_entry,$pool) = @_;
   # TEST
   isa_ok($log_entry, '_p_svn_log_entry_t',
-         'log_entry param is a _p_svn_log_entry_t');
+         'log_entry param');
   # TEST
   isa_ok($pool,'_p_apr_pool_t',
-         'pool param is _p_apr_pool_t');
+         'pool param');
   # TEST
   is($log_entry->revision,$current_rev,
      'log_entry->revision matches current rev');
@@ -446,7 +467,7 @@ sub test_log_entry_receiver {
   my $revprops = $log_entry->revprops;
   # TEST
   isa_ok($revprops,'HASH',
-         'log_entry->revprops is a HASH');
+         'log_entry->revprops');
   # TEST
   is($revprops->{"svn:author"},$username,
      'svn:author revprop matches expected username');
@@ -459,11 +480,11 @@ sub test_log_entry_receiver {
   my $changed_paths = $log_entry->changed_paths2;
   # TEST
   isa_ok($changed_paths,'HASH',
-         'log_entry->changed_paths2 is a HASH');
+         'log_entry->changed_paths2');
   # TEST
   isa_ok($changed_paths->{'/dir1/new'},
          '_p_svn_log_changed_path2_t',
-         'Hash value is a _p_svn_log_changed_path2_t');
+         'log_entry->changed_paths2 value');
   # TEST
   is($changed_paths->{'/dir1/new'}->action(),'A',
      'action returns A for add');
@@ -495,6 +516,86 @@ is($ctx->log4("$reposurl/dir1/new",
    'log4 returns undef');
 
 # TEST
+is($ctx->log5("$reposurl/dir1/new",
+              'HEAD',[$current_rev,0],1, # peg rev, rev ranges, limit
+              1,1,0, # discover_changed_paths, strict_node_history, 
include_merged_revisions
+              undef, # revprops
+              \&test_log_entry_receiver), 
+   undef,
+   'log5 returns undef');
+
+# test the different forms to specify revision ranges
+sub get_revs {
+    my ($rev_ranges) = @_;
+    my @revs;
+    $ctx->log5($reposurl, 'HEAD', $rev_ranges, 0, 0, 0, 0, undef, sub { 
+        my ($log_entry,$pool) = @_;
+        push @revs, $log_entry->revision;
+    });
+    return \@revs;
+}
+
+my $top = SVN::_Core::new_svn_opt_revision_range_t();
+$top->start('HEAD');
+$top->end('HEAD');
+my $bottom = SVN::_Core::new_svn_opt_revision_range_t();
+$bottom->start(1);
+$bottom->end($current_rev-1);
+
+# TEST
+is_deeply(get_revs($top),   
+          [ $current_rev ], 'single svn_opt_revision_range_t');
+# TEST
+is_deeply(get_revs([$top]), 
+          [ $current_rev ], 'list of svn_opt_revision_range_t');
+# TEST
+is_deeply(get_revs(['HEAD', 'HEAD']),
+          [ $current_rev ], 'single [start, end]');
+# TEST
+is_deeply(get_revs([['HEAD', 'HEAD']]),
+          [ $current_rev ], 'list of [start, end]');
+# TEST
+is_deeply(get_revs([$current_rev, $current_rev]),
+          [ $current_rev ], 'single [start, end]');
+# TEST
+is_deeply(get_revs([[$current_rev, $current_rev]]),
+          [ $current_rev ], 'list of [start, end]');
+# TEST
+is_deeply(get_revs([1, 'HEAD']),
+          [ 1..$current_rev ], 'single [start, end]');
+# TEST
+is_deeply(get_revs([[1, 'HEAD']]),
+          [ 1..$current_rev ], 'list of [start, end]');
+# TEST
+is_deeply(get_revs([1, $opt_revision_head]),
+          [ 1..$current_rev ], 'single [start, end]');
+# TEST
+is_deeply(get_revs([[1, $opt_revision_head]]),
+          [ 1..$current_rev ], 'list of [start, end]');
+# TEST
+is_deeply(get_revs($bottom), 
+          [ 1..$current_rev-1 ], 'single svn_opt_revision_range_t');
+# TEST
+is_deeply(get_revs([$bottom]), 
+          [ 1..$current_rev-1 ], 'list of svn_opt_revision_range_t');
+# TEST
+is_deeply(get_revs([1, $current_rev-1]),
+          [ 1..$current_rev-1 ], 'single [start, end]');
+# TEST
+is_deeply(get_revs([[1, $current_rev-1]]),
+          [ 1..$current_rev-1 ], 'list of [start, end]');
+# TEST
+is_deeply(get_revs([[1, $current_rev-1], $top]),
+          [ 1..$current_rev ], 'mixed list of ranges');
+# TEST
+is_deeply(get_revs([$bottom, ['HEAD', 'HEAD']]),
+          [ 1..$current_rev ], 'mixed list of ranges');
+# TEST
+is_deeply(get_revs([$bottom, $top]),
+          [ 1..$current_rev ], 'mixed list of ranges');
+          
+
+# TEST
 is($ctx->update($wcpath,'HEAD',1),$current_rev,
    'Return from update is the current rev');
 
@@ -546,8 +647,7 @@ is($ctx->status($wcpath, undef, sub {
                                          ' the correct path.');
                                       # TEST
                                       isa_ok($wc_status,'_p_svn_wc_status_t',
-                                             'wc_stats param is a' .
-                                             ' _p_svn_wc_status_t');
+                                             'wc_stats param');
                                       # TEST
                                       is($wc_status->text_status(),
                                          $SVN::Wc::Status::normal,
@@ -868,7 +968,7 @@ my($pl) = $ctx->proplist($reposurl,$curr
 isa_ok($pl,'ARRAY','proplist returns an ARRAY');
 # TEST
 isa_ok($pl->[0], '_p_svn_client_proplist_item_t',
-       'array element is a _p_svn_client_proplist_item_t');
+       'proplist array element');
 # TEST
 is($pl->[0]->node_name(),"$reposurl/dir1",
    'node_name is the expected value');
@@ -959,8 +1059,7 @@ is($ctx->blame("$reposurl/foo",'HEAD','H
                                               }
                                               # TEST
                                               isa_ok($pool,'_p_apr_pool_t',
-                                                     'pool param is ' .
-                                                     '_p_apr_pool_t');
+                                                     'pool param');
                                             }),
    undef,
    'blame returns undef');
@@ -987,7 +1086,7 @@ my ($dirents) = $ctx->ls($reposurl,"$cur
 isa_ok($dirents, 'HASH','ls returns a HASH');
 # TEST
 isa_ok($dirents->{'dir1'},'_p_svn_dirent_t',
-       'hash value is a _p_svn_dirent_t');
+       'dirents hash value');
 # TEST
 is($dirents->{'dir1'}->kind(),$SVN::Core::node_dir,
    'kind() returns a dir node');

Modified: subversion/branches/1.8.x/subversion/bindings/swig/svn_client.i
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/bindings/swig/svn_client.i?rev=1487716&r1=1487715&r2=1487716&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/1.8.x/subversion/bindings/swig/svn_client.i Thu May 30 
04:00:13 2013
@@ -64,12 +64,10 @@
 }
 #endif
 
-#if defined(SWIGRUBY) || defined(SWIGPYTHON)
 %apply apr_array_header_t *REVISION_RANGE_LIST {
   const apr_array_header_t *ranges_to_merge,
   const apr_array_header_t *revision_ranges
 }
-#endif
 
 #ifdef SWIGRUBY
 %apply const char *NOT_NULL {


Reply via email to