You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/15 10:52:18 UTC

svn commit: r1532250 [7/37] - in /subversion/branches/cache-server: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/emacs/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/ser...

Modified: subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Tue Oct 15 08:52:06 2013
@@ -29,16 +29,20 @@
 #include <perl.h>
 #include <XSUB.h>
 
+/* Perl defines a _ macro, but SVN uses it for translations.
+ * So undefine _ after including the Perl headers. */
+#undef _
+
 #include <stdarg.h>
 #ifdef WIN32
 #include <io.h>
 #endif
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_opt.h"
 #include "svn_time.h"
-#include "svn_private_config.h"
 
 #include "swig_perl_external_runtime.swg"
 
@@ -50,7 +54,7 @@ static HV *type_cache = NULL;
 #define _SWIG_TYPE(name) _swig_perl_type_query(name, 0)
 #define POOLINFO         _SWIG_TYPE("apr_pool_t *")
 
-static swig_type_info *_swig_perl_type_query(const char *typename, U32 klen)
+static swig_type_info *_swig_perl_type_query(const char *type_name, U32 klen)
 {
     SV **type_info;
     swig_type_info *tinfo;
@@ -59,13 +63,13 @@ static swig_type_info *_swig_perl_type_q
       type_cache = newHV();
 
     if (klen == 0)
-      klen = strlen(typename);
+      klen = strlen(type_name);
 
-    if ((type_info = hv_fetch(type_cache, typename, klen, 0)))
+    if ((type_info = hv_fetch(type_cache, type_name, klen, 0)))
       return (swig_type_info *) (SvIV(*type_info));
 
-    tinfo = SWIG_TypeQuery(typename);
-    hv_store(type_cache, typename, klen, newSViv((IV)tinfo), 0);
+    tinfo = SWIG_TypeQuery(type_name);
+    hv_store(type_cache, type_name, klen, newSViv((IV)tinfo), 0);
 
     return tinfo;
 }
@@ -98,6 +102,71 @@ static void *convert_pl_revnum_t(SV *val
   return (void *)result;
 }
 
+static void *convert_pl_svn_string_t(SV *value, void *dummy, apr_pool_t *pool)
+{
+    svn_string_t *result = apr_palloc(pool, sizeof(svn_string_t));
+    /* just the in typemap for svn_string_t */
+    result->data = SvPV(value, result->len);
+    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,
@@ -109,16 +178,16 @@ static apr_hash_t *svn_swig_pl_to_hash(S
     I32 cnt, retlen;
 
     if (!(source && SvROK(source) && SvTYPE(SvRV(source)) == SVt_PVHV)) {
-	return NULL;
+        return NULL;
     }
 
     hash = apr_hash_make(pool);
     h = (HV *)SvRV(source);
     cnt = hv_iterinit(h);
     while (cnt--) {
-	SV* item = hv_iternextsv(h, &key, &retlen);
-	void *val = cv(item, ctx, pool);
-	svn_hash_sets(hash, key, val);
+        SV* item = hv_iternextsv(h, &key, &retlen);
+        void *val = cv(item, ctx, pool);
+        svn_hash_sets(hash, apr_pstrmemdup(pool, key, retlen), val);
     }
 
     return hash;
@@ -156,11 +225,15 @@ apr_hash_t *svn_swig_pl_objs_to_hash_of_
                              NULL, pool);
 }
 
+apr_hash_t *svn_swig_pl_hash_to_prophash(SV *source, apr_pool_t *pool)
+{
+  return svn_swig_pl_to_hash(source, convert_pl_svn_string_t, NULL, pool);
+}
+
 /* perl -> c array convertors */
-static const
-apr_array_header_t *svn_swig_pl_to_array(SV *source,
-                                         pl_element_converter_t cv,
-                                         void *ctx, apr_pool_t *pool)
+static apr_array_header_t *svn_swig_pl_to_array(SV *source,
+                                                pl_element_converter_t cv,
+                                                void *ctx, apr_pool_t *pool)
 {
     int targlen;
     apr_array_header_t *temp;
@@ -189,21 +262,57 @@ apr_array_header_t *svn_swig_pl_to_array
     return temp;
 }
 
-const apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
+apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
                                                        apr_pool_t *pool)
 {
   return svn_swig_pl_to_array(source, convert_pl_string, NULL, pool);
 }
 
-const apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
-						    swig_type_info *tinfo,
-						    apr_pool_t *pool)
+apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
+                                              swig_type_info *tinfo,
+                                              apr_pool_t *pool)
 {
   return svn_swig_pl_to_array(source,
                               (pl_element_converter_t)convert_pl_obj,
                               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().
+ */
+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);
 
@@ -246,17 +355,17 @@ static SV *convert_hash(apr_hash_t *hash
 
     hv = newHV();
     for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
-	const char *key;
-	void *val;
-	int klen;
-	SV *obj;
-
-	apr_hash_this(hi, (void *)&key, NULL, &val);
-	klen = strlen(key);
-
-	obj = converter_func(val, ctx);
-	hv_store(hv, (const char *)key, klen, obj, 0);
-	SvREFCNT_inc(obj);
+        const char *key;
+        void *val;
+        int klen;
+        SV *obj;
+
+        apr_hash_this(hi, (void *)&key, NULL, &val);
+        klen = strlen(key);
+
+        obj = converter_func(val, ctx);
+        hv_store(hv, (const char *)key, klen, obj, 0);
+        SvREFCNT_inc(obj);
     }
 
     return sv_2mortal(newRV_noinc((SV*)hv));
@@ -276,16 +385,16 @@ SV *svn_swig_pl_convert_hash(apr_hash_t 
 
 /* c -> perl array convertors */
 static SV *convert_array(const apr_array_header_t *array,
-		  element_converter_t converter_func, void *ctx)
+                  element_converter_t converter_func, void *ctx)
 {
     AV *list = newAV();
     int i;
 
     for (i = 0; i < array->nelts; ++i) {
-	void *element = APR_ARRAY_IDX(array, i, void *);
-	SV *item = converter_func(element, ctx);
-	av_push(list, item);
-	SvREFCNT_inc(item);
+        void *element = APR_ARRAY_IDX(array, i, void *);
+        SV *item = converter_func(element, ctx);
+        av_push(list, item);
+        SvREFCNT_inc(item);
     }
     return sv_2mortal(newRV_noinc((SV*)list));
 }
@@ -316,8 +425,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;
     }
@@ -348,33 +462,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.
@@ -417,85 +532,85 @@ svn_error_t *svn_swig_pl_callback_thunk(
 
     va_start(ap, fmt);
     while (*fp) {
-	char *c;
-	void *o;
-	SV *obj;
-	swig_type_info *t;
-	svn_string_t *str;
+        char *c;
+        void *o;
+        SV *obj;
+        swig_type_info *t;
+        svn_string_t *str;
 
-	switch (*fp++) {
-	case 'O':
+        switch (*fp++) {
+        case 'O':
           XPUSHs(va_arg(ap, SV *));
-	    break;
-	case 'S': /* swig object */
+            break;
+        case 'S': /* swig object */
           o = va_arg(ap, void *);
           t = va_arg(ap, swig_type_info *);
 
           obj = sv_newmortal();
           SWIG_MakePtr(obj, o, t, 0);
-	    XPUSHs(obj);
-	    break;
+            XPUSHs(obj);
+            break;
 
-	case 's': /* string */
+        case 's': /* string */
           c = va_arg(ap, char *);
-	    XPUSHs(c ? sv_2mortal(newSVpv(c, 0)) : &PL_sv_undef);
-	    break;
+            XPUSHs(c ? sv_2mortal(newSVpv(c, 0)) : &PL_sv_undef);
+            break;
 
-	case 'i': /* apr_int32_t */
-	    XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_int32_t))));
-	    break;
+        case 'i': /* apr_int32_t */
+            XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_int32_t))));
+            break;
 
-	case 'u': /* apr_uint32_t */
+        case 'u': /* apr_uint32_t */
             XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_uint32_t))));
-	    break;
+            break;
 
-	case 'r': /* svn_revnum_t */
-	    XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_revnum_t))));
-	    break;
-
-	case 'b': /* svn_boolean_t */
-	    XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_boolean_t))));
-	    break;
-
-	case 't': /* svn_string_t */
-	    str = va_arg(ap, svn_string_t *);
-	    XPUSHs(str ? sv_2mortal(newSVpv(str->data, str->len))
-	           : &PL_sv_undef);
-	    break;
-
-	case 'L': /* apr_int64_t */
-	    /* Pass into perl as a string because some implementations may
-	     * not be able to handle a 64-bit int.  If it's too long to
-	     * fit in Perl's interal IV size then perl will only make
-	     * it available as a string.  If not then perl will convert
-	     * it to an IV for us.  So this handles the problem gracefully */
-	    c = malloc(30);
-	    snprintf(c,30,"%" APR_INT64_T_FMT,va_arg(ap, apr_int64_t));
-	    XPUSHs(sv_2mortal(newSVpv(c, 0)));
-	    free(c);
-	    break;
-
-	case 'U': /* apr_uint64_t */
-	    c = malloc(30);
-	    snprintf(c,30,"%" APR_UINT64_T_FMT,va_arg(ap, apr_uint64_t));
-	    XPUSHs(sv_2mortal(newSVpv(c, 0)));
-	    free(c);
-	    break;
-
-	case 'z': /* apr_size_t */
-	    if (sizeof(apr_size_t) >= 8)
-	      {
-	        c = malloc(30);
-	        snprintf(c,30,"%" APR_SIZE_T_FMT,va_arg(ap, apr_size_t));
-	        XPUSHs(sv_2mortal(newSVpv(c, 0)));
-	        free(c);
-	      }
-	    else
-	      {
-	        XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_size_t))));
-	      }
-	     break;
-	}
+        case 'r': /* svn_revnum_t */
+            XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_revnum_t))));
+            break;
+
+        case 'b': /* svn_boolean_t */
+            XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_boolean_t))));
+            break;
+
+        case 't': /* svn_string_t */
+            str = va_arg(ap, svn_string_t *);
+            XPUSHs(str ? sv_2mortal(newSVpv(str->data, str->len))
+                   : &PL_sv_undef);
+            break;
+
+        case 'L': /* apr_int64_t */
+            /* Pass into perl as a string because some implementations may
+             * not be able to handle a 64-bit int.  If it's too long to
+             * fit in Perl's interal IV size then perl will only make
+             * it available as a string.  If not then perl will convert
+             * it to an IV for us.  So this handles the problem gracefully */
+            c = malloc(30);
+            snprintf(c,30,"%" APR_INT64_T_FMT,va_arg(ap, apr_int64_t));
+            XPUSHs(sv_2mortal(newSVpv(c, 0)));
+            free(c);
+            break;
+
+        case 'U': /* apr_uint64_t */
+            c = malloc(30);
+            snprintf(c,30,"%" APR_UINT64_T_FMT,va_arg(ap, apr_uint64_t));
+            XPUSHs(sv_2mortal(newSVpv(c, 0)));
+            free(c);
+            break;
+
+        case 'z': /* apr_size_t */
+            if (sizeof(apr_size_t) >= 8)
+              {
+                c = malloc(30);
+                snprintf(c,30,"%" APR_SIZE_T_FMT,va_arg(ap, apr_size_t));
+                XPUSHs(sv_2mortal(newSVpv(c, 0)));
+                free(c);
+              }
+            else
+              {
+                XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_size_t))));
+              }
+             break;
+        }
     }
 
     va_end(ap);
@@ -504,23 +619,23 @@ svn_error_t *svn_swig_pl_callback_thunk(
     switch (caller_func) {
     case CALL_SV:
       count = call_sv(func, call_flags );
-	break;
+        break;
     case CALL_METHOD:
       count = call_method(func, call_flags );
-	break;
+        break;
     default:
       croak("unkonwn calling type");
-	break;
+        break;
     }
     SPAGAIN ;
 
     if (((call_flags & G_SCALAR) && count != 1) ||
-	((call_flags & G_VOID) && count != 0))
+        ((call_flags & G_VOID) && count != 0))
       croak("Wrong number of returns");
 
     if (result) {
-	*result = POPs;
-	SvREFCNT_inc(*result);
+        *result = POPs;
+        SvREFCNT_inc(*result);
     }
 
     PUTBACK;
@@ -673,8 +788,8 @@ static svn_error_t * thunk_close_directo
 }
 
 static svn_error_t * thunk_absent_directory(const char *path,
-					    void *parent_baton,
-					    apr_pool_t *pool)
+                                            void *parent_baton,
+                                            apr_pool_t *pool)
 {
     item_baton *ib = parent_baton;
 
@@ -736,8 +851,8 @@ static svn_error_t * thunk_window_handle
         SvREFCNT_dec(handler);
     }
     else {
-	swig_type_info *tinfo = _SWIG_TYPE("svn_txdelta_window_t *");
-	SVN_ERR(svn_swig_pl_callback_thunk(CALL_SV, handler,
+        swig_type_info *tinfo = _SWIG_TYPE("svn_txdelta_window_t *");
+        SVN_ERR(svn_swig_pl_callback_thunk(CALL_SV, handler,
                                            NULL, "S", window, tinfo));
     }
 
@@ -759,30 +874,30 @@ thunk_apply_textdelta(void *file_baton,
                                        "OOsS", ib->editor, ib->baton,
                                        base_checksum, pool, POOLINFO));
     if (SvOK(result)) {
-	if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
-	    swig_type_info *handler_info =
+        if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
+            swig_type_info *handler_info =
               _SWIG_TYPE("svn_txdelta_window_handler_t");
             swig_type_info *void_info = _SWIG_TYPE("void *");
-	    AV *array = (AV *)SvRV(result);
+            AV *array = (AV *)SvRV(result);
 
-	    if (SWIG_ConvertPtr(*av_fetch(array, 0, 0),
-				(void **)handler, handler_info,0) < 0) {
-		croak("Unable to convert from SWIG Type");
-	    }
-	    if (SWIG_ConvertPtr(*av_fetch(array, 1, 0),
-				h_baton, void_info,0) < 0) {
-		croak("Unable to convert from SWIG Type ");
-	    }
+            if (SWIG_ConvertPtr(*av_fetch(array, 0, 0),
+                                (void **)handler, handler_info,0) < 0) {
+                croak("Unable to convert from SWIG Type");
+            }
+            if (SWIG_ConvertPtr(*av_fetch(array, 1, 0),
+                                h_baton, void_info,0) < 0) {
+                croak("Unable to convert from SWIG Type ");
+            }
             SvREFCNT_dec(result);
-	}
-	else {
-	    *handler = thunk_window_handler;
-	    *h_baton = result;
-	}
+        }
+        else {
+            *handler = thunk_window_handler;
+            *h_baton = result;
+        }
     }
     else {
-	*handler = svn_delta_noop_window_handler;
-	*h_baton = NULL;
+        *handler = svn_delta_noop_window_handler;
+        *h_baton = NULL;
     }
 
     return SVN_NO_ERROR;
@@ -820,8 +935,8 @@ static svn_error_t * thunk_close_file(vo
 }
 
 static svn_error_t * thunk_absent_file(const char *path,
-				       void *parent_baton,
-				       apr_pool_t *pool)
+                                       void *parent_baton,
+                                       apr_pool_t *pool)
 {
     item_baton *ib = parent_baton;
 
@@ -847,10 +962,10 @@ static svn_error_t * thunk_abort_edit(vo
 
 
 void
-svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                              void **h_baton,
-                              SV *callback,
-                              apr_pool_t *pool)
+svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+                                void **h_baton,
+                                SV *callback,
+                                apr_pool_t *pool)
 {
     *handler = thunk_window_handler;
     *h_baton = callback;
@@ -858,10 +973,10 @@ svn_delta_wrap_window_handler(svn_txdelt
     svn_swig_pl_hold_ref_in_pool(pool, callback);
 }
 
-void svn_delta_make_editor(svn_delta_editor_t **editor,
-			   void **edit_baton,
-			   SV *perl_editor,
-			   apr_pool_t *pool)
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+                             void **edit_baton,
+                             SV *perl_editor,
+                             apr_pool_t *pool)
 {
   svn_delta_editor_t *thunk_editor = svn_delta_default_editor(pool);
 
@@ -888,18 +1003,18 @@ void svn_delta_make_editor(svn_delta_edi
 }
 
 svn_error_t *svn_swig_pl_thunk_log_receiver(void *baton,
-					    apr_hash_t *changed_paths,
-					    svn_revnum_t rev,
-					    const char *author,
-					    const char *date,
-					    const char *msg,
-					    apr_pool_t *pool)
+                                            apr_hash_t *changed_paths,
+                                            svn_revnum_t rev,
+                                            const char *author,
+                                            const char *date,
+                                            const char *msg,
+                                            apr_pool_t *pool)
 {
     SV *receiver = baton;
     swig_type_info *tinfo = _SWIG_TYPE("svn_log_changed_path_t *");
 
     if (!SvOK(receiver))
-	return SVN_NO_ERROR;
+        return SVN_NO_ERROR;
 
     svn_swig_pl_callback_thunk(CALL_SV,
                                receiver, NULL,
@@ -918,7 +1033,7 @@ svn_error_t *svn_swig_pl_thunk_log_entry
     SV *receiver = baton;
 
     if (!SvOK(receiver))
-	return SVN_NO_ERROR;
+        return SVN_NO_ERROR;
 
     svn_swig_pl_callback_thunk(CALL_SV,
                                receiver, NULL,
@@ -956,7 +1071,7 @@ svn_error_t *svn_swig_pl_thunk_history_f
     SV *func = baton;
 
     if (!SvOK(func))
-	return SVN_NO_ERROR;
+        return SVN_NO_ERROR;
 
     svn_swig_pl_callback_thunk(CALL_SV,
                                func, NULL,
@@ -974,7 +1089,7 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
     SV *func = baton, *result;
 
     if (!SvOK(func))
-	return SVN_NO_ERROR;
+        return SVN_NO_ERROR;
 
     svn_swig_pl_callback_thunk(CALL_SV,
                                func, &result,
@@ -988,12 +1103,12 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
 }
 
 svn_error_t *svn_swig_pl_thunk_commit_callback(svn_revnum_t new_revision,
-					       const char *date,
-					       const char *author,
-					       void *baton)
+                                               const char *date,
+                                               const char *author,
+                                               void *baton)
 {
     if (!SvOK((SV *)baton))
-	return SVN_NO_ERROR;
+        return SVN_NO_ERROR;
 
     svn_swig_pl_callback_thunk(CALL_SV, baton, NULL,
                                "rss", new_revision, date, author);
@@ -1020,8 +1135,8 @@ svn_error_t *svn_swig_pl_thunk_commit_ca
 /* Wrap RA */
 
 static svn_error_t * thunk_open_tmp_file(apr_file_t **fp,
-					 void *callback_baton,
-					 apr_pool_t *pool)
+                                         void *callback_baton,
+                                         apr_pool_t *pool)
 {
     SV *result;
     swig_type_info *tinfo = _SWIG_TYPE("apr_file_t *");
@@ -1030,7 +1145,7 @@ static svn_error_t * thunk_open_tmp_file
                                &result, "OS", callback_baton, pool, POOLINFO);
 
     if (SWIG_ConvertPtr(result, (void *)fp, tinfo,0) < 0) {
-	croak("Unable to convert from SWIG Type");
+        croak("Unable to convert from SWIG Type");
     }
 
     SvREFCNT_dec(result);
@@ -1053,15 +1168,15 @@ svn_error_t *thunk_get_wc_prop(void *bat
 
     /* this is svn_string_t * typemap in */
     if (!SvOK(result) || result == &PL_sv_undef) {
-	*value = NULL;
+        *value = NULL;
     }
     else if (SvPOK(result)) {
         data = SvPV(result, len);
         *value = svn_string_ncreate(data, len, pool);
     }
     else {
-	SvREFCNT_dec(result);
-	croak("not a string");
+        SvREFCNT_dec(result);
+        croak("not a string");
     }
 
     SvREFCNT_dec(result);
@@ -1069,10 +1184,10 @@ svn_error_t *thunk_get_wc_prop(void *bat
 }
 
 
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
-				   void **c_baton,
-				   SV *perl_callbacks,
-				   apr_pool_t *pool)
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+                                        void **c_baton,
+                                        SV *perl_callbacks,
+                                        apr_pool_t *pool)
 {
     SV *auth_baton;
 
@@ -1087,7 +1202,7 @@ svn_error_t *svn_ra_make_callbacks(svn_r
 
     if (SWIG_ConvertPtr(auth_baton,
                         (void **)&(*cb)->auth_baton, _SWIG_TYPE("svn_auth_baton_t *"),0) < 0) {
-	croak("Unable to convert from SWIG Type");
+        croak("Unable to convert from SWIG Type");
     }
     *c_baton = perl_callbacks;
     svn_swig_pl_hold_ref_in_pool(pool, perl_callbacks);
@@ -1241,13 +1356,13 @@ svn_error_t *svn_swig_pl_thunk_ssl_clien
 
 /* Thunked version of svn_wc_notify_func_t callback type */
 void svn_swig_pl_notify_func(void * baton,
-		             const char *path,
-			     svn_wc_notify_action_t action,
-			     svn_node_kind_t kind,
-			     const char *mime_type,
-			     svn_wc_notify_state_t content_state,
-			     svn_wc_notify_state_t prop_state,
-			     svn_revnum_t revision)
+                             const char *path,
+                             svn_wc_notify_action_t action,
+                             svn_node_kind_t kind,
+                             const char *mime_type,
+                             svn_wc_notify_state_t content_state,
+                             svn_wc_notify_state_t prop_state,
+                             svn_revnum_t revision)
 {
     if (!SvOK((SV *)baton)) {
         return;
@@ -1276,7 +1391,7 @@ svn_error_t *svn_swig_pl_get_commit_log_
 
     if (!SvOK((SV *)baton)) {
       *log_msg = apr_pstrdup(pool, "");
-	*tmp_file = NULL;
+        *tmp_file = NULL;
         return SVN_NO_ERROR;
     }
 
@@ -1294,17 +1409,17 @@ svn_error_t *svn_swig_pl_get_commit_log_
         /* client returned undef to us */
         *log_msg = NULL;
     } else if (SvPOK(SvRV(log_msg_sv))) {
-	/* client returned string so get the string and then duplicate
-	 * it using pool memory */
+        /* client returned string so get the string and then duplicate
+         * it using pool memory */
         *log_msg = apr_pstrdup(pool, SvPV_nolen(SvRV(log_msg_sv)));
     } else {
         croak("Invalid value in log_msg reference, must be undef or a string");
     }
 
     if (!SvOK(SvRV(tmp_file_sv))) {
-	*tmp_file = NULL;
+        *tmp_file = NULL;
     } else if (SvPOK(SvRV(tmp_file_sv))) {
-	*tmp_file = apr_pstrdup(pool, SvPV_nolen(SvRV(tmp_file_sv)));
+        *tmp_file = apr_pstrdup(pool, SvPV_nolen(SvRV(tmp_file_sv)));
     } else {
         croak("Invalid value in tmp_file reference, "
               "must be undef or a string");
@@ -1312,9 +1427,9 @@ svn_error_t *svn_swig_pl_get_commit_log_
 
     if (sv_derived_from(result, "_p_svn_error_t")) {
         swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
-	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+        if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
             SvREFCNT_dec(result);
-	    croak("Unable to convert from SWIG Type");
+            croak("Unable to convert from SWIG Type");
         }
     }
 
@@ -1365,10 +1480,10 @@ svn_error_t *svn_swig_pl_cancel_func(voi
 
     if (sv_derived_from(result,"_p_svn_error_t")) {
         swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
-	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
-	    SvREFCNT_dec(result);
-	    croak("Unable to convert from SWIG Type");
-	}
+        if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+            SvREFCNT_dec(result);
+            croak("Unable to convert from SWIG Type");
+        }
     } else if (SvIOK(result) && SvIV(result)) {
         ret_val = svn_error_create(SVN_ERR_CANCELLED, NULL,
                                    "By cancel callback");
@@ -1464,9 +1579,9 @@ svn_error_t *svn_swig_pl_blame_func(void
 
     if (sv_derived_from(result, "_p_svn_error_t")) {
         swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
-	if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+        if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
             SvREFCNT_dec(result);
-	    croak("Unable to convert from SWIG Type");
+            croak("Unable to convert from SWIG Type");
         }
     }
 
@@ -1479,7 +1594,7 @@ svn_boolean_t svn_swig_pl_thunk_config_e
 {
     SV *result;
     if (!SvOK((SV *)baton))
-	return 0;
+        return 0;
 
     svn_swig_pl_callback_thunk(CALL_SV, baton, &result,
                                "ss", name, value);
@@ -1490,21 +1605,33 @@ svn_boolean_t svn_swig_pl_thunk_config_e
 
 /* default pool support */
 
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
-static svn_swig_pl_get_current_pool_t svn_swig_pl_get_current_pool = NULL;
-static svn_swig_pl_set_current_pool_t svn_swig_pl_set_current_pool = NULL;
+static svn_swig_pl_get_current_pool_func_t get_current_pool_cb = NULL;
+static svn_swig_pl_set_current_pool_func_t set_current_pool_cb = NULL;
 
-void svn_swig_pl_bind_current_pool_fns(svn_swig_pl_get_current_pool_t get,
-                                       svn_swig_pl_set_current_pool_t set)
+void
+svn_swig_pl__bind_current_pool_fns(svn_swig_pl_get_current_pool_func_t get,
+                                   svn_swig_pl_set_current_pool_func_t set)
 {
-  svn_swig_pl_get_current_pool = get;
-  svn_swig_pl_set_current_pool = set;
+  /* This function should only be called ONCE, otherwise there are two
+     global variables CURRENT_POOL */
+  SVN_ERR_ASSERT_NO_RETURN(get_current_pool_cb == NULL
+                           && set_current_pool_cb == NULL);
+
+  get_current_pool_cb = get;
+  set_current_pool_cb = set;
 }
-#else
-apr_pool_t *svn_swig_pl_get_current_pool(void);
-void svn_swig_pl_set_current_pool(apr_pool_t *pool);
-#endif
 
+apr_pool_t * svn_swig_pl_get_current_pool()
+{
+  SVN_ERR_ASSERT_NO_RETURN(get_current_pool_cb != NULL);
+  return get_current_pool_cb();
+}
+
+void svn_swig_pl_set_current_pool(apr_pool_t *pool)
+{
+  SVN_ERR_ASSERT_NO_RETURN(set_current_pool_cb != NULL);
+  set_current_pool_cb(pool);
+}
 
 apr_pool_t *svn_swig_pl_make_pool(SV *obj)
 {
@@ -1512,12 +1639,12 @@ apr_pool_t *svn_swig_pl_make_pool(SV *ob
 
     if (obj && sv_isobject(obj)) {
       if (sv_derived_from(obj, "SVN::Pool")) {
-	    obj = SvRV(obj);
-	}
-	if (sv_derived_from(obj, "_p_apr_pool_t")) {
-	    SWIG_ConvertPtr(obj, (void **)&pool, POOLINFO, 0);
-	    return pool;
-	}
+            obj = SvRV(obj);
+        }
+        if (sv_derived_from(obj, "_p_apr_pool_t")) {
+            SWIG_ConvertPtr(obj, (void **)&pool, POOLINFO, 0);
+            return pool;
+        }
     }
 
     if (!svn_swig_pl_get_current_pool())
@@ -1542,15 +1669,15 @@ static svn_error_t *io_handle_read(void 
     MAGIC *mg;
 
     if ((mg = SvTIED_mg((SV*)io->io, PERL_MAGIC_tiedscalar))) {
-	SV *ret;
-	SV *buf = sv_newmortal();
+        SV *ret;
+        SV *buf = sv_newmortal();
 
-	svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"READ", &ret, "OOz",
+        svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"READ", &ret, "OOz",
                                    SvTIED_obj((SV*)io->io, mg),
                                    buf, *len);
-	*len = SvIV(ret);
-	SvREFCNT_dec(ret);
-	memmove(buffer, SvPV_nolen(buf), *len);
+        *len = SvIV(ret);
+        SvREFCNT_dec(ret);
+        memmove(buffer, SvPV_nolen(buf), *len);
     }
     else
       *len = PerlIO_read(IoIFP(io->io), buffer, *len);
@@ -1565,12 +1692,12 @@ static svn_error_t *io_handle_write(void
     MAGIC *mg;
 
     if ((mg = SvTIED_mg((SV*)io->io, PERL_MAGIC_tiedscalar))) {
-	SV *ret, *pv;
+        SV *ret, *pv;
         pv = sv_2mortal(newSVpvn(data, *len));
-	svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"WRITE", &ret, "OOz",
+        svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"WRITE", &ret, "OOz",
                                    SvTIED_obj((SV*)io->io, mg), pv, *len);
-	*len = SvIV(ret);
-	SvREFCNT_dec(ret);
+        *len = SvIV(ret);
+        SvREFCNT_dec(ret);
     }
     else
       *len = PerlIO_write(IoIFP(io->io), data, *len);
@@ -1614,7 +1741,7 @@ svn_error_t *svn_swig_pl_make_stream(svn
       if (sv_derived_from(obj, "SVN::Stream"))
         svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"svn_stream",
                                    &obj, "O", obj);
-	else if (!sv_derived_from(obj, "_p_svn_stream_t"))
+        else if (!sv_derived_from(obj, "_p_svn_stream_t"))
             simple_type = 0;
 
         if (simple_type) {
@@ -1624,17 +1751,17 @@ svn_error_t *svn_swig_pl_make_stream(svn
     }
 
     if (obj && SvROK(obj) && SvTYPE(SvRV(obj)) == SVt_PVGV &&
-	(io = GvIO(SvRV(obj)))) {
-	apr_pool_t *pool = svn_swig_pl_get_current_pool();
-	io_baton_t *iob = apr_palloc(pool, sizeof(io_baton_t));
-	SvREFCNT_inc(obj);
-	iob->obj = obj;
-	iob->io = io;
-	*stream = svn_stream_create(iob, pool);
-	svn_stream_set_read(*stream, io_handle_read);
-	svn_stream_set_write(*stream, io_handle_write);
-	svn_stream_set_close(*stream, io_handle_close);
-	apr_pool_cleanup_register(pool, iob, io_handle_cleanup,
+        (io = GvIO(SvRV(obj)))) {
+        apr_pool_t *pool = svn_swig_pl_get_current_pool();
+        io_baton_t *iob = apr_palloc(pool, sizeof(io_baton_t));
+        SvREFCNT_inc(obj);
+        iob->obj = obj;
+        iob->io = io;
+        *stream = svn_stream_create(iob, pool);
+        svn_stream_set_read(*stream, io_handle_read);
+        svn_stream_set_write(*stream, io_handle_write);
+        svn_stream_set_close(*stream, io_handle_close);
+        apr_pool_cleanup_register(pool, iob, io_handle_cleanup,
                                   io_handle_cleanup);
 
     }
@@ -1678,7 +1805,7 @@ apr_file_t *svn_swig_pl_make_file(SV *fi
     apr_file_t *apr_file = NULL;
 
     if (!SvOK(file) || file == &PL_sv_undef)
-	return NULL;
+        return NULL;
 
     if (SvPOKp(file)) {
       apr_file_open(&apr_file, SvPV_nolen(file),

Modified: subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h Tue Oct 15 08:52:06 2013
@@ -29,6 +29,10 @@
 #include <perl.h>
 #include <XSUB.h>
 
+/* Perl defines a _ macro, but SVN uses it for translations.
+ * So undefine _ after including the Perl headers. */
+#undef _
+
 #include <apr.h>
 #include <apr_pools.h>
 #include <apr_strings.h>
@@ -55,14 +59,14 @@ extern "C" {
 #endif
 
 
+typedef apr_pool_t *(*svn_swig_pl_get_current_pool_func_t)(void);
+typedef void (*svn_swig_pl_set_current_pool_func_t)(apr_pool_t *pool);
 
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
-typedef apr_pool_t *(*svn_swig_pl_get_current_pool_t)(void);
-typedef void (*svn_swig_pl_set_current_pool_t)(apr_pool_t *pool);
+void svn_swig_pl__bind_current_pool_fns(svn_swig_pl_get_current_pool_func_t get,
+                                       svn_swig_pl_set_current_pool_func_t set);
 
-void svn_swig_pl_bind_current_pool_fns(svn_swig_pl_get_current_pool_t get,
-                                       svn_swig_pl_set_current_pool_t set);
-#endif
+apr_pool_t * svn_swig_pl_get_current_pool();
+void svn_swig_pl_set_current_pool(apr_pool_t *pool);
 
 apr_pool_t *svn_swig_pl_make_pool(SV *obj);
 
@@ -79,9 +83,7 @@ svn_error_t *svn_swig_pl_callback_thunk(
 SV *svn_swig_pl_prophash_to_hash(apr_hash_t *hash);
 SV *svn_swig_pl_convert_hash(apr_hash_t *hash, swig_type_info *tinfo);
 
-SV *svn_swig_pl_convert_hash_of_revnum_t(apr_hash_t *hash);
-
-const apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
+apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
                                                        apr_pool_t *pool);
 
 apr_hash_t *svn_swig_pl_strings_to_hash(SV *source,
@@ -93,20 +95,22 @@ apr_hash_t *svn_swig_pl_objs_to_hash_by_
                                              apr_pool_t *pool);
 apr_hash_t *svn_swig_pl_objs_to_hash_of_revnum_t(SV *source,
                                                  apr_pool_t *pool);
-const apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
+apr_hash_t *svn_swig_pl_hash_to_prophash(SV *source, apr_pool_t *pool);
+apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
                                                     swig_type_info *tinfo,
                                                     apr_pool_t *pool);
+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
-SV *svn_swig_pl_ints_to_list(const apr_array_header_t *array);
-*/
 SV *svn_swig_pl_convert_array(const apr_array_header_t *array,
                               swig_type_info *tinfo);
 
 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,
@@ -153,10 +157,10 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
                                           apr_pool_t *pool);
 
 /* ra callbacks. */
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
-				   void **c_baton,
-				   SV *perl_callbacks,
-				   apr_pool_t *pool);
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+                                        void **c_baton,
+                                        SV *perl_callbacks,
+                                        apr_pool_t *pool);
 
 /* thunked gnome_keyring_unlock_prompt callback function */
 svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
@@ -268,15 +272,15 @@ svn_error_t *svn_swig_pl_blame_func(void
 svn_boolean_t svn_swig_pl_thunk_config_enumerator(const char *name, const char *value, void *baton);
 
 /* helper for making the editor */
-void svn_delta_make_editor(svn_delta_editor_t **editor,
-                           void **edit_baton,
-                           SV *perl_editor,
-                           apr_pool_t *pool);
-
-void svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                                   void **h_baton,
-                                   SV *callback,
-                                   apr_pool_t *pool);
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+                             void **edit_baton,
+                             SV *perl_editor,
+                             apr_pool_t *pool);
+
+void svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+                                     void **h_baton,
+                                     SV *callback,
+                                     apr_pool_t *pool);
 
 /* svn_stream_t helpers */
 svn_error_t *svn_swig_pl_make_stream(svn_stream_t **stream, SV *obj);

Modified: subversion/branches/cache-server/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/perl/native/Client.pm?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/perl/native/Client.pm Tue Oct 15 08:52:06 2013
@@ -8,25 +8,26 @@ package SVN::Client;
 my @_all_fns;
 BEGIN {
     @_all_fns =
-        qw( version diff_summarize_dup create_context checkout3
-            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
-            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
-            cleanup relocate revert2 revert resolve resolved copy4
-            copy3 copy2 copy move5 move4 move3 move2 move propset3
-            propset2 propset revprop_set propget3 propget2
-            propget revprop_get proplist3 proplist2 proplist
-            revprop_list export4 export3 export2 export list2 list
-            ls3 ls2 ls cat2 cat add_to_changelist
-            remove_from_changelist lock unlock info2 info
-            url_from_path uuid_from_url uuid_from_path open_ra_session
-            invoke_blame_receiver2 invoke_blame_receiver
-            invoke_diff_summarize_func
+        qw( add add2 add3 add4 add_to_changelist blame blame2 blame3 blame4
+            cat cat2 checkout checkout2 checkout3 cleanup
+            commit commit2 commit3 commit4 copy copy2 copy3 copy4
+            create_context delete delete2 delete3 diff diff2 diff3 diff4
+            diff_peg diff_peg2 diff_peg3 diff_peg4
+            diff_summarize diff_summarize2 diff_summarize_dup
+            diff_summarize_peg diff_summarize_peg2
+            export export2 export3 export4 import import2 import3
+            info info2 invoke_blame_receiver invoke_blame_receiver2
+            invoke_diff_summarize_func list list2 lock
+            log log2 log3 log4 log5 ls ls2 ls3
+            merge merge2 merge3 merge_peg merge_peg2 merge_peg3
+            mkdir mkdir2 mkdir3 mkdir4 move move2 move3 move4 move5
+            open_ra_session propget propget2 propget3
+            proplist proplist2 proplist3 propset propset2 propset3
+            relocate remove_from_changelist resolve resolved
+            revert revert2 revprop_get revprop_list revprop_set
+            status status2 status3 status4 switch switch2
+            unlock update update2 update3 update4
+            url_from_path uuid_from_path uuid_from_url version
           );
 
     require SVN::Base;
@@ -40,21 +41,18 @@ SVN::Client - Subversion client function
 =head1 SYNOPSIS
 
     use SVN::Client;
-    my $ctx = new SVN::Client(
-              auth => [SVN::Client::get_simple_provider(),
-              SVN::Client::get_simple_prompt_provider(\&simple_prompt,2),
-              SVN::Client::get_username_provider()]
-              );
+    my $client = new SVN::Client(
+      auth => [
+          SVN::Client::get_simple_provider(),
+          SVN::Client::get_simple_prompt_provider(\&simple_prompt,2),
+          SVN::Client::get_username_provider()
+      ]);
 
-    $ctx->cat(\*STDOUT, 'http://svn.apache.org/repos/asf/subversion/trunk/README',
-              'HEAD');
+    $client->cat(\*STDOUT, 
+              'http://svn.apache.org/repos/asf/subversion/trunk/README', 'HEAD');
 
     sub simple_prompt {
-      my $cred = shift;
-      my $realm = shift;
-      my $default_username = shift;
-      my $may_save = shift;
-      my $pool = shift;
+      my ($cred, $realm, $default_username, $may_save, $pool) = @_;
 
       print "Enter authentication info for realm: $realm\n";
       print "Username: ";
@@ -81,8 +79,8 @@ The Perl method calls take a SVN::Client
 This allows method call invocation of the methods to be possible.  For
 example, the following are equivalent:
 
-  SVN::Client::add($ctx,$path, $recursive, $pool);
-  $ctx->add($path, $recursive, $pool);
+  SVN::Client::add($client,$path, $recursive, $pool);
+  $client->add($path, $recursive, $pool);
 
 Many of the C API calls also take a apr_pool_t pointer as their last
 argument.  The Perl bindings generally deal with this for you and
@@ -103,7 +101,7 @@ the rules below or will be noted otherwi
 
 =over 4
 
-=item $ctx
+=item $client
 
 An SVN::Client object that you get from the constructor.
 
@@ -133,16 +131,17 @@ to an array of them.
 
 =item $revision
 
-This specifies a revision in the subversion repository.  You can specify a
+This specifies a revision in the Subversion repository.  You can specify a
 revision in several ways.  The easiest and most obvious is to directly
 provide the revision number.  You may also use the strings (aka revision
 keywords) 'HEAD', 'BASE', 'COMMITTED', and 'PREV' which have the same
 meanings as in the command line client.  When referencing a working copy
 you can use the string 'WORKING" to reference the BASE plus any local
-modifications.  undef may be used to specify an unspecified revision.
-Finally you may pass a date by specifying the date inside curly braces
+modifications.  C<undef> may be used to specify an unspecified revision.
+You may also pass a date by specifying the date inside curly braces
 '{}'.  The date formats accepted are the same as the command line client
-accepts.
+accepts. Finally a C<_p_svn_opt_revision_t> object is accepted
+(which may have been returned by some Subversion function).
 
 =item $recursive $nonrecursive.
 
@@ -163,7 +162,7 @@ The following methods are available:
 
 =over 4
 
-=item $ctx = SVN::Client-E<gt>new( %options );
+=item $client = SVN::Client-E<gt>new( %options );
 
 This class method constructs a new C<SVN::Client> object and returns
 a reference to it.
@@ -252,21 +251,21 @@ sub new
     return $self;
 }
 
-=item $ctx-E<gt>add($path, $recursive, $pool);
+=item $client-E<gt>add($path, $recursive, $pool);
 
-Similar to $ctx-E<gt>add2(), but with $force always set to FALSE.
+Similar to $client-E<gt>add2(), but with $force always set to FALSE.
 
-=item $ctx-E<gt>add2($path, $recursive, $force, $ctx, $pool);
+=item $client-E<gt>add2($path, $recursive, $force, $pool);
 
-Similar to $ctx-E<gt>add3(), but with $no_ignore always set to FALSE.
+Similar to $client-E<gt>add3(), but with $no_ignore always set to FALSE.
 
-=item $ctx-E<gt>add3($path, $recursive, $force, $no_ignore, $pool);
+=item $client-E<gt>add3($path, $recursive, $force, $no_ignore, $pool);
 
-Similar to $ctx-E<gt>add4(), but with $add_parents always set to FALSE and
+Similar to $client-E<gt>add4(), but with $add_parents always set to FALSE and
 $depth set according to $recursive; if TRUE, then depth is
 $SVN::Depth::infinity, if FALSE, then $SVN::Depth::empty.
 
-=item $ctx-E<gt>add4($path, $depth, $force, $no_ignore, $add_parents, $pool);
+=item $client-E<gt>add4($path, $depth, $force, $no_ignore, $add_parents, $pool);
 
 Schedule a working copy $path for addition to the repository.
 
@@ -289,7 +288,7 @@ Calls the notify callback for each added
 If $no_ignore is FALSE, don't add any file or directory (or recurse into any
 directory) that is unversioned and found by recursion (as opposed to being the
 explicit target $path) and whose name matches the svn:ignore property on its
-parent directory or the global-ignores list in $ctx->config.  If $no_ignore is
+parent directory or the global-ignores list in $client->config.  If $no_ignore is
 TRUE, do include such files and directories.  (Note that an svn:ignore property
 can influence this behaviour only when recursing into an already versioned
 directory with $force).
@@ -300,11 +299,11 @@ found return $SVN::Error::NO_VERSIONED_P
 
 Important: this is a B<scheduling> operation.  No changes will happen
 to the repository until a commit occurs.  This scheduling can be
-removed with $ctx-E<gt>revert().
+removed with $client-E<gt>revert().
 
 No return.
 
-=item $ctx-E<gt>blame($target, $start, $end, \&receiver, $pool);
+=item $client-E<gt>blame($target, $start, $end, \&receiver, $pool);
 
 Invoke \&receiver subroutine on each line-blame item associated with revision
 $end of $target, using $start as the default source of all blame.
@@ -324,7 +323,7 @@ The blame receiver subroutine can return
 to return an error.  All other returns will be ignored.
 You can create an svn_error_t object with SVN::Error::create().
 
-=item $ctx-E<gt>cat(\*FILEHANDLE, $target, $revision, $pool);
+=item $client-E<gt>cat(\*FILEHANDLE, $target, $revision, $pool);
 
 Outputs the content of the file identified by $target and $revision to the
 FILEHANDLE.  FILEHANDLE is a reference to a filehandle.
@@ -333,17 +332,17 @@ If $target is not a local path and if $r
 other kind that requires a local path), then an error will be raised,
 because the desired revision can not be determined.
 
-=item $ctx-E<gt>checkout($url, $path, $revision, $recursive, $pool);
+=item $client-E<gt>checkout($url, $path, $revision, $recursive, $pool);
 
-Similar to $ctx-E<gt>checkout2(), but with $peg_revision always set to undef (unspecified) and $ignore_externals always set to FALSE.
+Similar to $client-E<gt>checkout2(), but with $peg_revision always set to undef (unspecified) and $ignore_externals always set to FALSE.
 
-=item $ctx-E<gt>checkout2($url, $path, $peg_revision, $revision, $recursive, $ignore_externals, $pool);
+=item $client-E<gt>checkout2($url, $path, $peg_revision, $revision, $recursive, $ignore_externals, $pool);
 
-Similar to $ctx-E<gt>checkout3(), but with $allow_unver_obstructions always set
+Similar to $client-E<gt>checkout3(), but with $allow_unver_obstructions always set
 to FALSE, and $depth set according to $recurse: if $recurse is TRUE, $depth is
 $SVN::Depth::infinity, if $recurse is FALSE, set $depth to $SVN::Depth::files.
 
-=item $ctx-E<gt>checkout3($url, $path, $preg_revision, $revision, $depth, $ignore_externals, $allow_unver_obstructions, $pool);
+=item $client-E<gt>checkout3($url, $path, $preg_revision, $revision, $depth, $ignore_externals, $allow_unver_obstructions, $pool);
 
 Checkout a working copy of $url at $revision using $path as the root directory
 of the newly checked out working copy.
@@ -370,12 +369,12 @@ obstructing items.
 
 Returns the value of the revision actually checked out of the repository.
 
-=item $ctx-E<gt>cleanup($dir, $pool);
+=item $client-E<gt>cleanup($dir, $pool);
 
 Recursively cleanup a working copy directory, $dir, finishing any incomplete
 operations, removing lockfiles, etc.
 
-=item $ctx-E<gt>commit($targets, $nonrecursive, $pool);
+=item $client-E<gt>commit($targets, $nonrecursive, $pool);
 
 Commit files or directories referenced by target.  Will use the log_msg
 callback to obtain the log message for the commit.
@@ -397,7 +396,7 @@ Returns a svn_client_commit_info_t objec
 commit information object is $SVN::Core::INVALID_REVNUM and no error was
 raised, then the commit was a no-op; nothing needed to be committed.
 
-=item $ctx-E<gt>copy($src_target, $src_revision, $dst_target, $pool);
+=item $client-E<gt>copy($src_target, $src_revision, $dst_target, $pool);
 
 Copies $src_target to $dst_target.
 
@@ -412,15 +411,15 @@ to the repository.  The log_msg callback
 log message.  If the commit succeeds, return a svn_client_commit_info_t
 object.
 
-If $dst_target is not a URL, then this is just a variant of $ctx-E<gt>add(),
+If $dst_target is not a URL, then this is just a variant of $client-E<gt>add(),
 where the $dst_path items are scheduled for addition as copies.  No changes
 will happen to the repository until a commit occurs.  This scheduling can be
-removed with $ctx-E<gt>revert().  undef will be returned in this case.
+removed with $client-E<gt>revert().  undef will be returned in this case.
 
 Calls the notify callback for each item added at the new location, passing
 the new, relative path of the added item.
 
-=item $ctx-E<gt>delete($targets, $force, $pool);
+=item $client-E<gt>delete($targets, $force, $pool);
 
 Delete items from a repository or working copy.
 
@@ -433,7 +432,7 @@ repository.
 Else, schedule the working copy paths in $targets for removal from the
 repository.  Each path's parent must be under revision control.  This is
 just a B<scheduling> operation.  No changes will happen to the repository
-until a commit occurs.  This scheduling can be removed with $ctx-E<gt>revert().
+until a commit occurs.  This scheduling can be removed with $client-E<gt>revert().
 If a path is a file it is immediately removed from the working copy.  If
 the path is a directory it will remain in the working copy but all the files,
 and all unversioned items it contains will be removed.  If $force is not set
@@ -445,7 +444,7 @@ the deleted item.
 
 Has no return.
 
-=item $ctx-E<gt>diff($diff_options, $target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, $no_diff_deleted, $outfile, $errfile, $pool);
+=item $client-E<gt>diff($diff_options, $target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, $no_diff_deleted, $outfile, $errfile, $pool);
 
 Produces diff output which describes the delta between $target1 at
 $revision1 and $target2 at $revision2.  They both must represent the same
@@ -469,7 +468,7 @@ pass an empty array to return a unified 
 
 Has no return.
 
-=item $ctx-E<gt>diff_summarize($target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, \&summarize_func, $pool);
+=item $client-E<gt>diff_summarize($target1, $revision1, $target2, $revision2, $recursive, $ignore_ancestry, \&summarize_func, $pool);
 
 Produce a diff summary which lists the changed items between $target1
 at $revision1 and $target2 at $revision2 without creating text deltas.
@@ -486,7 +485,7 @@ See diff() for a description of the othe
 
 Has no return.
 
-=item $ctx-E<gt>export($from, $to, $revision, $force, $pool);
+=item $client-E<gt>export($from, $to, $revision, $force, $pool);
 
 Export the contents of either a subversion repository or a subversion
 working copy into a 'clean' directory (meaning a directory with no
@@ -506,7 +505,7 @@ The notify callback will be called for t
 Returns the value of the revision actually exported or
 $SVN::Core::INVALID_REVNUM for local exports.
 
-=item $ctx-E<gt>import($path, $url, $nonrecursive, $pool);
+=item $client-E<gt>import($path, $url, $nonrecursive, $pool);
 
 Import file or directory $path into repository directory $url at head.
 
@@ -534,50 +533,147 @@ one is needed.
 
 Returns a svn_client_commit_info_t object.
 
-=item $ctx-E<gt>log($targets, $start, $end, $discover_changed_paths, $strict_node_history, \&log_receiver, $pool);
+=item $client-E<gt>info($path_or_url, $peg_revision, $revision, \&receiver, $recurse);
 
-Invoke the log_receiver subroutine on each log_message from $start to $end in
-turn, inclusive (but will never invoke receiver on a given log message more
+Invokes \&receiver passing it information about $path_or_url for $revision.
+The information returned is system-generated metadata, not the sort of
+"property" metadata created by users.  For methods available on the object
+passed to \&receiver, B<see svn_info_t>.
+
+If both revision arguments are either svn_opt_revision_unspecified or NULL,
+then information will be pulled solely from the working copy; no network
+connections will be made.
+
+Otherwise, information will be pulled from a repository.  The actual node
+revision selected is determined by the $path_or_url as it exists in
+$peg_revision.  If $peg_revision is undef, then it defaults to HEAD for URLs
+or WORKING for WC targets.
+
+If $path_or_url is not a local path, then if $revision is PREV (or some other
+kind that requires a local path), an error will be returned, because the
+desired revision cannot be determined.
+
+Uses the authentication baton cached in ctx to authenticate against the
+repository.
+
+If $recurse is true (and $path_or_url is a directory) this will be a recursive
+operation, invoking $receiver on each child.
+
+ my $receiver = sub {
+     my( $path, $info, $pool ) = @_;
+     print "Current revision of $path is ", $info->rev, "\n";
+ };
+ $client->info( 'foo/bar.c', undef, 'WORKING', $receiver, 0 );
+
+=item $client-E<gt>log5($targets, $peg_revision, $revision_ranges, $limit, $discover_changed_paths, $strict_node_history, $include_merged_revisions, $revprops, \&log_entry_receiver, $pool);
+
+Invoke C<log_entry_receiver> on each log message from
+each revision range in C<$revision_ranges> in turn,
+inclusive (but never invoke C<log_entry_receiver> on a given log message more
 than once).
 
-$targets is a reference to an array containing all the paths or URLs for
-which the log messages are desired.  The log_receiver is only invoked on
-messages whose revisions involved a change to some path in $targets.
+C<$targets> is a reference to an array of either a URL followed by zero 
+or more relative paths, or 1 working copy path, for which log
+messages are desired. If the array contains only a single element
+you may set C<$targets> to this element instead.
+C<log_entry_receiver> is invoked only on messages whose
+revisions involved a change to some path in C<$targets>.
+
+C<$peg_revision> indicates in which revision C<$targets> are valid. 
+If C<$peg_revision> is C<undef>, it defaults to 'HEAD'
+for URLs or 'WORKING' for WC paths.
+
+C<$revision_ranges> is either a single I<revision range> or a reference
+to an array of them. A I<revision range> may be specified
+as a reference to a two-element array C<[$start, $end]>
+of L<$revision|/$revision>s or a 
+L<SVN::Core::svn_opt_revision_range_t|SVN::Core/svn_opt_revision_range_t> 
+object. Examples:
+
+  $revision_ranges = ['HEAD', 1];
+  $revision_ranges = [[2, 3], [5, 8], [13, 21]];
+
+If C<$limit> is non-zero only invoke C<log_entry_receiver> 
+on the first C<$limit> logs.
+
+If C<$discover_changed_paths> is true, then the I<changed_paths2> field 
+in the C<$log_entry> argument to C<log_entry_receiver> will be
+populated on each invocation.  I<Note:> The I<text_modified> and
+I<props_modified> fields of the I<changed_paths2> structure may have the value
+C<$SVN::Tristate::unknown> if the repository does not report that information.
+
+If C<$strict_node_history> is true, copy history (if any exists) will
+not be traversed while harvesting revision logs for each target.
+
+If C<$include_merged_revisions> is true, log information for revisions
+which have been merged to C<$targets> will also be returned.
+
+If C<$revprops> is C<undef>, retrieve all revision properties.
+Otherwise C<$revpros> should be a reference to an array of
+property names and only these properties will be retrieved
+(i.e. none if the array is empty).
+
+Use C<$pool> for any temporary allocation.
+
+Calls the notify subroutine with a C<$SVN::Wc::Notify::Action::skip> 
+signal on any unversioned C<$targets>.
+
+The C<log_entry_receiver> takes the following arguments:
+C<$log_entry, $pool>.  C<$log_entry> is a 
+L<SVN::Core::svn_log_entry_t|SVN::Core/svn_log_entry_t> object.
+
+=item $client-E<gt>log4($targets, $peg_revision, $start, $end, $limit, $discover_changed_paths, $strict_node_history, $include_merged_revisions, $revprops, \&log_entry_receiver, $pool);
+
+Similar to C<$client-E<gt>log5()>, 
+but takes explicit C<$start> and C<$end> parameters
+instead of C<$revision_ranges>.
+
+Deprecated.
+
+=item $client-E<gt>log3($targets, $peg_revision, $start, $end, $limit, $discover_changed_paths, $strict_node_history, \&log_message_receiver, $pool);
+
+Similar to C<$client-E<gt>log4()>, but using C<log_message_receiver>
+instead of C<log_entry_receiver>.  Also, C<$include_merged_revisions> 
+is false and C<$revprops> is [qw( svn:author svn:date and svn:log )].
+
+The C<log_message_receiver> takes the following arguments:
+C<$changed_paths, $revision, $author, $date, $message, $pool>.
+It is called once for each log C<$message> from the C<$revision>
+on C<$date> by C<$author>.  C<$author>, C<$date> or C<$message> 
+may be C<undef>.
+
+If C<$changed_paths> is defined it references a hash with the keys
+every path committed in C<$revision>; the values are 
+L<SVN::Core::svn_log_changed_path_t|SVN::Core/svn_log_changed_path_t>
+objects.
+
+Deprecated.
 
-If $discover_changed_paths is set, then the changed_paths argument to the
-log_receiver routine will be passed on each invocation.
+=item $client-E<gt>log2($targets, $start, $end, $limit, $discover_changed_paths, $strict_node_history, \&log_message_receiver, $pool);
 
-If $strict_node_history is set, copy history (if any exists) will not be
-traversed while harvesting revision logs for each target.
+Similar to C<$client-E<gt>log3()>, but with C<$peg_revision> set to C<undef>.
 
-If $start or $end is undef the arp_err code will be set to:
-$SVN::Error::CLIENT_BAD_REVISION.
+Deprecated.
 
-Special case for repositories at revision 0:
+=item $client-E<gt>log($targets, $start, $end, $discover_changed_paths, $strict_node_history, \&log_message_receiver, $pool);
 
-If $start is 'HEAD' and $end is 1, then handle an empty (no revisions)
+Similar to C<$client-E<gt>log2()>, but with C<$limit> set to 0.
+
+I<Special case for repositories at revision 0:>
+If C<$start> is 'HEAD' and C<$end> is 1, then handle an empty (no revisions)
 repository specially: instead of erroring because requested revision 1
-when the highest revision is 0, just invoke $log_receiver on revision 0,
-passing undef to changed paths and empty strings for the author and date.
-This is because that particular combination of $start and $end usually indicates
+when the highest revision is 0, just invoke 
+C<log_message_receiver> on revision 0,
+passing C<undef> to C<$changed_paths> and empty strings for the author and date.
+This is because that particular combination of C<$start> 
+and C<$end> usually indicates
 the common case of log invocation; the user wants to see all log messages from
 youngest to oldest, where the oldest commit is revision 1.  That works fine,
 except there are no commits in the repository, hence this special case.
 
-Calls the notify subroutine with a $SVN::Wc::Notify::Action::skip signal on any
-unversioned targets.
-
-The log_receiver takes the following arguments:
-$changed_paths, $revision, $author, $date, $message, $pool
+Deprecated.
 
-It is called once for each log $message from the $revision
-on $date by $author.  $author, $date or $message may be undef.
-
-If $changed_paths is defined it references a hash with the keys
-every path committed in $revision; the values are svn_log_changed_path_t
-objects.
-
-=item $ctx-E<gt>ls($target, $revision, $recursive, $pool);
+=item $client-E<gt>ls($target, $revision, $recursive, $pool);
 
 Returns a hash of svn_dirent_t objects for $target at $revision.
 
@@ -589,7 +685,7 @@ If $target is a file only return an entr
 If $target is non-existent, raises the $SVN::Error::FS_NOT_FOUND
 error.
 
-=item $ctx-E<gt>merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry, $force, $dry_run, $pool);
+=item $client-E<gt>merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry, $force, $dry_run, $pool);
 
 Merge changes from $src1/$rev1 to $src2/$rev2 into the working-copy path
 $target_wcpath.
@@ -626,22 +722,22 @@ feedback is provided, but the working co
 
 Has no return.
 
-=item $ctx-E<gt>mkdir($targets, $pool);
+=item $client-E<gt>mkdir($targets, $pool);
 
-Similar to $ctx-E<gt>mkdir2() except it returns an svn_client_commit_info_t
+Similar to $client-E<gt>mkdir2() except it returns an svn_client_commit_info_t
 object instead of a svn_commit_info_t object.
 
-=item $ctx-E<gt>mkdir2($targets, $pool);
+=item $client-E<gt>mkdir2($targets, $pool);
 
-Similar to $ctx-E<gt>mkdir3(), but with $make_parents always FALSE, and
+Similar to $client-E<gt>mkdir3(), but with $make_parents always FALSE, and
 $revprop_hash always undef.
 
-=item $ctx-E<gt>mkdir3($targets, $make_parents, $revprop_hash, $pool);
+=item $client-E<gt>mkdir3($targets, $make_parents, $revprop_hash, $pool);
 
-Similar to $ctx-E<gt>mkdir4(), but returns a svn_commit_info_t object rather
+Similar to $client-E<gt>mkdir4(), but returns a svn_commit_info_t object rather
 than through a callback function.
 
-=item $ctx-E<gt>mkdir4($targets, $make_parents, $revprop_hash, \&commit_callback, $pool);
+=item $client-E<gt>mkdir4($targets, $make_parents, $revprop_hash, \&commit_callback, $pool);
 
 Create a directory, either in a repository or a working copy.
 
@@ -669,7 +765,7 @@ called for items added to the working co
 If \&commit_callback is not undef, then for each successful commit, call
 \&commit_callback with the svn_commit_info_t object for the commit.
 
-=item $ctx-E<gt>move($src_path, $src_revision, $dst_path, $force, $pool);
+=item $client-E<gt>move($src_path, $src_revision, $dst_path, $force, $pool);
 
 Move $src_path to $dst_path.
 
@@ -696,7 +792,7 @@ If $src_path is a working copy path
 not be called.
 
 * This is a scheduling operation.  No changes will happen to the repository
-until a commit occurs.  This scheduling can be removed with $ctx-E<gt>revert().
+until a commit occurs.  This scheduling can be removed with $client-E<gt>revert().
 If $src_path is a file it is removed from the working copy immediately.
 If $src_path is a directory it will remain in the working copy but all
 files, and unversioned items, it contains will be removed.
@@ -709,13 +805,13 @@ The notify callback will be called twice
 indicate the deletion of the moved node, and once to indicate the addition
 of the new location of the node.
 
-=item $ctx-E<gt>propget($propname, $target, $revision, $recursive, $pool);
+=item $client-E<gt>propget($propname, $target, $revision, $recursive, $pool);
 
 Returns a reference to a hash containing paths or URLs, prefixed by $target (a
 working copy or URL), of items for which the property $propname is set, and
 whose values represent the property value for $propname at that path.
 
-=item $ctx-E<gt>proplist($target, $revision, $recursive, $pool);
+=item $client-E<gt>proplist($target, $revision, $recursive, $pool);
 
 Returns a reference to an array of svn_client_proplist_item_t objects.
 
@@ -732,7 +828,7 @@ versioned entry below (and including) $t
 
 If $target is not found, raises the $SVN::Error::ENTRY_NOT_FOUND error.
 
-=item $ctx-E<gt>propset($propname, $propval, $target, $recursive, $pool);
+=item $client-E<gt>propset($propname, $propval, $target, $recursive, $pool);
 
 Set $propname to $propval on $target (a working copy or URL path).
 
@@ -746,7 +842,7 @@ If $propname is an svn-controlled proper
 then the caller is responsible for ensuring that $propval is UTF8-encoded
 and uses LF line-endings.
 
-=item $ctx-E<gt>relocate($dir, $from, $to, $recursive, $pool);
+=item $client-E<gt>relocate($dir, $from, $to, $recursive, $pool);
 
 Modify a working copy directory $dir, changing any repository URLs that
 begin with $from to begin with $to instead, recursing into subdirectories if
@@ -754,7 +850,7 @@ $recursive is true.
 
 Has no return.
 
-=item $ctx-E<gt>resolved($path, $recursive, $pool);
+=item $client-E<gt>resolved($path, $recursive, $pool);
 
 Removed the 'conflicted' state on a working copy path.
 
@@ -768,7 +864,7 @@ If $path is not in a state of conflict t
 If $path's conflict state is removed, call the notify callback with the
 $path.
 
-=item $ctx-E<gt>revert($paths, $recursive, $pool);
+=item $client-E<gt>revert($paths, $recursive, $pool);
 
 Restore the pristine version of a working copy $paths, effectively undoing
 any local mods.
@@ -776,28 +872,28 @@ any local mods.
 For each path in $paths, if it is a directory and $recursive
 is true, this will be a recursive operation.
 
-=item $ctx-E<gt>revprop_get($propname, $url, $revision, $pool);
+=item $client-E<gt>revprop_get($propname, $url, $revision, $pool);
 
 Returns two values, the first of which is the value of $propname on revision
 $revision in the repository represented by $url.  The second value is the
 actual revision queried.
 
-Note that unlike its cousin $ctx-E<gt>propget(), this routine doesn't affect
+Note that unlike its cousin $client-E<gt>propget(), this routine doesn't affect
 working copy at all; it's a pure network operation that queries an
 B<unversioned> property attached to a revision.  This can be used to query
 log messages, dates, authors, and the like.
 
-=item $ctx-E<gt>revprop_list($url, $revision, $pool);
+=item $client-E<gt>revprop_list($url, $revision, $pool);
 
 Returns two values, the first of which is a reference to a hash containing
 the properties attached to $revision in the repository represented by $url.
 The second value is the actual revision queried.
 
-Note that unlike its cousin $ctx-E<gt>proplist(), this routine doesn't read a
+Note that unlike its cousin $client-E<gt>proplist(), this routine doesn't read a
 working copy at all; it's a pure network operation that reads B<unversioned>
 properties attached to a revision.
 
-=item $ctx-E<gt>revprop_set($propname, $propval, $url, $revision, $force, $pool);
+=item $client-E<gt>revprop_set($propname, $propval, $url, $revision, $force, $pool);
 
 Set $propname to $propval on revision $revision in the repository represented
 by $url.
@@ -811,7 +907,7 @@ If $propname is an svn-controlled proper
 the caller is responsible for ensuring that the value is UTF8-encoded and
 uses LF line-endings.
 
-Note that unlike its cousin $ctx-E<gt>propset(), this routine doesn't affect
+Note that unlike its cousin $client-E<gt>propset(), this routine doesn't affect
 the working copy at all; it's a pure network operation that changes an
 B<unversioned> property attached to a revision.  This can be used to tweak
 log messages, dates, authors, and the like.  Be careful: it's a lossy
@@ -821,19 +917,19 @@ with no way to retrieve the prior value.
 Also note that unless the administrator creates a pre-revprop-change hook
 in the repository, this feature will fail.
 
-=item $ctx-E<gt>status($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $pool);
+=item $client-E<gt>status($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $pool);
 
-Similar to $ctx-E<gt>status2(), but with ignore_externals always set to FALSE, and with the status_func receiving a svn_wc_status2_t instead of a svn_wc_status_t object.
+Similar to $client-E<gt>status2(), but with ignore_externals always set to FALSE, and with the status_func receiving a svn_wc_status2_t instead of a svn_wc_status_t object.
 
-=item $ctx-E<gt>status2($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $ignore_externals, $pool);
+=item $client-E<gt>status2($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $ignore_externals, $pool);
 
-Similar to $ctx-E<gt>status3(), but with the changelists passed as undef, and with recursive instead of depth.
+Similar to $client-E<gt>status3(), but with the changelists passed as undef, and with recursive instead of depth.
 
-=item $ctx-E<gt>status3($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
+=item $client-E<gt>status3($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
 
-Similar to $ctx-E<gt>status4(), without the pool parameter to the callback and the return of the callback is ignored. 
+Similar to $client-E<gt>status4(), without the pool parameter to the callback and the return of the callback is ignored. 
 
-=item $ctx-E<gt>status4($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
+=item $client-E<gt>status4($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
 
 Given $path to a working copy directory (or single file), call status_func()
 with a set of svn_wc_status2_t objects which describe the status of $path and
@@ -867,39 +963,7 @@ object which is cleaned beteween invocat
 The return of the status_func subroutine can be a svn_error_t object created by
 SVN::Error::create in order to propogate an error up.
 
-=item $ctx-E<gt>info($path_or_url, $peg_revision, $revision, \&receiver, $recurse);
-
-Invokes \&receiver passing it information about $path_or_url for $revision.
-The information returned is system-generated metadata, not the sort of
-"property" metadata created by users.  For methods available on the object
-passed to \&receiver, B<see svn_info_t>.
-
-If both revision arguments are either svn_opt_revision_unspecified or NULL,
-then information will be pulled solely from the working copy; no network
-connections will be made.
-
-Otherwise, information will be pulled from a repository.  The actual node
-revision selected is determined by the $path_or_url as it exists in
-$peg_revision.  If $peg_revision is undef, then it defaults to HEAD for URLs
-or WORKING for WC targets.
-
-If $path_or_url is not a local path, then if $revision is PREV (or some other
-kind that requires a local path), an error will be returned, because the
-desired revision cannot be determined.
-
-Uses the authentication baton cached in ctx to authenticate against the
-repository.
-
-If $recurse is true (and $path_or_url is a directory) this will be a recursive
-operation, invoking $receiver on each child.
-
- my $receiver = sub {
-     my( $path, $info, $pool ) = @_;
-     print "Current revision of $path is ", $info->rev, "\n";
- };
- $ctx->info( 'foo/bar.c', undef, 'WORKING', $receiver, 0 );
-
-=item $ctx-E<gt>switch($path, $url, $revision, $recursive, $pool);
+=item $client-E<gt>switch($path, $url, $revision, $recursive, $pool);
 
 Switch working tree $path to $url at $revision.
 
@@ -918,24 +982,24 @@ scratch.
 Returns the value of the revision to which the working copy was actually
 switched.
 
-=item $ctx-E<gt>update($path, $revision, $recursive, $pool)
+=item $client-E<gt>update($path, $revision, $recursive, $pool)
 
-Similar to $ctx-E<gt>update2() except that it accepts only a single target in
+Similar to $client-E<gt>update2() except that it accepts only a single target in
 $path, returns a single revision, and $ignore_externals is always set to FALSE.
 
-=item $ctx-E<gt>update2($paths, $revision, $recursive, $ignore_externals, $pool)
+=item $client-E<gt>update2($paths, $revision, $recursive, $ignore_externals, $pool)
 
-Similar to $ctx-E<gt>update3() but with $allow_unver_obstructions always set to
+Similar to $client-E<gt>update3() but with $allow_unver_obstructions always set to
 FALSE, $depth_is_sticky to FALSE, and $depth set according to $recursive: if
 $recursive is TRUE, set $depth to $SVN::Depth::infinity, if $recursive is
 FALSE, set $depth to $SVN::Depth::files.
 
-=item $ctx-E<gt>update3($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $pool)
+=item $client-E<gt>update3($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $pool)
 
-Similar to $ctx-E<gt>update4() but with $make_parents always set to FALSE and
+Similar to $client-E<gt>update4() but with $make_parents always set to FALSE and
 $adds_as_modification set to TRUE.
 
-=item $ctx-E<gt>update4($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $adds_as_modification, $make_parents)
+=item $client-E<gt>update4($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $adds_as_modification, $make_parents)
 
 Update working trees $paths to $revision.
 
@@ -989,7 +1053,7 @@ set to the revision to which $revision w
 element of $paths.
 
 
-=item $ctx-E<gt>url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);
+=item $client-E<gt>url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);
 
 Returns the URL for $target.
 
@@ -999,21 +1063,21 @@ If $target is a versioned item, it retur
 
 If $target is unversioned (has no entry), returns undef.
 
-=item $ctx-E<gt>uuid_from_path($path, $adm_access, $pool);
+=item $client-E<gt>uuid_from_path($path, $adm_access, $pool);
 
 Return the repository uuid for working-copy $path, allocated in $pool.
 
 Use $adm_access to retrieve the uuid from $path's entry; if not present in the
-entry, then call $ctx-E<gt>uuid_from_url() to retrieve, using the entry's URL.
+entry, then call $client-E<gt>uuid_from_url() to retrieve, using the entry's URL.
 
-Note: The only reason this function falls back on $ctx-E<gt>uuid_from_url is for
+Note: The only reason this function falls back on $client-E<gt>uuid_from_url is for
 compatibility purposes.  Old working copies may not have uuids in the entries
 files.
 
 Note: This method probably doesn't work right now without a lot of pain,
 because SVN::Wc is incomplete and it requires an adm_access object from it.
 
-=item $ctx-E<gt>uuid_from_url($url, $pool);
+=item $client-E<gt>uuid_from_url($url, $pool);
 
 Return repository uuid for url.
 
@@ -1022,7 +1086,7 @@ Return repository uuid for url.
 =cut
 
 # import methods into our name space and wrap them in a closure
-# to support method calling style $ctx->log()
+# to support method calling style $client->log()
 foreach my $function (@_all_fns)
 {
     no strict 'refs';
@@ -1102,7 +1166,7 @@ current value.
 
 =over 4
 
-=item $ctx-E<gt>auth(SVN::Client::get_username_provider());
+=item $client-E<gt>auth(SVN::Client::get_username_provider());
 
 Provides access to the auth_baton in the svn_client_ctx_t attached to the
 SVN::Client object.
@@ -1143,7 +1207,7 @@ sub auth
     return $self->{'ctx'}->auth_baton();
 }
 
-=item $ctx-E<gt>notify(\&notify);
+=item $client-E<gt>notify(\&notify);
 
 Sets the notify callback for the client context to a code reference that
 you pass.  It always returns the current codereference set.
@@ -1174,7 +1238,7 @@ sub notify {
     return ${$self->{'notify_callback'}};
 }
 
-=item $ctx-E<gt>log_msg(\&log_msg)
+=item $client-E<gt>log_msg(\&log_msg)
 
 Sets the log_msg callback for the client context to a code reference that you
 pass.  It always returns the current codereference set.
@@ -1207,7 +1271,7 @@ sub log_msg {
     return ${$self->{'log_msg_callback'}};
 }
 
-=item $ctx-E<gt>cancel(\&cancel)
+=item $client-E<gt>cancel(\&cancel)
 
 Sets the cancellation callback for the client context to a code reference that you
 pass.  It always returns the current codereference set.
@@ -1240,7 +1304,7 @@ sub cancel {
     return ${$self->{'cancel_callback'}};
 }
 
-=item $ctx-E<gt>pool(new SVN::Pool);
+=item $client-E<gt>pool(new SVN::Pool);
 
 Method that sets or gets the default pool that is passed to method calls
 requiring a pool, but which were not explicitly passed one.
@@ -1261,7 +1325,7 @@ sub pool
         return $self->{'pool'} = shift;
     }
 }
-=item $ctx-E<gt>config(SVN::Core::config_get_config(undef));
+=item $client-E<gt>config(SVN::Core::config_get_config(undef));
 
 Method that allows access to the config member of the svn_client_ctx_t.
 Accepts a Perl hash to set, which is what functions like
@@ -1509,11 +1573,11 @@ use SVN::Base qw(Client svn_client_commi
 
 =over 8
 
-=item $citem-E<gt>path()
+=item $commit_item-E<gt>path()
 
 Absolute working-copy path of item.
 
-=item $citem-E<gt>kind()
+=item $commit_item-E<gt>kind()
 
 An integer representing the type of node it is (file/dir).
 Can be one of the following constants:
@@ -1522,19 +1586,19 @@ $SVN::Node::file
 $SVN::Node::dir
 $SVN::Node::unknown
 
-=item $citem-E<gt>url()
+=item $commit_item-E<gt>url()
 
 Commit URL for this item.
 
-=item $citem-E<gt>revision()
+=item $commit_item-E<gt>revision()
 
 Revision (copyfrom_rev if state_flags has IS_COPY set).
 
-=item $citem-E<gt>copyform_url();
+=item $commit_item-E<gt>copyform_url();
 
 CopyFrom URL
 
-=item $citem-E<gt>state_flags();
+=item $commit_item-E<gt>state_flags();
 
 One of several state flags:
 $SVN::Client::COMMIT_ITEM_ADD
@@ -1543,12 +1607,12 @@ $SVN::Client::COMMIT_ITEM_TEXT_MODS
 $SVN::Client::COMMIT_ITEM_PROP_MODS
 $SVN::Client::COMMIT_ITEM_IS_COPY
 
-=item $citem-E<gt>incoming_prop_changes()
+=item $commit_item-E<gt>incoming_prop_changes()
 
 A reference to an array of svn_prop_t objects representing changes to
 WC properties.
 
-=item $citem-E<gt>outgoing_prop_changes()
+=item $commit_item-E<gt>outgoing_prop_changes()
 
 A reference to an array of svn_prop_t objects representing extra
 changes to properties in the repository (which are not necessarily
@@ -1565,15 +1629,15 @@ use SVN::Base qw(Client svn_client_commi
 
 =over 4
 
-=item $cinfo-E<gt>revision()
+=item $commit_info-E<gt>revision()
 
 Just committed revision.
 
-=item $cinfo-E<gt>date()
+=item $commit_info-E<gt>date()
 
 Server-Side date of the commit as a string.
 
-=item $cinfo-E<gt>author()
+=item $commit_info-E<gt>author()
 
 Author of the commit.
 
@@ -1641,6 +1705,136 @@ File or dir?
 
 =back
 
+=head2 ADDITIONAL METHODS
+
+The following methods work, but are not currently documented in this
+file.  Please consult the svn_client.h section in the Subversion API
+for more details.
+
+=over 4
+
+=item $client-E<gt>add_to_changelist(...)
+
+=item $client-E<gt>blame2(...)
+
+=item $client-E<gt>blame3(...)
+
+=item $client-E<gt>blame4(...)
+
+=item $client-E<gt>cat2(...)
+
+=item $client-E<gt>commit2(...)
+
+=item $client-E<gt>commit3(...)
+
+=item $client-E<gt>commit4(...)
+
+=item $client-E<gt>copy2(...)
+
+=item $client-E<gt>copy3(...)
+
+=item $client-E<gt>copy4(...)
+
+=item $client-E<gt>create_context(...)
+
+=item $client-E<gt>delete2(...)
+
+=item $client-E<gt>delete3(...)
+
+=item $client-E<gt>diff2(...)
+
+=item $client-E<gt>diff3(...)
+
+=item $client-E<gt>diff4(...)
+
+=item $client-E<gt>diff_peg(...)
+
+=item $client-E<gt>diff_peg2(...)
+
+=item $client-E<gt>diff_peg3(...)
+
+=item $client-E<gt>diff_peg4(...)
+
+=item $client-E<gt>diff_summarize2(...)
+
+=item $client-E<gt>diff_summarize_dup(...)
+
+=item $client-E<gt>diff_summarize_peg(...)
+
+=item $client-E<gt>diff_summarize_peg2(...)
+
+=item $client-E<gt>export2(...)
+
+=item $client-E<gt>export3(...)
+
+=item $client-E<gt>export4(...)
+
+=item $client-E<gt>import2(...)
+
+=item $client-E<gt>import3(...)
+
+=item $client-E<gt>info2(...)
+
+=item $client-E<gt>invoke_blame_receiver(...)
+
+=item $client-E<gt>invoke_blame_receiver2(...)
+
+=item $client-E<gt>invoke_diff_summarize_func(...)
+
+=item $client-E<gt>list(...)
+
+=item $client-E<gt>list2(...)
+
+=item $client-E<gt>ls2(...)
+
+=item $client-E<gt>ls3(...)
+
+=item $client-E<gt>merge2(...)
+
+=item $client-E<gt>merge3(...)
+
+=item $client-E<gt>merge_peg(...)
+
+=item $client-E<gt>merge_peg2(...)
+
+=item $client-E<gt>merge_peg3(...)
+
+=item $client-E<gt>move2(...)
+
+=item $client-E<gt>move3(...)
+
+=item $client-E<gt>move4(...)
+
+=item $client-E<gt>move5(...)
+
+=item $client-E<gt>open_ra_session(...)
+
+=item $client-E<gt>propget2(...)
+
+=item $client-E<gt>propget3(...)
+
+=item $client-E<gt>proplist2(...)
+
+=item $client-E<gt>proplist3(...)
+
+=item $client-E<gt>propset2(...)
+
+=item $client-E<gt>propset3(...)
+
+=item $client-E<gt>remove_from_changelist(...)
+
+=item $client-E<gt>resolve(...)
+
+=item $client-E<gt>revert2(...)
+
+=item $client-E<gt>switch2(...)
+
+=item $client-E<gt>unlock(...)
+
+=item $client-E<gt>version(...)
+
+=back
+
 =head1 TODO
 
 * Better support for the config.

Modified: subversion/branches/cache-server/subversion/bindings/swig/perl/native/Core.pm
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/perl/native/Core.pm?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/perl/native/Core.pm (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/perl/native/Core.pm Tue Oct 15 08:52:06 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_);