You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/10 20:06:33 UTC

svn commit: r984153 [10/39] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ build/hudson/jobs/subversion-1.6.x-solaris/ build/hudson/jobs/subversion-1.6.x-ubuntu/ build/hu...

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Status.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Status.java?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Status.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Status.java Tue Aug 10 18:06:17 2010
@@ -318,6 +318,37 @@ public class Status implements java.io.S
     }
 
     /**
+     * A backward-compat wrapper.
+     */
+    public Status(org.apache.subversion.javahl.Status aStatus)
+    {
+        this(aStatus.getPath(), aStatus.getUrl(),
+             NodeKind.fromApache(aStatus.getNodeKind()),
+             aStatus.getRevisionNumber(),
+             aStatus.getLastChangedRevisionNumber(),
+             aStatus.getLastChangedDateMicros(), aStatus.getLastCommitAuthor(),
+             fromAStatusKind(aStatus.getTextStatus()),
+             fromAStatusKind(aStatus.getPropStatus()),
+             fromAStatusKind(aStatus.getRepositoryTextStatus()),
+             fromAStatusKind(aStatus.getRepositoryPropStatus()),
+             aStatus.isLocked(), aStatus.isCopied(), aStatus.hasTreeConflict(),
+             aStatus.getConflictDescriptor() == null ? null
+                : new ConflictDescriptor(aStatus.getConflictDescriptor()),
+             aStatus.getConflictOld(), aStatus.getConflictNew(),
+             aStatus.getConflictWorking(), aStatus.getUrlCopiedFrom(),
+             aStatus.getRevisionCopiedFromNumber(), aStatus.isSwitched(),
+             aStatus.isFileExternal(), aStatus.getLockToken(),
+             aStatus.getLockOwner(), aStatus.getLockComment(),
+             aStatus.getLockCreationDateMicros(),
+             aStatus.getReposLock() == null ? null
+                : new Lock(aStatus.getReposLock()),
+             aStatus.getReposLastCmtRevisionNumber(),
+             aStatus.getReposLastCmtDateMicros(),
+             NodeKind.fromApache(aStatus.getReposKind()),
+             aStatus.getReposLastCmtAuthor(), aStatus.getChangelist());
+    }
+
+    /**
      * Returns the file system path of the item
      * @return path of status entry
      */
@@ -838,4 +869,44 @@ public class Status implements java.io.S
     {
         return (micros == 0 ? null : new Date(micros / 1000));
     }
+
+    private static int fromAStatusKind(
+                            org.apache.subversion.javahl.Status.Kind aKind)
+    {
+        if (aKind == null)
+            return StatusKind.none;
+
+        switch (aKind)
+        {
+            default:
+            case none:
+                return StatusKind.none;
+            case normal:
+                return StatusKind.normal;
+            case modified:
+                return StatusKind.modified;
+            case added:
+                return StatusKind.added;
+            case deleted:
+                return StatusKind.deleted;
+            case unversioned:
+                return StatusKind.unversioned;
+            case missing:
+                return StatusKind.missing;
+            case replaced:
+                return StatusKind.replaced;
+            case merged:
+                return StatusKind.merged;
+            case conflicted:
+                return StatusKind.conflicted;
+            case obstructed:
+                return StatusKind.obstructed;
+            case ignored:
+                return StatusKind.ignored;
+            case incomplete:
+                return StatusKind.incomplete;
+            case external:
+                return StatusKind.external;
+        }
+    }
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SubversionException.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SubversionException.java?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SubversionException.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SubversionException.java Tue Aug 10 18:06:17 2010
@@ -47,4 +47,12 @@ public class SubversionException extends
     {
         super(message);
     }
+
+    /**
+     * This constructor is for backward compat.
+     */
+    SubversionException(org.apache.subversion.javahl.SubversionException ex)
+    {
+        super(ex.getMessage());
+    }
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java Tue Aug 10 18:06:17 2010
@@ -26,10 +26,22 @@ package org.tigris.subversion.javahl;
 /**
  * Encapsulates version information about the underlying native
  * libraries.  Basically a wrapper for <a
- * href="http://svn.collab.net/repos/svn/trunk/subversion/include/svn_version.h"><code>svn_version.h</code></a>.
+ * href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_version.h"><code>svn_version.h</code></a>.
  */
 public class Version
 {
+    private org.apache.subversion.javahl.Version aVersion;
+
+    public Version()
+    {
+        aVersion = new org.apache.subversion.javahl.Version();
+    }
+
+    public Version(org.apache.subversion.javahl.Version aVersion)
+    {
+        this.aVersion = aVersion;
+    }
+
     /**
      * @return The full version string for the loaded JavaHL library,
      * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
@@ -37,33 +49,36 @@ public class Version
      */
     public String toString()
     {
-        StringBuffer version = new StringBuffer();
-        version.append(getMajor())
-            .append('.').append(getMinor())
-            .append('.').append(getPatch())
-            .append(getNumberTag())
-            .append(getTag());
-        return version.toString();
+        return aVersion.toString();
     }
 
     /**
      * @return The major version number for the loaded JavaHL library.
      * @since 1.4.0
      */
-    public native int getMajor();
+    public int getMajor()
+    {
+        return aVersion.getMajor();
+    }
 
     /**
      * @return The minor version number for the loaded JavaHL library.
      * @since 1.4.0
      */
-    public native int getMinor();
+    public int getMinor()
+    {
+        return aVersion.getMinor();
+    }
 
     /**
      * @return The patch-level version number for the loaded JavaHL
      * library.
      * @since 1.4.0
      */
-    public native int getPatch();
+    public int getPatch()
+    {
+        return aVersion.getPatch();
+    }
 
     /**
      * @return Whether the JavaHL native library version is at least
@@ -72,26 +87,6 @@ public class Version
      */
     public boolean isAtLeast(int major, int minor, int patch)
     {
-        int actualMajor = getMajor();
-        int actualMinor = getMinor();
-        return ((major < actualMajor)
-                || (major == actualMajor && minor < actualMinor)
-                || (major == actualMajor && minor == actualMinor &&
-                    patch <= getPatch()));
+        return aVersion.isAtLeast(major, minor, patch);
     }
-
-    /**
-     * @return Some text further describing the library version
-     * (e.g. <code>" (r1234)"</code>, <code>" (Alpha 1)"</code>,
-     * <code>" (dev build)"</code>, etc.).
-     * @since 1.4.0
-     */
-    private native String getTag();
-
-    /**
-     * @return Some text further describing the library version
-     * (e.g. "r1234", "Alpha 1", "dev build", etc.).
-     * @since 1.4.0
-     */
-    private native String getNumberTag();
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/package.html
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/package.html?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/package.html (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/package.html Tue Aug 10 18:06:17 2010
@@ -24,7 +24,7 @@
 <body>
 <p>Provides a (mostly native, using JNI and javah) implementation of
 a high level Java API for
-<a href="http://subversion.tigris.org/">Subversion</a>.  JavaHL was originally
+<a href="http://subversion.apache.org/">Subversion</a>.  JavaHL was originally
 targeted for implementors of GUI clients and IDE plug-ins, and currently
 provides a minimal-but-complete set of APIs which expose the core Subversion C
 API to Java.  It requires a JRE 1.2+ (runtime).</p>

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java Tue Aug 10 18:06:17 2010
@@ -2247,7 +2247,7 @@ public class BasicTests extends SVNTests
     private long[] getMergeinfoRevisions(int kind, String pathOrUrl,
                                          Revision pegRevision,
                                          String mergeSourceUrl,
-                                         Revision srcPegRevision) 
+                                         Revision srcPegRevision)
         throws SubversionException
     {
         class Callback implements LogMessageCallback {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/WC.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/WC.java?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/WC.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/WC.java Tue Aug 10 18:06:17 2010
@@ -22,11 +22,6 @@
  */
 package org.tigris.subversion.javahl;
 
-import org.tigris.subversion.javahl.Revision;
-import org.tigris.subversion.javahl.Status;
-import org.tigris.subversion.javahl.NodeKind;
-import org.tigris.subversion.javahl.DirEntry;
-
 import java.io.*;
 import java.util.HashMap;
 import java.util.Iterator;

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/INSTALL?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/INSTALL Tue Aug 10 18:06:17 2010
@@ -1,4 +1,4 @@
-								-*-text-*-
+                                                                -*-text-*-
 
 STATUS OF THE SWIG BINDINGS
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/NOTES
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/NOTES?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/NOTES (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/NOTES Tue Aug 10 18:06:17 2010
@@ -1,4 +1,4 @@
-								-*-text-*-
+                                                                -*-text-*-
 
 
 ==> For instructions on how to get swig bindings working, read the

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/core.i?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/core.i (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/core.i Tue Aug 10 18:06:17 2010
@@ -745,6 +745,16 @@ svn_swig_pl_set_current_pool (apr_pool_t
 %ignore svn_opt_parse_all_args;
 #endif
 
+#ifdef SWIGPYTHON
+# The auth baton depends on the providers, so we preserve a
+# reference to them inside the wrapper. This way, if all external
+# references to the providers are gone, they will still be alive,
+# keeping the baton valid.
+%feature("pythonappend") svn_auth_open %{
+  val.__dict__["_deps"] = list(args[0])
+%}
+#endif
+
 /* ----------------------------------------------------------------------- */
 
 %include svn_error_codes_h.swg
@@ -775,6 +785,10 @@ svn_swig_pl_set_current_pool (apr_pool_t
 #endif
 
 #ifdef SWIGPERL
+/* The apr_file_t* 'in' typemap can't cope with struct members, and there
+   is no reason to change this one. */
+%immutable svn_patch_t::patch_file;
+
 %include svn_diff_h.swg
 %include svn_error_h.swg
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy.swg
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy.swg?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy.swg (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy.swg Tue Aug 10 18:06:17 2010
@@ -28,6 +28,37 @@
  *       that lets us gracefully handle objects that are allocated from
  *       a pool that's been cleared or destroyed.
  */
+ 
+%pythoncode %{
+  def _copy_metadata_deep(value, old_value):
+    """Copy all attributes of old_value into value, recursively traversing
+    lists and dicts if needed."""
+    if value is None or old_value is None or value is old_value: return
+    
+    if isinstance(value, dict):
+      for k, v in value.iteritems():
+        _copy_metadata_deep(v, old_value[k])
+    elif isinstance(value, list):
+      for v, old_v in zip(value, old_value):
+        _copy_metadata_deep(v, old_v)
+    else:
+      try:
+        value.__dict__.update(old_value.__dict__)
+      except AttributeError:
+        pass
+        
+  def _assert_valid_deep(value):
+    """Assert value's validity, recursively traversing lists and dicts."""
+    if isinstance(value, dict):
+      for v in value.itervalues():
+        _assert_valid_deep(v)
+    elif isinstance(value, list):
+      for v in value:
+        _assert_valid_deep(v)
+    else:
+      if hasattr(value, "assert_valid"):
+        value.assert_valid()
+%}
 
 /* Default code for all wrapped proxy classes in Python */
 %define %proxy_pythoncode(TYPE)
@@ -52,21 +83,14 @@
 
     value = _swig_getattr(self, self.__class__, name)
 
-    # Now, if this item has changed, SWIG must have generated a new object.
-    # Copy the pool metadata from the old object over to the new one.
+    # If we got back a different object than we have, we need to copy all our
+    # metadata into it, so that it looks identical
     members = self.__dict__.get("_members")
     if members is not None:
-      old_value = members.get(name)
-      if (old_value is not None and value is not None and
-          value is not old_value):
-        try:
-          value.__dict__.update(old_value.__dict__)
-        except AttributeError:
-          pass
-
+      _copy_metadata_deep(value, members.get(name))
+        
     # Verify that the new object is good
-    if hasattr(value, "assert_valid"):
-      value.assert_valid()
+    _assert_valid_deep(value)
 
     return value
 

Propchange: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy.swg
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/proxy_apr.swg
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_containers.swg
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_containers.swg?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_containers.swg (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_containers.swg Tue Aug 10 18:06:17 2010
@@ -55,17 +55,7 @@
 
 %hash_argout_typemap(dirents, svn_dirent_t *)
 %hash_argout_typemap(locks, svn_lock_t *)
-#ifdef SWIGPYTHON
-/* FIXME: We are effectively treating this hash as an opaque blob...
-   this is because we currently do not have suitable typemaps to convert
-   it back to an apr_hash_t * for use. */
-%typemap(argout) apr_hash_t **cfg_hash {
-  %append_output(svn_swig_NewPointerObj(*$1, $descriptor(apr_hash_t *),
-                                        _global_py_pool, args));
-}
-#else
 %hash_argout_typemap(cfg_hash, svn_config_t *)
-#endif
 
 /* -----------------------------------------------------------------------
    Output of apr_hash_t * <const char *, svn_string_t *>
@@ -204,7 +194,8 @@
       SWIG_fail;
   }
 
-  $1 = svn_swig_py_changed_path_hash_from_dict($input, _global_pool);
+  $1 = svn_swig_py_struct_ptr_hash_from_dict($input,
+    $descriptor(svn_log_changed_path_t *), _global_pool);
   if (PyErr_Occurred()) {
     SWIG_fail;
   }
@@ -213,6 +204,44 @@
 {
   %append_output(svn_swig_py_changed_path_hash_to_dict($1));
 }
+
+/* apr_hash_t * <const char *, svn_config_t *> */
+%typemap(in) apr_hash_t *config
+  (apr_pool_t *_global_pool = NULL, PyObject *_global_py_pool = NULL)
+{
+  if (_global_pool == NULL)
+  {
+    if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+                                    &_global_py_pool, &_global_pool))
+      SWIG_fail;
+  }
+
+  $1 = svn_swig_py_struct_ptr_hash_from_dict($input,
+    $descriptor(svn_config_t *), _global_pool);
+  if (PyErr_Occurred())
+    SWIG_fail;
+}
+
+%typemap(out) apr_hash_t *config
+{
+  /* HACK. We don't know which pool the config comes from, and we
+     can't copy it, because svn_config_t is not copyable. So we'll just
+     assume that it's the parent struct's pool. It shouldn't matter
+     anyway, because the only way a non-null config can end up in
+     svn_client_ctx_t is if we assigned it ourselves, in which case the copy
+     that's stored in the Python object will become the result; so this is just
+     a safety net. */
+  apr_pool_t *parent_pool;
+  PyObject *parent_py_pool;
+  
+  if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+                                  &parent_py_pool, &parent_pool))
+    SWIG_fail;
+  
+  %append_output(svn_swig_py_convert_hash($1, $descriptor(svn_config_t *),
+    parent_py_pool));
+}
+
 #endif
 
 #ifdef SWIGRUBY
@@ -466,10 +495,13 @@
 
 #ifdef SWIGPYTHON
 %typemap(in) apr_array_header_t *location_revisions {
-    $1 = (apr_array_header_t *) svn_swig_py_revnums_to_array($input,
-                                                             _global_pool);
-    if ($1 == NULL)
-        SWIG_fail;
+    $1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+      sizeof(svn_revnum_t),
+      svn_swig_py_unwrap_revnum,
+      NULL,
+      _global_pool);
+    if (PyErr_Occurred())
+      SWIG_fail;
 }
 #endif
 #ifdef SWIGRUBY
@@ -484,16 +516,11 @@
 
 #ifdef SWIGPYTHON
 %typemap(in) const apr_array_header_t *STRINGLIST {
-    $1 = (apr_array_header_t *) svn_swig_py_strings_to_array($input,
-                                                             _global_pool);
-    if (PyErr_Occurred())
-      SWIG_fail;
-}
-%typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
-    $1 = ($input == Py_None) 
-           ? NULL
-           : (apr_array_header_t *)svn_swig_py_strings_to_array($input,
-                                                                _global_pool);
+    $1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+      sizeof(const char *),
+      svn_swig_py_unwrap_string,
+      NULL,
+      _global_pool);
     if (PyErr_Occurred())
       SWIG_fail;
 }
@@ -549,27 +576,13 @@
 
 #ifdef SWIGPYTHON
 %typemap(in) apr_array_header_t *providers {
-    svn_auth_provider_object_t *provider;
-    int targlen;
-    if (!PySequence_Check($input)) {
-        PyErr_SetString(PyExc_TypeError, "not a sequence");
-        SWIG_fail;
-    }
-    
-    targlen = PySequence_Length($input);
-    if (targlen < 0)
-        return NULL;
-
-    $1 = apr_array_make(_global_pool, targlen, sizeof(provider));
-    ($1)->nelts = targlen;
-    while (targlen--) {
-        provider = svn_swig_MustGetPtr(PySequence_GetItem($input, targlen),
-          $descriptor(svn_auth_provider_object_t *), $svn_argnum);
-        if (PyErr_Occurred()) {
-          SWIG_fail;
-        }
-        APR_ARRAY_IDX($1, targlen, svn_auth_provider_object_t *) = provider;
-    }
+    $1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+      sizeof(const svn_auth_provider_object_t *),
+      svn_swig_py_unwrap_struct_ptr,
+      $descriptor(svn_auth_provider_object_t *),
+      _global_pool);
+    if (PyErr_Occurred())
+      SWIG_fail;
 }
 #endif
 
@@ -651,10 +664,14 @@
 */
 #ifdef SWIGPYTHON
 %typemap(in) apr_array_header_t *RANGELIST {
-  $1 = svn_swig_py_rangelist_to_array($input, _global_pool);
-  if (PyErr_Occurred()) {
-    SWIG_fail;
-  }
+    $1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+      sizeof(const svn_merge_range_t *),
+      svn_swig_py_unwrap_struct_ptr,
+      $descriptor(svn_merge_range_t *),
+      _global_pool);
+    if (PyErr_Occurred()) {
+      SWIG_fail;
+    }
 }
 #endif
 
@@ -678,11 +695,14 @@
 */
 #ifdef SWIGPYTHON
 %typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
-  $1 = (apr_array_header_t *) svn_swig_py_struct_ptr_list_to_array($input,
-    $descriptor(svn_opt_revision_range_t *), _global_pool);
-  if (PyErr_Occurred()) {
-    SWIG_fail;
-  }
+    $1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+      sizeof(const svn_opt_revision_range_t *),
+      svn_swig_py_unwrap_struct_ptr,
+      $descriptor(svn_opt_revision_range_t *),
+      _global_pool);
+    if (PyErr_Occurred()) {
+      SWIG_fail;
+    }
 }
 #endif
 
@@ -794,7 +814,12 @@
 %typemap(in) apr_array_header_t **RANGELIST_INOUT ($*1_ltype temp)
 {
   $1 = &temp;
-  *$1 = svn_swig_py_rangelist_to_array($input, _global_pool);
+  *$1 = (apr_array_header_t *) svn_swig_py_seq_to_array($input,
+    sizeof(const svn_merge_range_t *),
+    svn_swig_py_unwrap_struct_ptr,
+    $descriptor(svn_merge_range_t *),
+    _global_pool);
+      
   if (PyErr_Occurred()) {
     SWIG_fail;
   }

Propchange: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_global.swg
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_types.swg?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/include/svn_types.swg Tue Aug 10 18:06:17 2010
@@ -157,6 +157,10 @@
   svn_wc_status_t **,
   svn_wc_status2_t **,
   svn_wc_committed_queue_t **,
+#ifdef SWIGRUBY
+  /* Only tested for Ruby */
+  svn_wc_context_t **,
+#endif
   void **set_locks_baton
 };
 
@@ -592,7 +596,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
     apr_pool_t *dir_pool,
     apr_pool_t *file_pool,
     apr_pool_t *node_pool,
-    apr_pool_t *result_pool
+    apr_pool_t *result_pool,
+    apr_pool_t *scratch_pool
 };
 #endif
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/perl/native/Client.pm?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/perl/native/Client.pm Tue Aug 10 18:06:17 2010
@@ -46,7 +46,7 @@ SVN::Client - Subversion client function
               SVN::Client::get_username_provider()]
               );
 
-    $ctx->cat (\*STDOUT, 'http://svn.collab.net/repos/svn/trunk/README',
+    $ctx->cat (\*STDOUT, 'http://svn.apache.org/repos/asf/subversion/trunk/README',
                'HEAD');
 
     sub simple_prompt {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/__init__.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/__init__.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/__init__.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/__init__.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # __init__.py:  defines this directory as the 'libsvn' package.
 #
 #  Subversion is a tool for revision control.
-#  See http://subversion.tigris.org for more information.
+#  See http://subversion.apache.org for more information.
 #
 # ====================================================================
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Tue Aug 10 18:06:17 2010
@@ -878,57 +878,6 @@ PyObject *svn_swig_py_changed_path_hash_
   return dict;
 }
 
-apr_array_header_t *svn_swig_py_rangelist_to_array(PyObject *list,
-                                                   apr_pool_t *pool)
-{
-  Py_ssize_t inputlen;
-  int targlen;
-  apr_array_header_t *temp;
-
-  if (!PySequence_Check(list)) {
-    PyErr_SetString(PyExc_TypeError, "not a sequence");
-    return NULL;
-  }
-
-  inputlen = PySequence_Length(list);
-
-  if (inputlen < 0)
-      return NULL;
-
-  if (inputlen > INT_MAX)
-    {
-      PyErr_SetString(PyExc_ValueError, "too many elements");
-      return NULL;
-    }
-
-  targlen = (int) inputlen;
-  temp = apr_array_make(pool, targlen, sizeof(svn_merge_range_t *));
-  /* APR_ARRAY_IDX doesn't actually increment the array item count
-     (like, say, apr_array_push would). */
-  temp->nelts = targlen;
-  while (targlen--) {
-      PyObject *o = PySequence_GetItem(list, targlen);
-      svn_merge_range_t *range;
-      svn_merge_range_t *newrange;
-
-      if (o == NULL)
-        return NULL;
-      if (svn_swig_ConvertPtrString(o, (void **)&range,
-                                    "svn_merge_range_t *"))
-        {
-          PyErr_SetString(PyExc_TypeError,
-                          "list values are not svn_merge_range_t *'s");
-          Py_DECREF(list);
-          return NULL;
-        }
-      newrange = svn_merge_range_dup(range, pool);
-
-      APR_ARRAY_IDX(temp, targlen, svn_merge_range_t *) = newrange;
-      Py_DECREF(o);
-  }
-  return temp;
-}
-
 apr_hash_t *svn_swig_py_stringhash_from_dict(PyObject *dict,
                                              apr_pool_t *pool)
 {
@@ -990,7 +939,12 @@ apr_hash_t *svn_swig_py_mergeinfo_from_d
       PyObject *key = PyList_GetItem(keys, i);
       PyObject *value = PyDict_GetItem(dict, key);
       const char *pathname = make_string_from_ob(key, pool);
-      apr_array_header_t *ranges = svn_swig_py_rangelist_to_array(value, pool);
+      const apr_array_header_t *ranges = svn_swig_py_seq_to_array(value,
+        sizeof(const svn_merge_range_t *),
+        svn_swig_py_unwrap_struct_ptr,
+        svn_swig_TypeQuery("svn_merge_range_t *"),
+        pool
+      );
 
       if (! (pathname && ranges))
         {
@@ -1135,8 +1089,9 @@ apr_hash_t *svn_swig_py_path_revs_hash_f
   return hash;
 }
 
-apr_hash_t *svn_swig_py_changed_path_hash_from_dict(PyObject *dict,
-                                                    apr_pool_t *pool)
+apr_hash_t *svn_swig_py_struct_ptr_hash_from_dict(PyObject *dict,
+                                                  swig_type_info *type,
+                                                  apr_pool_t *pool)
 {
   apr_hash_t *hash;
   PyObject *keys;
@@ -1157,155 +1112,111 @@ apr_hash_t *svn_swig_py_changed_path_has
   for (i = 0; i < num_keys; i++)
     {
       PyObject *key = PyList_GetItem(keys, i);
-      PyObject *py_changed_path = PyDict_GetItem(dict, key);
-      const char *path = make_string_from_ob(key, pool);
-      svn_log_changed_path_t *changed_path;
-      if (!path)
+      PyObject *value = PyDict_GetItem(dict, key);
+      const char *c_key = make_string_from_ob(key, pool);
+      void *struct_ptr;
+      int status;
+
+      if (!c_key)
         {
           PyErr_SetString(PyExc_TypeError,
                           "dictionary keys aren't strings");
           Py_DECREF(keys);
           return NULL;
         }
-      svn_swig_ConvertPtrString(py_changed_path, (void *)&changed_path,
-                                "svn_log_changed_path_t *");
-      if (!changed_path)
+      status = svn_swig_ConvertPtr(value, &struct_ptr, type);
+      if (status != 0)
         {
           PyErr_SetString(PyExc_TypeError,
-                          "dictionary values aren't svn_log_changed_path_t");
+            "dictionary values aren't SWIG proxies of correct type");
           Py_DECREF(keys);
           return NULL;
         }
-      apr_hash_set(hash, path, APR_HASH_KEY_STRING, changed_path);
+      apr_hash_set(hash, c_key, APR_HASH_KEY_STRING, struct_ptr);
     }
   Py_DECREF(keys);
   return hash;
 }
 
-const apr_array_header_t *svn_swig_py_strings_to_array(PyObject *source,
-                                                       apr_pool_t *pool)
+int
+svn_swig_py_unwrap_string(PyObject *source,
+                          void *destination,
+                          void *baton)
 {
-    Py_ssize_t inputlen;
-    int targlen;
-    apr_array_header_t *temp;
+    const char **ptr_dest = destination;
+    *ptr_dest = PyString_AsString(source);
 
-    if (source == Py_None)
-      return NULL;
-
-    if (!PySequence_Check(source))
-      {
-        PyErr_SetString(PyExc_TypeError, "not a sequence");
-        return NULL;
-      }
-
-    inputlen = PySequence_Length(source);
+    if (*ptr_dest != NULL)
+        return 0;
+    else
+        return -1;
+}
 
-    if (inputlen < 0)
-        return NULL;
+int
+svn_swig_py_unwrap_revnum(PyObject *source,
+                          void *destination,
+                          void *baton)
+{
+    svn_revnum_t *revnum_dest = destination;
 
-    if (inputlen > INT_MAX)
+    if (PyInt_Check(source))
       {
-        PyErr_SetString(PyExc_ValueError, "too many elements");
-        return NULL;
+        *revnum_dest = PyInt_AsLong(source);
+        if (PyErr_Occurred()) return -1;
+        return 0;
       }
-
-    targlen = (int) inputlen;
-    temp = apr_array_make(pool, targlen, sizeof(const char *));
-    /* APR_ARRAY_IDX doesn't actually increment the array item count
-       (like, say, apr_array_push would). */
-    temp->nelts = targlen;
-    while (targlen--)
+    if (PyLong_Check(source))
       {
-        PyObject *o = PySequence_GetItem(source, targlen);
-        if (o == NULL)
-            return NULL;
-        if (!PyString_Check(o))
-          {
-            Py_DECREF(o);
-            PyErr_SetString(PyExc_TypeError, "not a string");
-            return NULL;
-          }
-        APR_ARRAY_IDX(temp, targlen, const char *) = PyString_AS_STRING(o);
-        Py_DECREF(o);
+        *revnum_dest = PyLong_AsLong(source);
+        if (PyErr_Occurred()) return -1;
+        return 0;
       }
-    return temp;
-}
 
+    PyErr_SetString(PyExc_TypeError, "not an integer type");
+    return -1;
+}
 
-const apr_array_header_t *svn_swig_py_revnums_to_array(PyObject *source,
-                                                       apr_pool_t *pool)
+int
+svn_swig_py_unwrap_struct_ptr(PyObject *source,
+                          void *destination,
+                          void *baton)
 {
-    Py_ssize_t inputlen;
-    int targlen;
-    apr_array_header_t *temp;
+    void **ptr_dest = destination;
+    swig_type_info *type_descriptor = baton;
 
-    if (!PySequence_Check(source))
-      {
-        PyErr_SetString(PyExc_TypeError, "not a sequence");
-        return NULL;
-      }
+    int status = svn_swig_ConvertPtr(source, ptr_dest, type_descriptor);
 
-    inputlen = PySequence_Length(source);
-
-    if (inputlen < 0)
-        return NULL;
-
-    if (inputlen > INT_MAX)
+    if (status != 0)
       {
-        PyErr_SetString(PyExc_ValueError, "too many elements");
-        return NULL;
+        PyErr_SetString(PyExc_TypeError, "not a SWIG proxy of correct type");
+        return -1;
       }
 
-    targlen = (int) inputlen;
-    temp = apr_array_make(pool, targlen, sizeof(svn_revnum_t));
-    /* APR_ARRAY_IDX doesn't actually increment the array item count
-       (like, say, apr_array_push would). */
-    temp->nelts = targlen;
-    while (targlen--)
-      {
-        PyObject *o = PySequence_GetItem(source, targlen);
-        if (o == NULL)
-            return NULL;
-        if (PyLong_Check(o))
-          {
-            APR_ARRAY_IDX(temp, targlen, svn_revnum_t) =
-              (svn_revnum_t)PyLong_AsLong(o);
-          }
-        else if (PyInt_Check(o))
-          {
-            APR_ARRAY_IDX(temp, targlen, svn_revnum_t) =
-              (svn_revnum_t)PyInt_AsLong(o);
-          }
-        else
-          {
-            Py_DECREF(o);
-            PyErr_SetString(PyExc_TypeError, "not an integer type");
-            return NULL;
-          }
-        Py_DECREF(o);
-    }
-    return temp;
+    return 0;
 }
 
+
 const apr_array_header_t *
-svn_swig_py_struct_ptr_list_to_array(PyObject *source,
-                                     swig_type_info *type_descriptor,
-                                     apr_pool_t *pool)
+svn_swig_py_seq_to_array(PyObject *seq,
+                         int element_size,
+                         svn_swig_py_object_unwrap_t unwrap_func,
+                         void *unwrap_baton,
+                         apr_pool_t *pool)
 {
     Py_ssize_t inputlen;
-    int targlen;
+    int targlen, i;
     apr_array_header_t *temp;
 
-    if (source == Py_None)
+    if (seq == Py_None)
         return NULL;
 
-    if (!PySequence_Check(source))
+    if (!PySequence_Check(seq))
       {
         PyErr_SetString(PyExc_TypeError, "not a sequence");
         return NULL;
       }
 
-    inputlen = PySequence_Length(source);
+    inputlen = PySequence_Length(seq);
 
     if (inputlen < 0)
         return NULL;
@@ -1317,32 +1228,25 @@ svn_swig_py_struct_ptr_list_to_array(PyO
       }
 
     targlen = (int) inputlen;
-    temp = apr_array_make(pool, targlen, sizeof(void *));
+    temp = apr_array_make(pool, targlen, element_size);
 
-    temp->nelts = targlen;
-    while (targlen--)
+    for (i = 0; i < targlen; ++i)
       {
-        void *struct_ptr;
         int status;
-        PyObject *o = PySequence_GetItem(source, targlen);
+        void * elt_ptr;
+        PyObject *o = PySequence_GetItem(seq, i);
+
         if (o == NULL)
-          return NULL;
+            return NULL;
 
-        status = svn_swig_ConvertPtr(o, &struct_ptr, type_descriptor);
+        elt_ptr = apr_array_push(temp);
+        status = unwrap_func(o, elt_ptr, unwrap_baton);
+        Py_DECREF(o);
 
-        if (status == 0)
-          {
-            APR_ARRAY_IDX(temp, targlen, void *) = struct_ptr;
-            Py_DECREF(o);
-          }
-        else
-          {
-            Py_DECREF(o);
-            PyErr_SetString(PyExc_TypeError,
-                            "not a SWIG proxy of correct type");
+        if (status < 0)
             return NULL;
-          }
       }
+
     return temp;
 }
 
@@ -1416,11 +1320,57 @@ commit_item_array_to_list(const apr_arra
 
 /*** Errors ***/
 
-/* Return a Subversion error about a failed callback. */
+/* If the currently set Python exception is a valid SubversionException,
+   clear exception state and transform it into a Subversion error.
+   Otherwise, return a Subversion error about an exception in a callback. */
 static svn_error_t *callback_exception_error(void)
 {
-  return svn_error_create(SVN_ERR_SWIG_PY_EXCEPTION_SET, NULL,
-                          "Python callback raised an exception");
+  PyObject *svn_module = NULL, *svn_exc = NULL;
+  PyObject *exc, *exc_type, *exc_traceback;
+  PyObject *message_ob = NULL, *apr_err_ob = NULL;
+  const char *message;
+  int apr_err;
+  svn_error_t *rv = NULL;
+
+  PyErr_Fetch(&exc_type, &exc, &exc_traceback);
+
+  if ((svn_module = PyImport_ImportModule("svn.core")) == NULL)
+    goto finished;
+  if ((svn_exc = PyObject_GetAttrString(svn_module, "SubversionException"))
+      == NULL)
+    goto finished;
+
+  if (!PyErr_GivenExceptionMatches(exc_type, svn_exc))
+    {
+      PyErr_Restore(exc_type, exc, exc_traceback);
+      exc = exc_type = exc_traceback = NULL;
+      goto finished;
+    }
+
+  if ((apr_err_ob = PyObject_GetAttrString(exc, "apr_err")) == NULL)
+    goto finished;
+  apr_err = PyInt_AsLong(apr_err_ob);
+  if (PyErr_Occurred()) goto finished;
+
+  if ((message_ob = PyObject_GetAttrString(exc, "message")) == NULL)
+    goto finished;
+  message = PyString_AsString(message_ob);
+  if (PyErr_Occurred()) goto finished;
+
+  /* A possible improvement here would be to convert the whole
+     SubversionException chain. */
+  rv = svn_error_create(apr_err, NULL, message);
+
+finished:
+  Py_XDECREF(exc);
+  Py_XDECREF(exc_type);
+  Py_XDECREF(exc_traceback);
+  Py_XDECREF(svn_module);
+  Py_XDECREF(svn_exc);
+  Py_XDECREF(apr_err_ob);
+  Py_XDECREF(message_ob);
+  return rv ? rv : svn_error_create(SVN_ERR_SWIG_PY_EXCEPTION_SET, NULL,
+                                    "Python callback raised an exception");
 }
 
 /* Raise a TypeError exception with MESSAGE, and return a Subversion

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Tue Aug 10 18:06:17 2010
@@ -179,10 +179,6 @@ PyObject *svn_swig_py_array_to_list(cons
 SVN_SWIG_SWIGUTIL_EXPORT
 PyObject *svn_swig_py_changed_path_hash_to_dict(apr_hash_t *hash);
 
-SVN_SWIG_SWIGUTIL_EXPORT
-apr_array_header_t *svn_swig_py_rangelist_to_array(PyObject *list,
-                                                   apr_pool_t *pool);
-
 /* helper function to convert an array of 'svn_revnum_t' to a Python list
    of int objects */
 SVN_SWIG_SWIGUTIL_EXPORT
@@ -229,35 +225,59 @@ apr_hash_t *svn_swig_py_path_revs_hash_f
                                                  apr_pool_t *pool);
 
 /* helper function to convert a Python dictionary mapping strings to
-   strings into an apr_hash_t mapping const char *'s to svn_string_t *'s,
-   allocated in POOL. */
+   SWIG wrappers described by type into an apr_hash_t mapping const char *'s to
+   struct pointers, allocated in POOL. */
 SVN_SWIG_SWIGUTIL_EXPORT
-apr_hash_t *svn_swig_py_changed_path_hash_from_dict(PyObject *dict,
-                                                    apr_pool_t *pool);
+apr_hash_t *svn_swig_py_struct_ptr_hash_from_dict(PyObject *dict,
+                                                  swig_type_info *type,
+                                                  apr_pool_t *pool);
 
-/* helper function to convert a Python sequence of strings into an
-   'apr_array_header_t *' of 'const char *' objects.  Note that the
-   objects must remain alive -- the values are not copied. This is
-   appropriate for incoming arguments which are defined to last the
-   duration of the function's execution.  */
-SVN_SWIG_SWIGUTIL_EXPORT
-const apr_array_header_t *svn_swig_py_strings_to_array(PyObject *source,
-                                                       apr_pool_t *pool);
-
-/* like svn_swig_py_strings_to_array(), but for array's of 'svn_revnum_t's. */
-SVN_SWIG_SWIGUTIL_EXPORT
-const apr_array_header_t *svn_swig_py_revnums_to_array(PyObject *source,
-                                                       apr_pool_t *pool);
-
-/* helper function to convert a Python sequence of SWIG wrapper objects
-   into an APR array of pointers to the wrapped structs. The structs themselves
-   are not copied. */
+/* Callback function for use in data structure conversion routines. It is
+   supposed to extract a C value of a certain type from object, write it into
+   the location given by destination, and return zero. If that turns out to be
+   infeasible, it shall raise a Python exception and return a negative value. */
+typedef int (*svn_swig_py_object_unwrap_t)(PyObject *source,
+                                           void *destination,
+                                           void *baton);
+
+/* Helper function to convert a Python sequence into an immutable APR array. The
+   resulting array's elements will be presumed to be of size element_size and
+   will be obtained by applying unwrap_func/unwrap_baton to elements from seq.
+   If seq is None, returns NULL.
+   In case of failure, raises a Python exception, presuming that seq was the
+   function argument #argnum.
+   pool is used to allocate the array. */
 SVN_SWIG_SWIGUTIL_EXPORT
 const apr_array_header_t *
-svn_swig_py_struct_ptr_list_to_array(PyObject *source,
-                                     swig_type_info *type_descriptor,
-                                     apr_pool_t *pool);
-
+svn_swig_py_seq_to_array(PyObject *seq,
+                         int element_size,
+                         svn_swig_py_object_unwrap_t unwrap_func,
+                         void *unwrap_baton,
+                         apr_pool_t *pool);
+
+/* An svn_swig_py_object_unwrap_t that extracts a char pointer from a Python
+   string. */
+SVN_SWIG_SWIGUTIL_EXPORT
+int
+svn_swig_py_unwrap_string(PyObject *source,
+                          void *destination,
+                          void *baton);
+
+/* An svn_swig_py_object_unwrap_t that extracts an svn_revnum_t from a Python
+   integer. */
+SVN_SWIG_SWIGUTIL_EXPORT
+int
+svn_swig_py_unwrap_revnum(PyObject *source,
+                          void *destination,
+                          void *baton);
+
+/* An svn_swig_py_object_unwrap_t that extracts a struct pointer from a SWIG
+   wrapper. baton is expected to be a swig_type_info* describing the struct. */
+SVN_SWIG_SWIGUTIL_EXPORT
+int
+svn_swig_py_unwrap_struct_ptr(PyObject *source,
+                          void *destination,
+                          void *baton);
 
 /* make an editor that "thunks" from C callbacks up to Python */
 SVN_SWIG_SWIGUTIL_EXPORT

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/__init__.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/__init__.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/__init__.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/__init__.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # __init__.py: defines this directory as the 'svn' package
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one
@@ -23,5 +23,5 @@
 #    under the License.
 ######################################################################
 
-__all__ = ['core', 'client', 'delta', 'fs', 'ra', 'repos', 'wc']
+__all__ = ['core', 'client', 'delta', 'diff', 'fs', 'ra', 'repos', 'wc']
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/client.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/client.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/client.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/client.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # client.py: public Python interface for client components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/core.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/core.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/core.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # core.py: public Python interface for core components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/delta.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/delta.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/delta.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # delta.py: public Python interface for delta components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/diff.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/diff.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/diff.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/diff.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # diff.py: public Python interface for diff components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/fs.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/fs.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/fs.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # fs.py: public Python interface for fs components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/ra.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/ra.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/ra.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/ra.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # ra.py: public Python interface for ra components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/repos.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/repos.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/repos.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/repos.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # repos.py: public Python interface for repos components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/wc.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/wc.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/svn/wc.py Tue Aug 10 18:06:17 2010
@@ -2,7 +2,7 @@
 # wc.py: public Python interface for wc components
 #
 # Subversion is a tool for revision control.
-# See http://subversion.tigris.org for more information.
+# See http://subversion.apache.org for more information.
 #
 ######################################################################
 #    Licensed to the Apache Software Foundation (ASF) under one

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/auth.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/auth.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/auth.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/auth.py Tue Aug 10 18:06:17 2010
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, os, setup_path, sys
+import unittest, setup_path
 
 from svn import core
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/client.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/client.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/client.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/client.py Tue Aug 10 18:06:17 2010
@@ -20,9 +20,7 @@
 #
 import unittest, os, weakref, tempfile, setup_path
 
-from svn import core, repos, fs, delta, client, wc
-from svn.core import SubversionException
-import weakref
+from svn import core, client, wc
 
 from trac.versioncontrol.tests.svn_fs import SubversionRepositoryTestSetup, \
   REPOS_PATH, REPOS_URL
@@ -78,8 +76,8 @@ class SubversionClientTestCase(unittest.
     # We have to free client_ctx first, since it may be holding handles
     # to WC DBs
     del self.client_ctx
-    for dir in self.cleanup_dirs:
-      core.svn_io_remove_dir(dir)
+    for directory in self.cleanup_dirs:
+      core.svn_io_remove_dir(directory)
 
   def allocate_temp_dir(self, suffix = ""):
     temp_dir_name = core.svn_dirent_internal_style(tempfile.mkdtemp(suffix))
@@ -194,30 +192,30 @@ class SubversionClientTestCase(unittest.
 
   def test_mkdir_url(self):
     """Test svn_client_mkdir2 on a file:// URL"""
-    dir = urljoin(REPOS_URL+"/", "dir1")
+    directory = urljoin(REPOS_URL+"/", "dir1")
 
-    commit_info = client.mkdir2((dir,), self.client_ctx)
+    commit_info = client.mkdir2((directory,), self.client_ctx)
     self.assertEqual(commit_info.revision, 13)
     self.assertEqual(self.log_message_func_calls, 1)
 
   def test_mkdir_url_with_revprops(self):
     """Test svn_client_mkdir3 on a file:// URL, with added revprops"""
-    dir = urljoin(REPOS_URL+"/", "some/deep/subdir")
+    directory = urljoin(REPOS_URL+"/", "some/deep/subdir")
 
-    commit_info = client.mkdir3((dir,), 1, {'customprop':'value'},
+    commit_info = client.mkdir3((directory,), 1, {'customprop':'value'},
                                 self.client_ctx)
     self.assertEqual(commit_info.revision, 14)
     self.assertEqual(self.log_message_func_calls, 1)
 
   def test_log3_url(self):
     """Test svn_client_log3 on a file:// URL"""
-    dir = urljoin(REPOS_URL+"/", "trunk/dir1")
+    directory = urljoin(REPOS_URL+"/", "trunk/dir1")
 
     start = core.svn_opt_revision_t()
     end = core.svn_opt_revision_t()
     core.svn_opt_parse_revision(start, end, "4:0")
-    client.log3((dir,), start, start, end, 1, True, False, self.log_receiver,
-        self.client_ctx)
+    client.log3((directory,), start, start, end, 1, True, False,
+        self.log_receiver, self.client_ctx)
     self.assertEqual(self.change_author, "john")
     self.assertEqual(self.log_message, "More directories.")
     self.assertEqual(len(self.changed_paths), 3)
@@ -363,11 +361,11 @@ class SubversionClientTestCase(unittest.
     end.kind = core.svn_opt_revision_number
     end.value.number = 9
 
-    range = core.svn_opt_revision_range_t()
-    range.start = start
-    range.end = end
+    rrange = core.svn_opt_revision_range_t()
+    rrange.start = start
+    rrange.end = end
 
-    client.merge_peg3(v1x_path, (range,), end, trunk_path,
+    client.merge_peg3(v1x_path, (rrange,), end, trunk_path,
                       core.svn_depth_infinity, False, False, False, False,
                       None, self.client_ctx)
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/core.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/core.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/core.py Tue Aug 10 18:06:17 2010
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, os
+import unittest
 
 import svn.core
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/delta.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/delta.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/delta.py Tue Aug 10 18:06:17 2010
@@ -34,8 +34,8 @@ class DeltaTestCase(unittest.TestCase):
 
   def testTxWindowHandler(self):
     """Test tx_invoke_window_handler"""
-    src_stream = StringIO("hello world");
-    target_stream = StringIO("bye world");
+    src_stream = StringIO("hello world")
+    target_stream = StringIO("bye world")
 
     # Invoke the window_handler using a helper function
     window_handler, baton = \
@@ -52,4 +52,4 @@ def suite():
 
 if __name__ == '__main__':
   runner = unittest.TextTestRunner()
-  runner.run(suite());
+  runner.run(suite())

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/mergeinfo.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/mergeinfo.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/mergeinfo.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/mergeinfo.py Tue Aug 10 18:06:17 2010
@@ -32,7 +32,6 @@ else:
     from StringIO import StringIO
 
 from svn import core, repos, fs
-from svn.core import SubversionException
 
 from trac.versioncontrol.tests.svn_fs import REPOS_PATH
 
@@ -101,13 +100,13 @@ class SubversionMergeinfoTestCase(unitte
   def test_rangelist_reverse(self):
     mergeinfo = core.svn_mergeinfo_parse(self.TEXT_MERGEINFO1)
     rangelist = mergeinfo.get(self.MERGEINFO_SRC)
-    reversed = core.svn_rangelist_reverse(rangelist)
+    reversed_rl = core.svn_rangelist_reverse(rangelist)
     expected_ranges = ((42, 41), (27, 26), (9, 2))
-    for i in range(0, len(reversed)):
-      self.assertEquals(reversed[i].start, expected_ranges[i][0],
-                        "Unexpected range start: %d" % reversed[i].start)
-      self.assertEquals(reversed[i].end, expected_ranges[i][1],
-                        "Unexpected range end: %d" % reversed[i].end)
+    for i in range(0, len(reversed_rl)):
+      self.assertEquals(reversed_rl[i].start, expected_ranges[i][0],
+                        "Unexpected range start: %d" % reversed_rl[i].start)
+      self.assertEquals(reversed_rl[i].end, expected_ranges[i][1],
+                        "Unexpected range end: %d" % reversed_rl[i].end)
 
   def test_mergeinfo_sort(self):
     mergeinfo = core.svn_mergeinfo_parse(self.TEXT_MERGEINFO1)

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/pool.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/pool.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/pool.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/pool.py Tue Aug 10 18:06:17 2010
@@ -19,6 +19,7 @@
 #
 #
 import unittest, weakref, setup_path
+import os, tempfile
 import svn.core, svn.client, libsvn.core
 from svn.core import *
 from libsvn.core import application_pool, GenericSWIGWrapper
@@ -29,27 +30,54 @@ class PoolTestCase(unittest.TestCase):
 
   def assertNotNone(self, value):
     """Assert that the specified value is not None"""
-    return self.assertNotEqual(value, None);
+    return self.assertNotEqual(value, None)
 
   def assertNone(self, value):
     """Assert that the specified value is None"""
-    return self.assertEqual(value, None);
+    return self.assertEqual(value, None)
 
   def test_object_struct_members(self):
     """Check that object struct members work correctly"""
 
     # Test good object assignment operations
     client_ctx = svn.client.svn_client_create_context()
-    config = svn.core.svn_config_get_config(None)
-    client_ctx.config = config
+    auth = svn.core.svn_auth_open([])
+    client_ctx.auth_baton = auth
 
     # Check that parent pools are set correctly on struct accesses
-    self.assertEqual(client_ctx.config._parent_pool, config._parent_pool)
+    self.assertEqual(client_ctx.auth_baton._parent_pool, auth._parent_pool)
 
     # Test bad object assignment operations
     def test_bad_assignment(self):
       head_revision = svn.core.svn_opt_revision_t()
-      head_revision.kind = config
+      head_revision.kind = auth
+    self.assertRaises(TypeError, test_bad_assignment)
+
+  def test_object_hash_struct_members(self):
+    """Check that struct members which are hashes of objects work correctly"""
+
+    # Get an empty config
+    (cfg_fd, cfg_name) = tempfile.mkstemp(prefix="conf-")
+    os.close(cfg_fd)
+
+    try:
+      cfg = svn.core.svn_config_read(
+        svn.core.svn_dirent_internal_style(cfg_name),
+        False)
+    finally:
+      os.remove(cfg_name)
+
+    client_ctx = svn.client.svn_client_create_context()
+    category = svn.core.SVN_CONFIG_CATEGORY_SERVERS
+    client_ctx.config = { category: cfg }
+
+    # Check that parent pools are set correctly
+    self.assertEqual(client_ctx.config[category]._parent_pool,
+      cfg._parent_pool)
+
+    # Test invalid assignment
+    def test_bad_assignment(self):
+      client_ctx.config = 42
     self.assertRaises(TypeError, test_bad_assignment)
 
   def test_assert_valid(self):
@@ -57,29 +85,29 @@ class PoolTestCase(unittest.TestCase):
 
     # Test assert_valid with destroy()
     client_ctx = svn.client.svn_client_create_context()
-    config = svn.core.svn_config_get_config(None)
-    wrapped_config = GenericSWIGWrapper(config, config._parent_pool)
-    client_ctx.config = config
-    config.assert_valid()
-    wrapped_config.assert_valid()
-    client_ctx.config.assert_valid()
-    config._parent_pool.destroy()
-    self.assertRaises(AssertionError, lambda: config.assert_valid())
-    self.assertRaises(AssertionError, lambda: wrapped_config.assert_valid())
-    self.assertRaises(AssertionError, lambda: client_ctx.config)
+    auth = svn.core.svn_auth_open([])
+    wrapped_auth = GenericSWIGWrapper(auth, auth._parent_pool)
+    client_ctx.auth_baton = auth
+    auth.assert_valid()
+    wrapped_auth.assert_valid()
+    client_ctx.auth_baton.assert_valid()
+    auth._parent_pool.destroy()
+    self.assertRaises(AssertionError, lambda: auth.assert_valid())
+    self.assertRaises(AssertionError, lambda: wrapped_auth.assert_valid())
+    self.assertRaises(AssertionError, lambda: client_ctx.auth_baton)
 
     # Test assert_valid with clear()
     client_ctx = svn.client.svn_client_create_context()
-    config = svn.core.svn_config_get_config(None)
-    wrapped_config = GenericSWIGWrapper(config, config._parent_pool)
-    client_ctx.config = config
-    config.assert_valid()
-    client_ctx.config.assert_valid()
-    wrapped_config.assert_valid()
-    config._parent_pool.clear()
-    self.assertRaises(AssertionError, lambda: config.assert_valid())
-    self.assertRaises(AssertionError, lambda: wrapped_config.assert_valid())
-    self.assertRaises(AssertionError, lambda: client_ctx.config)
+    auth = svn.core.svn_auth_open([])
+    wrapped_auth = GenericSWIGWrapper(auth, auth._parent_pool)
+    client_ctx.auth_baton = auth
+    auth.assert_valid()
+    wrapped_auth.assert_valid()
+    client_ctx.auth_baton.assert_valid()
+    auth._parent_pool.clear()
+    self.assertRaises(AssertionError, lambda: auth.assert_valid())
+    self.assertRaises(AssertionError, lambda: wrapped_auth.assert_valid())
+    self.assertRaises(AssertionError, lambda: client_ctx.auth_baton)
 
   def test_integer_struct_members(self):
     """Check that integer struct members work correctly"""
@@ -105,7 +133,7 @@ class PoolTestCase(unittest.TestCase):
     pool = Pool(pool)
 
     # Make sure proper exceptions are raised with incorrect input
-    self.assertRaises(TypeError, lambda: Pool("abcd"));
+    self.assertRaises(TypeError, lambda: Pool("abcd"))
 
     # Check that garbage collection is working OK
     self.assertNotNone(parent_pool_ref())
@@ -137,7 +165,7 @@ class PoolTestCase(unittest.TestCase):
     pool_ref = weakref.ref(pool)
 
     # Make sure proper exceptions are raised with incorrect input
-    self.assertRaises(TypeError, lambda: svn_pool_create("abcd"));
+    self.assertRaises(TypeError, lambda: svn_pool_create("abcd"))
 
     # Test whether pools are destroyed properly
     pool = svn_pool_create(pool)
@@ -152,7 +180,7 @@ class PoolTestCase(unittest.TestCase):
     newpool2 = Pool(newpool)
     svn_pool_clear(newpool)
     self.assertRaises(AssertionError, lambda: libsvn.core.apr_pool_destroy(newpool2))
-    self.assertRaises(AssertionError, lambda: svn_pool_destroy(newpool2));
+    self.assertRaises(AssertionError, lambda: svn_pool_destroy(newpool2))
     svn_pool_destroy(newpool)
     self.assertRaises(AssertionError, lambda: svn_pool_destroy(newpool))
 
@@ -179,7 +207,7 @@ class PoolTestCase(unittest.TestCase):
     self.assertNone(libsvn.core.application_pool)
 
     # Try to allocate memory from the old application pool
-    self.assertRaises(AssertionError, lambda: svn_pool_create(application_pool));
+    self.assertRaises(AssertionError, lambda: svn_pool_create(application_pool))
 
     # Bring the application pool back to life
     svn_pool_create()
@@ -195,4 +223,4 @@ def suite():
 
 if __name__ == '__main__':
   runner = unittest.TextTestRunner()
-  runner.run(suite());
+  runner.run(suite())

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/ra.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/ra.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/ra.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/ra.py Tue Aug 10 18:06:17 2010
@@ -18,9 +18,9 @@
 # under the License.
 #
 #
-import unittest, os, setup_path
+import unittest, setup_path
 
-from svn import core, repos, fs, delta, client, ra
+from svn import core, repos, fs, delta, ra
 from sys import version_info # For Python version check
 if version_info[0] >= 3:
   # Python >=3.0
@@ -50,7 +50,7 @@ class SubversionRepositoryAccessTestCase
     self.fs = repos.fs(self.repos)
 
     self.callbacks = ra.Callbacks()
-    self.ra_ctx = ra.open2(REPOS_URL, self.callbacks, None, None)
+    self.ra_ctx = ra.open2(REPOS_URL, self.callbacks, {})
 
   def tearDown(self):
     self.ra_ctx = None
@@ -83,10 +83,10 @@ class SubversionRepositoryAccessTestCase
   def test_get_latest_revnum(self):
     ra_revnum = ra.get_latest_revnum(self.ra_ctx)
     fs_revnum = fs.youngest_rev(self.fs)
-    self.assertEqual(ra_revnum,fs_revnum)
+    self.assertEqual(ra_revnum, fs_revnum)
 
   def test_get_dir2(self):
-    (dirents,_,props) = ra.get_dir2(self.ra_ctx, '', 1, core.SVN_DIRENT_KIND)
+    (dirents, _, props) = ra.get_dir2(self.ra_ctx, '', 1, core.SVN_DIRENT_KIND)
     self.assert_('trunk' in dirents)
     self.assert_('branches' in dirents)
     self.assert_('tags' in dirents)
@@ -96,14 +96,14 @@ class SubversionRepositoryAccessTestCase
     self.assert_(core.SVN_PROP_ENTRY_UUID in props)
     self.assert_(core.SVN_PROP_ENTRY_LAST_AUTHOR in props)
 
-    (dirents,_,_) = ra.get_dir2(self.ra_ctx, 'trunk', 1, core.SVN_DIRENT_KIND)
+    (dirents, _, _) = ra.get_dir2(self.ra_ctx, 'trunk', 1, core.SVN_DIRENT_KIND)
 
     self.assertEqual(dirents, {})
 
-    (dirents,_,_) = ra.get_dir2(self.ra_ctx, 'trunk', 10, core.SVN_DIRENT_KIND)
+    (dirents, _, _) = ra.get_dir2(self.ra_ctx, 'trunk', 10, core.SVN_DIRENT_KIND)
 
     self.assert_('README2.txt' in dirents)
-    self.assertEqual(dirents['README2.txt'].kind,core.svn_node_file)
+    self.assertEqual(dirents['README2.txt'].kind, core.svn_node_file)
 
   def test_commit3(self):
     commit_info = []
@@ -238,7 +238,7 @@ class SubversionRepositoryAccessTestCase
         def __init__(self):
             self.textdeltas = []
 
-        def apply_textdelta(self, file_baton, base_checksum):
+        def apply_textdelta(self, file_baton, base_checksum, pool=None):
             def textdelta_handler(textdelta):
                 if textdelta is not None:
                     self.textdeltas.append(textdelta)
@@ -266,7 +266,7 @@ class SubversionRepositoryAccessTestCase
     self.assertEqual(1, len(editor.textdeltas))
 
   def test_get_locations(self):
-    locations = ra.get_locations(self.ra_ctx, "trunk/README.txt", 2, list(range(1,5)))
+    locations = ra.get_locations(self.ra_ctx, "trunk/README.txt", 2, list(range(1, 5)))
     self.assertEqual(locations, {
         2: '/trunk/README.txt',
         3: '/trunk/README.txt',
@@ -382,7 +382,7 @@ class SubversionRepositoryAccessTestCase
         called[0] = True
         return 'namestring_test'
       self.callbacks.get_client_string = cb
-      svn.ra.stat(self.ra_ctx, "", 1)
+      ra.stat(self.ra_ctx, "", 1)
       self.assert_(called[0])
 
 def suite():

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/repository.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/repository.py Tue Aug 10 18:06:17 2010
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, os, setup_path, tempfile
+import unittest, setup_path, tempfile
 from sys import version_info # For Python version check
 if version_info[0] >= 3:
   # Python >=3.0
@@ -40,7 +40,7 @@ class ChangeReceiver(delta.Editor):
     self.tgt_root = tgt_root
     self.textdeltas = []
 
-  def apply_textdelta(self, file_baton, base_checksum):
+  def apply_textdelta(self, file_baton, base_checksum, pool=None):
     def textdelta_handler(textdelta):
       if textdelta is not None:
         self.textdeltas.append(textdelta)
@@ -63,6 +63,19 @@ class SubversionRepositoryTestCase(unitt
     self.fs = None
     self.repos = None
 
+  def test_cease_invocation(self):
+    """Test returning SVN_ERR_CEASE_INVOCATION from a callback"""
+
+    revs = []
+    def history_lookup(path, rev, pool):
+      revs.append(rev)
+      raise core.SubversionException(apr_err=core.SVN_ERR_CEASE_INVOCATION,
+                                     message="Hi from history_lookup")
+    
+    repos.history2(self.fs, '/trunk/README2.txt', history_lookup, None, 0,
+                   self.rev, True)
+    self.assertEqual(len(revs), 1)
+
   def test_create(self):
     """Make sure that repos.create doesn't segfault when we set fs-type
        using a config hash"""
@@ -160,7 +173,7 @@ class SubversionRepositoryTestCase(unitt
     # Check results
     self.assertEqual(editor.textdeltas[0].new_data, "This is a test.\n")
     self.assertEqual(editor.textdeltas[1].new_data, "A test.\n")
-    self.assertEqual(len(editor.textdeltas),2)
+    self.assertEqual(len(editor.textdeltas), 2)
 
   def test_retrieve_and_change_rev_prop(self):
     """Test playing with revprops"""

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/run_all.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/run_all.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/run_all.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/run_all.py Tue Aug 10 18:06:17 2010
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import sys, os, unittest, setup_path
+import unittest, setup_path
 import mergeinfo, core, client, delta, pool, ra, wc, repository, auth, \
        trac.versioncontrol.tests
 
@@ -26,18 +26,18 @@ import mergeinfo, core, client, delta, p
 
 def suite():
   """Run all tests"""
-  suite = unittest.TestSuite()
-  suite.addTest(core.suite())
-  suite.addTest(mergeinfo.suite())
-  suite.addTest(client.suite())
-  suite.addTest(delta.suite())
-  suite.addTest(pool.suite())
-  suite.addTest(ra.suite())
-  suite.addTest(wc.suite())
-  suite.addTest(repository.suite())
-  suite.addTest(auth.suite())
-  suite.addTest(trac.versioncontrol.tests.suite());
-  return suite
+  s = unittest.TestSuite()
+  s.addTest(core.suite())
+  s.addTest(mergeinfo.suite())
+  s.addTest(client.suite())
+  s.addTest(delta.suite())
+  s.addTest(pool.suite())
+  s.addTest(ra.suite())
+  s.addTest(wc.suite())
+  s.addTest(repository.suite())
+  s.addTest(auth.suite())
+  s.addTest(trac.versioncontrol.tests.suite())
+  return s
 
 if __name__ == '__main__':
   unittest.main(defaultTest='suite')

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/test.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/test.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/test.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/test.py Tue Aug 10 18:06:17 2010
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -24,15 +23,33 @@
 # Copyright (C) 2003, 2004, 2005 Jonas Borgström <jo...@edgewall.com>
 # Copyright (C) 2005 Christopher Lenz <cm...@gmx.de>
 #
-# This software is licensed as described in the file
-# LICENSE_FOR_PYTHON_BINDINGS, which you should have received as part
-# of this distribution.  The terms are also available at
-# < http://subversion.tigris.org/license-for-python-bindings.html >.
-# If newer versions of this license are posted there, you may use a
-# newer version instead, at your option.
+# All rights reserved.
 #
-# Author: Jonas Borgström <jo...@edgewall.com>
-#         Christopher Lenz <cm...@gmx.de>
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import unittest
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/main.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/main.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/main.py Tue Aug 10 18:06:17 2010
@@ -1,15 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
 #
 # Copyright (C) 2005 Edgewall Software
 # Copyright (C) 2005 Christopher Lenz <cm...@gmx.de>
 #
-# This software is licensed as described in the file
-# LICENSE_FOR_PYTHON_BINDINGS, which you should have received as part
-# of this distribution.  The terms are also available at
-# < http://subversion.tigris.org/license-for-python-bindings.html >.
-# If newer versions of this license are posted there, you may use a
-# newer version instead, at your option.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior written
+#    permission.
 #
-# Author: Christopher Lenz <cm...@gmx.de>
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 from __future__ import generators
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py Tue Aug 10 18:06:17 2010
@@ -1,15 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
 #
 # Copyright (C) 2005 Edgewall Software
 # Copyright (C) 2005 Christopher Lenz <cm...@gmx.de>
 #
-# This software is licensed as described in the file
-# LICENSE_FOR_PYTHON_BINDINGS, which you should have received as part
-# of this distribution.  The terms are also available at
-# < http://subversion.tigris.org/license-for-python-bindings.html >.
-# If newer versions of this license are posted there, you may use a
-# newer version instead, at your option.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior written
+#    permission.
 #
-# Author: Christopher Lenz <cm...@gmx.de>
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 from __future__ import generators
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py?rev=984153&r1=984152&r2=984153&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py Tue Aug 10 18:06:17 2010
@@ -1,15 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
 #
 # Copyright (C) 2005 Edgewall Software
 # Copyright (C) 2005 Christopher Lenz <cm...@gmx.de>
 #
-# This software is licensed as described in the file
-# LICENSE_FOR_PYTHON_BINDINGS, which you should have received as part
-# of this distribution.  The terms are also available at
-# < http://subversion.tigris.org/license-for-python-bindings.html >.
-# If newer versions of this license are posted there, you may use a
-# newer version instead, at your option.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior written
+#    permission.
 #
-# Author: Christopher Lenz <cm...@gmx.de>
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os.path
 import stat