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/11 18:43:31 UTC

svn commit: r984468 [2/25] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/generator/ build/generator/templates/ notes/ notes/tree-conflicts/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversi...

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Wed Aug 11 16:43:22 2010
@@ -24,10 +24,11 @@
 package org.apache.subversion.javahl;
 
 import java.util.EventObject;
+import org.apache.subversion.javahl.callback.ReposNotifyCallback;
 
 /**
- * The event passed to the {@link Notify2#onNotify(NotifyInformation)}
- * API to notify {@link SVNClientInterface} of relevant events.
+ * The event passed to the {@link ReposNotifyCallback#onNotify}
+ * API to notify {@link ISVNClient} of relevant events.
  *
  * @since 1.2
  */
@@ -43,7 +44,7 @@ public class ReposNotifyInformation exte
     private static final long serialVersionUID = 1L;
 
     /**
-     * The {@link NotifyAction} which triggered this event.
+     * The {@link Action} which triggered this event.
      */
     private Action action;
 
@@ -70,7 +71,7 @@ public class ReposNotifyInformation exte
     /**
      * This constructor is to be used by the native code.
      *
-     * @param action The {@link NotifyAction} which triggered this event.
+     * @param action The {@link Action} which triggered this event.
      * @param revision potentially the revision.
      */
     public ReposNotifyInformation(Action action, long revision, String warning,
@@ -90,7 +91,7 @@ public class ReposNotifyInformation exte
     }
 
     /**
-     * @return The {@link NotifyAction} which triggered this event.
+     * @return The {@link Action} which triggered this event.
      */
     public Action getAction()
     {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java Wed Aug 11 16:43:22 2010
@@ -26,10 +26,11 @@ package org.apache.subversion.javahl.cal
 import org.apache.subversion.javahl.ClientException;
 
 import java.util.Map;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * This interface is used to receive every single line for a file on a
- * the SVNClientInterface.blame call.
+ * the {@link ISVNClient#blame} call.
  *
  * @since 1.7
  */
@@ -37,7 +38,7 @@ public interface BlameCallback
 {
     /**
      * the method will be called for every line in a file.
-     * @param line              the line number for this line
+     * @param lineNum           the line number for this line
      * @param revision          the revision of the last change.
      * @param revProps          the revision properties for this revision.
      * @param mergedRevision    the revision of the last merged change.

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java Wed Aug 11 16:43:22 2010
@@ -23,9 +23,11 @@
 
 package org.apache.subversion.javahl.callback;
 
+import org.apache.subversion.javahl.ISVNClient;
+
 /**
  * This interface is used to receive every status item for
- * the SVNClientInterface.status call.
+ * the {@link ISVNClient#status} call.
  */
 public interface ChangelistCallback
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java Wed Aug 11 16:43:22 2010
@@ -24,6 +24,7 @@
 package org.apache.subversion.javahl.callback;
 
 import org.apache.subversion.javahl.DiffSummary;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * Subversion diff summarization interface.  An implementation which
@@ -45,7 +46,7 @@ public interface DiffSummaryCallback
 {
     /**
      * Implement this interface to receive diff summaries from the
-     * {@link SVNClientInterface#diffSummarize} API.
+     * {@link ISVNClient#diffSummarize} API.
      *
      * @param descriptor A summary of the diff.
      */

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java Wed Aug 11 16:43:22 2010
@@ -24,10 +24,11 @@
 package org.apache.subversion.javahl.callback;
 
 import org.apache.subversion.javahl.Info2;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * This interface is used to retrieve info each result in a
- * SVNClientInterface.info2 call.
+ * {@link ISVNClient#info2} call.
  */
 public interface InfoCallback
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java Wed Aug 11 16:43:22 2010
@@ -25,10 +25,11 @@ package org.apache.subversion.javahl.cal
 
 import org.apache.subversion.javahl.Lock;
 import org.apache.subversion.javahl.DirEntry;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * This interface is used to receive every single line for a file on a
- * the SVNClientInterface.blame call.
+ * the {@link ISVNClient#blame} call.
  */
 public interface ListCallback
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java Wed Aug 11 16:43:22 2010
@@ -24,18 +24,19 @@
 package org.apache.subversion.javahl.callback;
 
 import org.apache.subversion.javahl.ChangePath;
+import org.apache.subversion.javahl.ISVNClient;
 
 import java.util.Map;
 import java.util.Set;
 
 /**
  * This interface is used to receive every log message for the log
- * messages found by a SVNClientInterface.logMessages call.
+ * messages found by a {@link ISVNClient#logMessages} call.
  *
  * All log messages are returned in a list, which is terminated by an
  * invocation of this callback with the revision set to SVN_INVALID_REVNUM.
  *
- * If the includeMergedRevisions parameter to SVNClientInterface.logMessages
+ * If the includeMergedRevisions parameter to {@link ISVNClient#logMessages}
  * is true, then messages returned through this callback may have the
  * hasChildren parameter set.  This parameter indicates that a separate list,
  * which includes messages for merged revisions, will immediately follow.

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java Wed Aug 11 16:43:22 2010
@@ -23,16 +23,19 @@
 
 package org.apache.subversion.javahl.callback;
 
+import org.apache.subversion.javahl.ISVNClient;
+
 /**
  * This interface is invoked before each patch in a
- * SVNClientInterface.patch call.
+ * {@link ISVNClient#patch} call.
  */
 public interface PatchCallback
 {
     /**
-     * the method will be called for every line in a file.
-     * @param path        the path.
-     * @param properties  the properties on the path.
+     * the method will be called for every patch.
+     * @param pathFromPatchfile        the path in the path file
+     * @param patchPath                the path of the patch
+     * @param rejectPath               the path of the reject file
      * @return            return TRUE to filter out the prospective patch
      */
     public boolean singlePatch(String pathFromPatchfile, String patchPath,

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java Wed Aug 11 16:43:22 2010
@@ -24,10 +24,11 @@
 package org.apache.subversion.javahl.callback;
 
 import java.util.Map;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * This interface is used to property lists for each path in a
- * SVNClientInterface.properties call.
+ * {@link ISVNClient#properties} call.
  */
 public interface ProplistCallback
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java Wed Aug 11 16:43:22 2010
@@ -24,10 +24,11 @@
 package org.apache.subversion.javahl.callback;
 
 import org.apache.subversion.javahl.Status;
+import org.apache.subversion.javahl.ISVNClient;
 
 /**
  * This interface is used to receive every status item for
- * the SVNClientInterface.status call.
+ * the {@link ISVNClient#status} call.
  */
 public interface StatusCallback
 {

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ChangePath.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ChangePath.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ChangePath.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/ChangePath.java Wed Aug 11 16:43:22 2010
@@ -58,7 +58,12 @@ public class ChangePath implements java.
     public ChangePath(org.apache.subversion.javahl.ChangePath aChangePath)
     {
         this(aChangePath.getPath(), aChangePath.getCopySrcRevision(),
-             aChangePath.getCopySrcPath(), aChangePath.getAction(),
+             aChangePath.getCopySrcPath(),
+              ((aChangePath.getAction() == org.apache.subversion.javahl.ChangePath.Action.add) ? 'A' :
+              ((aChangePath.getAction() == org.apache.subversion.javahl.ChangePath.Action.delete) ? 'D' :
+              ((aChangePath.getAction() == org.apache.subversion.javahl.ChangePath.Action.replace) ? 'R' :
+              ((aChangePath.getAction() == org.apache.subversion.javahl.ChangePath.Action.modify) ? 'M' :
+                ' ')))),
              NodeKind.fromApache(aChangePath.getNodeKind()));
     }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java Wed Aug 11 16:43:22 2010
@@ -35,14 +35,14 @@ import java.io.IOException;
  */
 public class SVNAdmin
 {
-    private org.apache.subversion.javahl.SVNAdmin aSVNAdmin;
+    private org.apache.subversion.javahl.SVNRepos aSVNAdmin;
 
     /**
      * Standard empty contructor, builds just the native peer.
      */
     public SVNAdmin()
     {
-        aSVNAdmin = new org.apache.subversion.javahl.SVNAdmin();
+        aSVNAdmin = new org.apache.subversion.javahl.SVNRepos();
         cppAddr = aSVNAdmin.getCppAddr();
     }
 
@@ -244,7 +244,7 @@ public class SVNAdmin
      * interface to receive the messages
      */
     public static interface MessageReceiver
-        extends org.apache.subversion.javahl.SVNAdmin.MessageReceiver
+        extends org.apache.subversion.javahl.ISVNRepos.MessageReceiver
     {
     }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Aug 11 16:43:22 2010
@@ -2079,7 +2079,8 @@ public class BasicTests extends SVNTests
         assertEquals("wrong copy source rev", -1,
                       changedApath.getCopySrcRevision());
         assertNull("wrong copy source path", changedApath.getCopySrcPath());
-        assertEquals("wrong action", 'A', changedApath.getAction());
+        assertEquals("wrong action", ChangePath.Action.add,
+                     changedApath.getAction());
         assertEquals("wrong time with getTimeMicros()",
                      lm[0].getTimeMicros()/1000,
                      lm[0].getDate().getTime());
@@ -2855,7 +2856,10 @@ public class BasicTests extends SVNTests
         String aPath = fileToSVNPath(new File(thisTest.getWCPath() + "/A"),
                                      false);
 
-        expectedDiffOutput = NL + "Property changes on: A" + NL +
+        expectedDiffOutput = "Index: A" + NL + sepLine +
+            "--- A\t(revision 1)" + NL +
+            "+++ A\t(working copy)" + NL +
+            NL + "Property changes on: A" + NL +
             underSepLine +
             "Added: testprop" + NL +
             "## -0,0 +1 ##" + NL +
@@ -2871,7 +2875,10 @@ public class BasicTests extends SVNTests
                                  expectedDiffOutput, diffOutput);
 
         // Test diff where relativeToDir and path are the same.
-        expectedDiffOutput = NL + "Property changes on: ." + NL +
+        expectedDiffOutput = "Index: ." + NL + sepLine +
+            "--- .\t(revision 1)" + NL +
+            "+++ .\t(working copy)" + NL +
+            NL + "Property changes on: ." + NL +
             underSepLine +
             "Added: testprop" + NL +
             "## -0,0 +1 ##" + NL +
@@ -3244,6 +3251,11 @@ public class BasicTests extends SVNTests
      * @throws IOException
      * @throws SubversionException
      */
+    /*
+      This is currently commented out, because we don't have an XFail method
+      for JavaHL.  The resolution is pending the result of issue #3680:
+      http://subversion.tigris.org/issues/show_bug.cgi?id=3680
+
     public void testObstructionTolerance()
             throws SubversionException, IOException
     {
@@ -3400,7 +3412,7 @@ public class BasicTests extends SVNTests
                                    backupTest.getWc().getItemContent("A/D/H/omega"));
 
         backupTest.checkStatus();
-    }
+    }*/
 
     /**
      * Test basic blame functionality.  This test marginally tests blame

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Wed Aug 11 16:43:22 2010
@@ -47,7 +47,7 @@ class SVNTests extends TestCase
      * our admin object, mostly used for creating,dumping and loading
      * repositories
      */
-    protected ISVNAdmin admin;
+    protected ISVNRepos admin;
 
     /**
      * the subversion client, what we want to test.
@@ -201,11 +201,11 @@ class SVNTests extends TestCase
         if (this.fsType == null)
         {
             this.fsType =
-                System.getProperty("test.fstype", ISVNAdmin.FSFS).toLowerCase();
-            if (!(ISVNAdmin.FSFS.equals(this.fsType) ||
-                  ISVNAdmin.BDB.equals(this.fsType)))
+                System.getProperty("test.fstype", ISVNRepos.FSFS).toLowerCase();
+            if (!(ISVNRepos.FSFS.equals(this.fsType) ||
+                  ISVNRepos.BDB.equals(this.fsType)))
             {
-                this.fsType = ISVNAdmin.FSFS;
+                this.fsType = ISVNRepos.FSFS;
             }
         }
 
@@ -226,7 +226,7 @@ class SVNTests extends TestCase
         createDirectories();
 
         // create and configure the needed subversion objects
-        admin = new SVNAdmin();
+        admin = new SVNRepos();
         initClient();
 
         // build and dump the sample repository

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -2738,7 +2738,10 @@ public class BasicTests extends SVNTests
         String aPath = fileToSVNPath(new File(thisTest.getWCPath() + "/A"),
                                      false);
 
-        expectedDiffOutput = NL + "Property changes on: A" + NL +
+        expectedDiffOutput = "Index: A" + NL + sepLine +
+            "--- A\t(revision 1)" + NL +
+            "+++ A\t(working copy)" + NL +
+            NL + "Property changes on: A" + NL +
             underSepLine +
             "Added: testprop" + NL +
             "## -0,0 +1 ##" + NL +
@@ -2753,7 +2756,10 @@ public class BasicTests extends SVNTests
                                  expectedDiffOutput, diffOutput);
 
         // Test diff where relativeToDir and path are the same.
-        expectedDiffOutput = NL + "Property changes on: ." + NL +
+        expectedDiffOutput = "Index: ." + NL + sepLine +
+            "--- .\t(revision 1)" + NL +
+            "+++ .\t(working copy)" + NL +
+            NL + "Property changes on: ." + NL +
             underSepLine +
             "Added: testprop" + NL +
             "## -0,0 +1 ##" + NL +
@@ -3114,6 +3120,10 @@ public class BasicTests extends SVNTests
      * @throws IOException
      * @throws SubversionException
      */
+    /*
+      This is currently commented out, because we don't have an XFail method
+      for JavaHL.  The resolution is pending the result of issue #3680:
+      http://subversion.tigris.org/issues/show_bug.cgi?id=3680
     public void testObstructionTolerance()
             throws SubversionException, IOException
     {
@@ -3262,7 +3272,7 @@ public class BasicTests extends SVNTests
                                    backupTest.getWc().getItemContent("A/D/H/omega"));
 
         backupTest.checkStatus();
-    }
+    }*/
 
     /**
      * Test basic blame functionality.  This test marginally tests blame

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/README
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/README?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/README (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/README Wed Aug 11 16:43:22 2010
@@ -37,3 +37,14 @@ TRANSLATING PARAMETER LISTS
               foo(function)
           except:
               # handle it
+
+
+RUNNING THE TESTS
+
+   $ cd subversion/bindings/swig/python
+   $ python ./tests/run_all.py --help
+   $ python ./tests/run_all.py [TEST...]
+
+   where TEST can be the name of a test suite ('core', 'mergeinfo',
+   'client', etc.), or see '--help' for other options.  The default is to
+   run the tests in all modules.

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -1320,6 +1320,61 @@ commit_item_array_to_list(const apr_arra
 
 /*** Errors ***/
 
+/* Convert a given SubversionException to an svn_error_t. On failure returns
+   NULL and sets a Python exception. */
+static svn_error_t *exception_to_error(PyObject * exc)
+{
+	const char *message, *file = NULL;
+	apr_status_t apr_err;
+	long line = 0;
+	PyObject *apr_err_ob = NULL, *child_ob = NULL, *message_ob = NULL;
+	PyObject *file_ob = NULL, *line_ob = NULL;
+    svn_error_t *rv = NULL, *child = NULL;
+
+	if ((apr_err_ob = PyObject_GetAttrString(exc, "apr_err")) == NULL)
+	    goto finished;
+	apr_err = (apr_status_t) 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;
+
+	if ((file_ob = PyObject_GetAttrString(exc, "file")) == NULL)
+	    goto finished;
+	if (file_ob != Py_None)
+	    file = PyString_AsString(file_ob);
+	if (PyErr_Occurred()) goto finished;
+
+	if ((line_ob = PyObject_GetAttrString(exc, "line")) == NULL)
+	    goto finished;
+	if (line_ob != Py_None)
+	    line = PyInt_AsLong(line_ob);
+	if (PyErr_Occurred()) goto finished;
+
+	if ((child_ob = PyObject_GetAttrString(exc, "child")) == NULL)
+	    goto finished;
+	/* We could check if the child is a Subversion exception too,
+	   but let's just apply duck typing. */
+	if (child_ob != Py_None)
+	    child = exception_to_error(child_ob);
+	if (PyErr_Occurred()) goto finished;
+
+	rv = svn_error_create(apr_err, child, message);
+	/* Somewhat hacky, but we need to preserve original file/line info. */
+	rv->file = file ? apr_pstrdup(rv->pool, file) : NULL;
+	rv->line = line;
+
+finished:
+	Py_XDECREF(child_ob);
+	Py_XDECREF(line_ob);
+	Py_XDECREF(file_ob);
+	Py_XDECREF(message_ob);
+	Py_XDECREF(apr_err_ob);
+	return rv;
+}
+
 /* 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. */
@@ -1327,48 +1382,36 @@ static svn_error_t *callback_exception_e
 {
   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;
+  svn_exc = PyObject_GetAttrString(svn_module, "SubversionException");
+  Py_DECREF(svn_module);
 
-  if ((message_ob = PyObject_GetAttrString(exc, "message")) == NULL)
-    goto finished;
-  message = PyString_AsString(message_ob);
-  if (PyErr_Occurred()) goto finished;
+  if (svn_exc == NULL)
+      goto finished;
 
-  /* A possible improvement here would be to convert the whole
-     SubversionException chain. */
-  rv = svn_error_create(apr_err, NULL, message);
+  if (PyErr_GivenExceptionMatches(exc_type, svn_exc))
+    {
+      rv = exception_to_error(exc);
+    }
+  else
+    {
+      PyErr_Restore(exc_type, exc, exc_traceback);
+      exc_type = exc = exc_traceback = NULL;
+    }
 
 finished:
-  Py_XDECREF(exc);
+  Py_XDECREF(svn_exc);
   Py_XDECREF(exc_type);
+  Py_XDECREF(exc);
   Py_XDECREF(exc_traceback);
-  Py_XDECREF(svn_module);
-  Py_XDECREF(svn_exc);
-  Py_XDECREF(apr_err_ob);
-  Py_XDECREF(message_ob);
+  /* By now, either rv is set and the exception is cleared, or rv is NULL
+     and an exception is pending (possibly a new one). */
   return rv ? rv : svn_error_create(SVN_ERR_SWIG_PY_EXCEPTION_SET, NULL,
                                     "Python callback raised an exception");
 }
@@ -4027,3 +4070,19 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
   callbacks->dir_props_changed  = wc_diff_callbacks2_dir_props_changed;
   return callbacks;
 }
+
+PyObject *
+svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
+                                     swig_type_info * op_type_info,
+                                     PyObject *window_pool)
+{
+  PyObject *result = PyList_New(window->num_ops);
+  int i;
+  
+  for (i = 0; i < window->num_ops; ++i)
+      PyList_SET_ITEM(result, i,
+                      svn_swig_NewPointerObj(window->ops + i, op_type_info,
+                                             window_pool, NULL));
+
+  return result;
+}

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -508,6 +508,17 @@ svn_error_t *svn_swig_py_ra_lock_callbac
 SVN_SWIG_SWIGUTIL_EXPORT
 extern const svn_ra_reporter2_t swig_py_ra_reporter2;
 
+/* Get a list of ops from a window. Used to replace the naive
+   svn_txdelta_window_t.ops accessor. op_type_info is supposed to be
+   the SWIG descriptor of "svn_txdelta_op_t *". window_pool is supposed
+   to be the pool associated with the window proxy and used for wrapping
+   the op objects. */
+SVN_SWIG_SWIGUTIL_EXPORT
+PyObject *
+svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
+                                     swig_type_info * op_type_info,
+                                     PyObject *window_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -29,6 +29,9 @@ _unprefix_names(locals(), 'svn_delta_')
 _unprefix_names(locals(), 'svn_txdelta_', 'tx_')
 del _unprefix_names
 
+# Force our accessor since it appears that there isn't a more civilized way
+# to make SWIG use it.
+svn_txdelta_window_t.ops = property(svn_txdelta_window_t_ops_get)
 
 class Editor:
 

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -110,7 +110,8 @@ class SubversionAuthTestCase(unittest.Te
     self.assert_(creds is not None)
 
 def suite():
-    return unittest.makeSuite(SubversionAuthTestCase, 'test')
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionAuthTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -22,8 +22,6 @@ import unittest, os, weakref, setup_path
 
 from svn import core, client, wc
 
-from trac.versioncontrol.tests.svn_fs import SubversionRepositoryTestSetup, \
-  REPOS_PATH, REPOS_URL
 try:
   # Python >=3.0
   from urllib.parse import urljoin
@@ -71,6 +69,8 @@ class SubversionClientTestCase(unittest.
     self.client_ctx.auth_baton = core.svn_auth_open(providers)
 
     self.temper = utils.Temper()
+    (_, self.repos_path, self.repos_uri) = self.temper.alloc_known_repo(
+      'trac/versioncontrol/tests/svnrepos.dump', suffix='-client')
 
   def tearDown(self):
     # We have to free client_ctx first, since it may be holding handles
@@ -162,10 +162,10 @@ class SubversionClientTestCase(unittest.
     path = self.temper.alloc_empty_dir('-checkout')
 
     self.assertRaises(ValueError, client.checkout2,
-                      REPOS_URL, path, None, None, True, True,
+                      self.repos_uri, path, None, None, True, True,
                       self.client_ctx)
 
-    client.checkout2(REPOS_URL, path, rev, rev, True, True,
+    client.checkout2(self.repos_uri, path, rev, rev, True, True,
             self.client_ctx)
 
   def test_info(self):
@@ -174,19 +174,19 @@ class SubversionClientTestCase(unittest.
     # Run info
     revt = core.svn_opt_revision_t()
     revt.kind = core.svn_opt_revision_head
-    client.info(REPOS_URL, revt, revt, self.info_receiver,
+    client.info(self.repos_uri, revt, revt, self.info_receiver,
                 False, self.client_ctx)
 
     # Check output from running info. This also serves to verify that
     # the internal 'info' object is still valid
-    self.assertEqual(self.path, os.path.basename(REPOS_PATH))
+    self.assertEqual(self.path, os.path.basename(self.repos_path))
     self.info.assert_valid()
-    self.assertEqual(self.info.URL, REPOS_URL)
-    self.assertEqual(self.info.repos_root_URL, REPOS_URL)
+    self.assertEqual(self.info.URL, self.repos_uri)
+    self.assertEqual(self.info.repos_root_URL, self.repos_uri)
 
   def test_mkdir_url(self):
     """Test svn_client_mkdir2 on a file:// URL"""
-    directory = urljoin(REPOS_URL+"/", "dir1")
+    directory = urljoin(self.repos_uri+"/", "dir1")
 
     commit_info = client.mkdir2((directory,), self.client_ctx)
     self.assertEqual(commit_info.revision, 13)
@@ -194,16 +194,16 @@ class SubversionClientTestCase(unittest.
 
   def test_mkdir_url_with_revprops(self):
     """Test svn_client_mkdir3 on a file:// URL, with added revprops"""
-    directory = urljoin(REPOS_URL+"/", "some/deep/subdir")
+    directory = urljoin(self.repos_uri+"/", "some/deep/subdir")
 
     commit_info = client.mkdir3((directory,), 1, {'customprop':'value'},
                                 self.client_ctx)
-    self.assertEqual(commit_info.revision, 14)
+    self.assertEqual(commit_info.revision, 13)
     self.assertEqual(self.log_message_func_calls, 1)
 
   def test_log3_url(self):
     """Test svn_client_log3 on a file:// URL"""
-    directory = urljoin(REPOS_URL+"/", "trunk/dir1")
+    directory = urljoin(self.repos_uri+"/", "trunk/dir1")
 
     start = core.svn_opt_revision_t()
     end = core.svn_opt_revision_t()
@@ -233,7 +233,7 @@ class SubversionClientTestCase(unittest.
 
     self.received_revisions = []
 
-    client.log5((REPOS_URL,), end, (rev_range,), 0, False, True, False, (),
+    client.log5((self.repos_uri,), end, (rev_range,), 0, False, True, False, (),
         self.log_entry_receiver, self.client_ctx)
 
     self.assertEqual(self.received_revisions, range(0, 5))
@@ -241,22 +241,22 @@ class SubversionClientTestCase(unittest.
   def test_uuid_from_url(self):
     """Test svn_client_uuid_from_url on a file:// URL"""
     self.assert_(isinstance(
-                 client.uuid_from_url(REPOS_URL, self.client_ctx),
+                 client.uuid_from_url(self.repos_uri, self.client_ctx),
                  basestring))
 
   def test_url_from_path(self):
     """Test svn_client_url_from_path for a file:// URL"""
-    self.assertEquals(client.url_from_path(REPOS_URL), REPOS_URL)
+    self.assertEquals(client.url_from_path(self.repos_uri), self.repos_uri)
 
     rev = core.svn_opt_revision_t()
     rev.kind = core.svn_opt_revision_head
 
     path = self.temper.alloc_empty_dir('-url_from_path')
 
-    client.checkout2(REPOS_URL, path, rev, rev, True, True,
+    client.checkout2(self.repos_uri, path, rev, rev, True, True,
                      self.client_ctx)
 
-    self.assertEquals(client.url_from_path(path), REPOS_URL)
+    self.assertEquals(client.url_from_path(path), self.repos_uri)
 
   def test_uuid_from_path(self):
     """Test svn_client_uuid_from_path."""
@@ -265,20 +265,20 @@ class SubversionClientTestCase(unittest.
 
     path = self.temper.alloc_empty_dir('-uuid_from_path')
 
-    client.checkout2(REPOS_URL, path, rev, rev, True, True,
+    client.checkout2(self.repos_uri, path, rev, rev, True, True,
                      self.client_ctx)
 
     wc_adm = wc.adm_open3(None, path, False, 0, None)
 
     self.assertEquals(client.uuid_from_path(path, wc_adm, self.client_ctx),
-                      client.uuid_from_url(REPOS_URL, self.client_ctx))
+                      client.uuid_from_url(self.repos_uri, self.client_ctx))
 
     self.assert_(isinstance(client.uuid_from_path(path, wc_adm,
                             self.client_ctx), basestring))
 
   def test_open_ra_session(self):
       """Test svn_client_open_ra_session()."""
-      client.open_ra_session(REPOS_URL, self.client_ctx)
+      client.open_ra_session(self.repos_uri, self.client_ctx)
 
 
   def test_info_file(self):
@@ -290,7 +290,7 @@ class SubversionClientTestCase(unittest.
     rev.kind = core.svn_opt_revision_head
     wc_path = self.temper.alloc_empty_dir('-info_file')
 
-    client.checkout2(REPOS_URL, wc_path, rev, rev, True, True,
+    client.checkout2(self.repos_uri, wc_path, rev, rev, True, True,
                      self.client_ctx)
     adm_access = wc.adm_open3(None, wc_path, True, -1, None)
 
@@ -298,7 +298,7 @@ class SubversionClientTestCase(unittest.
       # Test 1: Run info -r BASE. We expect the size value to be filled in.
       rev.kind = core.svn_opt_revision_base
       readme_path = '%s/trunk/README.txt' % wc_path
-      readme_url = '%s/trunk/README.txt' % REPOS_URL
+      readme_url = '%s/trunk/README.txt' % self.repos_uri
       client.info(readme_path, rev, rev, self.info_receiver,
                   False, self.client_ctx)
 
@@ -340,7 +340,7 @@ class SubversionClientTestCase(unittest.
     head.kind = core.svn_opt_revision_head
     wc_path = self.temper.alloc_empty_dir('-merge_peg3')
 
-    client.checkout3(REPOS_URL, wc_path, head, head, core.svn_depth_infinity,
+    client.checkout3(self.repos_uri, wc_path, head, head, core.svn_depth_infinity,
                      True, False, self.client_ctx)
 
     # Let's try to backport a change from the v1x branch
@@ -375,8 +375,8 @@ class SubversionClientTestCase(unittest.
     self.assertEqual(readme_text, 'This is a test.\n')
 
 def suite():
-    return unittest.makeSuite(SubversionClientTestCase, 'test',
-                              suiteClass=SubversionRepositoryTestSetup)
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionClientTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -20,7 +20,8 @@
 #
 import unittest
 
-import svn.core
+import svn.core, svn.client
+import utils
 
 class SubversionCoreTestCase(unittest.TestCase):
   """Test cases for the basic SWIG Subversion core"""
@@ -46,8 +47,67 @@ class SubversionCoreTestCase(unittest.Te
             svn.core.svn_mime_type_validate, "this\nis\ninvalid\n")
     svn.core.svn_mime_type_validate("unknown/but-valid; charset=utf8")
 
+  def test_exception_interoperability(self):
+    """Test if SubversionException is correctly converted into svn_error_t
+    and vice versa."""
+    t = utils.Temper()
+    (_, _, repos_uri) = t.alloc_empty_repo(suffix='-core')
+    rev = svn.core.svn_opt_revision_t()
+    rev.kind = svn.core.svn_opt_revision_head
+    ctx = svn.client.create_context()
+    
+    class Receiver:
+      def __call__(self, path, info, pool):
+        raise self.e
+    
+    rec = Receiver()
+    args = (repos_uri, rev, rev, rec, svn.core.svn_depth_empty, None, ctx)
+
+    try:
+      # ordinary Python exceptions must be passed through
+      rec.e = TypeError()
+      self.assertRaises(TypeError, svn.client.info2, *args)
+      
+      # SubversionException will be translated into an svn_error_t, propagated
+      # through the call chain and translated back to SubversionException.
+      rec.e = svn.core.SubversionException("Bla bla bla.",
+                                           svn.core.SVN_ERR_INCORRECT_PARAMS,
+                                           file=__file__, line=866)
+      rec.e.child = svn.core.SubversionException("Yada yada.",
+                                             svn.core.SVN_ERR_INCOMPLETE_DATA)
+      self.assertRaises(svn.core.SubversionException, svn.client.info2, *args)
+      
+      # It must remain unchanged through the process.
+      try:
+        svn.client.info2(*args)
+      except svn.core.SubversionException, exc:
+        # find the original exception
+        while exc.file != rec.e.file: exc = exc.child
+        
+        self.assertEqual(exc.message, rec.e.message)
+        self.assertEqual(exc.apr_err, rec.e.apr_err)
+        self.assertEqual(exc.line, rec.e.line)
+        self.assertEqual(exc.child.message, rec.e.child.message)
+        self.assertEqual(exc.child.apr_err, rec.e.child.apr_err)
+        self.assertEqual(exc.child.child, None)
+        self.assertEqual(exc.child.file, None)
+        self.assertEqual(exc.child.line, 0)
+        
+      # Incomplete SubversionExceptions must trigger Python exceptions, which
+      # will be passed through.
+      rec.e = svn.core.SubversionException("No fields except message.")
+      # e.apr_err is None but should be an int
+      self.assertRaises(TypeError, svn.client.info2, args)
+    finally:
+      # This would happen without the finally block as well, but we expliticly
+      # order the operations so that the cleanup is not hindered by any open
+      # handles.
+      del ctx
+      t.cleanup()
+
 def suite():
-    return unittest.makeSuite(SubversionCoreTestCase, 'test')
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionCoreTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -46,9 +46,27 @@ class DeltaTestCase(unittest.TestCase):
     window_handler, baton = \
        svn.delta.tx_apply(src_stream, target_stream, None)
     window_handler(None, baton)
+    
+  def testTxdeltaWindowT(self):
+    """Test the svn_txdelta_window_t wrapper."""
+    a = StringIO("abc\ndef\n")
+    b = StringIO("def\nghi\n")
+    
+    delta_stream = svn.delta.svn_txdelta(a, b)
+    window = svn.delta.svn_txdelta_next_window(delta_stream)
+    
+    self.assert_(window.sview_offset + window.sview_len <= len(a.getvalue()))
+    self.assert_(window.tview_len <= len(b.getvalue()))
+    self.assert_(len(window.new_data) > 0)
+    self.assertEqual(window.num_ops, len(window.ops))
+    self.assertEqual(window.src_ops, len([op for op in window.ops
+      if op.action_code == svn.delta.svn_txdelta_source]))
+
+    # Check that the ops inherit the window's pool
+    self.assertEqual(window.ops[0]._parent_pool, window._parent_pool)
 
 def suite():
-  return unittest.makeSuite(DeltaTestCase, 'test')
+  return unittest.defaultTestLoader.loadTestsFromTestCase(DeltaTestCase)
 
 if __name__ == '__main__':
   runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -19,21 +19,8 @@
 #
 #
 import unittest, os
-
-from sys import version_info # For Python version check
-if version_info[0] >= 3:
-  # Python >=3.0
-  from io import StringIO
-else:
-  # Python <3.0
-  try:
-    from cStringIO import StringIO
-  except ImportError:
-    from StringIO import StringIO
-
 from svn import core, repos, fs
-
-from trac.versioncontrol.tests.svn_fs import REPOS_PATH
+import utils
 
 class RevRange:
   """ Proxy object for a revision range, used for comparison. """
@@ -58,22 +45,16 @@ class SubversionMergeinfoTestCase(unitte
        created by dumping the repository generated for command line log
        tests 16.  If it needs to be updated (mergeinfo format changes, for
        example), we can go there to get a new version."""
-    dumpfile = open(os.path.join(os.path.split(__file__)[0],
-                                 'data', 'mergeinfo.dump'), 'rb')
-    # Remove any existing repository to ensure a fresh start
-    self.tearDown()
-    self.repos = repos.svn_repos_create(REPOS_PATH, '', '', None, None)
-    repos.svn_repos_load_fs2(self.repos, dumpfile, StringIO(),
-                             repos.svn_repos_load_uuid_ignore, '',
-                             0, 0, None)
+    self.temper = utils.Temper()
+    (self.repos, _, _) = self.temper.alloc_known_repo('data/mergeinfo.dump',
+                                                      suffix='-mergeinfo')
     self.fs = repos.fs(self.repos)
     self.rev = fs.youngest_rev(self.fs)
 
   def tearDown(self):
-    self.fs = None
-    self.repos = None
-    if os.path.exists(REPOS_PATH):
-      repos.delete(REPOS_PATH)
+    del self.fs
+    del self.repos
+    self.temper.cleanup()
 
   def test_mergeinfo_parse(self):
     """Test svn_mergeinfo_parse()"""
@@ -176,7 +157,8 @@ class SubversionMergeinfoTestCase(unitte
 
 
 def suite():
-    return unittest.makeSuite(SubversionMergeinfoTestCase, 'test')
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionMergeinfoTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -219,7 +219,7 @@ class PoolTestCase(unittest.TestCase):
     svn_pool_destroy(svn_pool_create())
 
 def suite():
-  return unittest.makeSuite(PoolTestCase, 'test')
+  return unittest.defaultTestLoader.loadTestsFromTestCase(PoolTestCase)
 
 if __name__ == '__main__':
   runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -28,9 +28,8 @@ if version_info[0] >= 3:
 else:
   # Python <3.0
   from StringIO import StringIO
-
-from trac.versioncontrol.tests.svn_fs import SubversionRepositoryTestSetup, \
-  REPOS_PATH, REPOS_URL
+  
+import utils
 
 class SubversionRepositoryAccessTestCase(unittest.TestCase):
   """Test cases for the Subversion repository layer"""
@@ -38,24 +37,23 @@ class SubversionRepositoryAccessTestCase
   def setUp(self):
     """Load a Subversion repository"""
 
-    # Isolate each test from the others with a fresh repository.
-    # Eventually, we should move this into a shared TestCase base
-    # class that all test cases in this directory can use.
-    SubversionRepositoryTestSetup().setUp()
-
     ra.initialize()
-
+    self.temper = utils.Temper()
+    # Isolate each test from the others with a fresh repository.
+    
     # Open repository directly for cross-checking
-    self.repos = repos.open(REPOS_PATH)
+    (self.repos, _, self.repos_uri) = self.temper.alloc_known_repo(
+      'trac/versioncontrol/tests/svnrepos.dump', suffix='-ra')
     self.fs = repos.fs(self.repos)
 
     self.callbacks = ra.Callbacks()
-    self.ra_ctx = ra.open2(REPOS_URL, self.callbacks, {})
+    self.ra_ctx = ra.open2(self.repos_uri, self.callbacks, {})
 
   def tearDown(self):
     self.ra_ctx = None
     self.fs = None
     self.repos = None
+    self.temper.cleanup()
 
   def test_get_file(self):
     # Test getting the properties of a file
@@ -73,7 +71,7 @@ class SubversionRepositoryAccessTestCase
 
   def test_get_repos_root(self):
     root = ra.get_repos_root(self.ra_ctx)
-    self.assertEqual(root,REPOS_URL)
+    self.assertEqual(root,self.repos_uri)
 
   def test_get_uuid(self):
     ra_uuid = ra.get_uuid(self.ra_ctx)
@@ -100,7 +98,8 @@ class SubversionRepositoryAccessTestCase
 
     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)
@@ -252,10 +251,11 @@ class SubversionRepositoryAccessTestCase
 
     sess_url = ra.get_session_url(self.ra_ctx)
     try:
-        ra.reparent(self.ra_ctx, REPOS_URL+"/trunk")
+        ra.reparent(self.ra_ctx, self.repos_uri+"/trunk")
         reporter, reporter_baton = ra.do_diff2(self.ra_ctx, fs_revnum,
                                                "README.txt", 0, 0, 1,
-                                               REPOS_URL+"/trunk/README.txt",
+                                               self.repos_uri
+                                                 +"/trunk/README.txt",
                                                e_ptr, e_baton)
         reporter.set_path(reporter_baton, "", 0, True, None)
         reporter.finish_report(reporter_baton)
@@ -376,7 +376,7 @@ class SubversionRepositoryAccessTestCase
 
   def test_namestring(self):
     # Only ra-{neon,serf} support this right now.
-    if REPOS_URL.startswith('http'):
+    if self.repos_uri.startswith('http'):
       called = [False]
       def cb(pool):
         called[0] = True
@@ -386,7 +386,8 @@ class SubversionRepositoryAccessTestCase
       self.assert_(called[0])
 
 def suite():
-    return unittest.makeSuite(SubversionRepositoryAccessTestCase, 'test')
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionRepositoryAccessTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, setup_path, tempfile
+import unittest, setup_path
 from sys import version_info # For Python version check
 if version_info[0] >= 3:
   # Python >=3.0
@@ -28,9 +28,7 @@ else:
   from StringIO import StringIO
 from svn import core, repos, fs, delta
 from svn.core import SubversionException
-
-from trac.versioncontrol.tests.svn_fs import SubversionRepositoryTestSetup, \
-  REPOS_PATH
+import utils
 
 class ChangeReceiver(delta.Editor):
   """A delta editor which saves textdeltas for later use"""
@@ -55,13 +53,16 @@ class SubversionRepositoryTestCase(unitt
 
   def setUp(self):
     """Load a Subversion repository"""
-    self.repos = repos.open(REPOS_PATH)
+    self.temper = utils.Temper()
+    (self.repos, _, _) = self.temper.alloc_known_repo(
+      'trac/versioncontrol/tests/svnrepos.dump', suffix='-repository')
     self.fs = repos.fs(self.repos)
     self.rev = fs.youngest_rev(self.fs)
 
   def tearDown(self):
     self.fs = None
     self.repos = None
+    self.temper.cleanup()
 
   def test_cease_invocation(self):
     """Test returning SVN_ERR_CEASE_INVOCATION from a callback"""
@@ -81,9 +82,8 @@ class SubversionRepositoryTestCase(unitt
        using a config hash"""
     fs_config = { "fs-type": "fsfs" }
     for i in range(5):
-      path = core.svn_dirent_internal_style(tempfile.mkdtemp("-test" + str(i)))
+      path = self.temper.alloc_empty_dir(suffix='-repository-create%d' % i)
       repos.create(path, "", "", None, fs_config)
-      repos.delete(path)
 
   def test_dump_fs2(self):
     """Test the dump_fs2 function"""
@@ -197,8 +197,8 @@ class SubversionRepositoryTestCase(unitt
                      "Youngest revision")
 
 def suite():
-    return unittest.makeSuite(SubversionRepositoryTestCase, 'test',
-                              suiteClass=SubversionRepositoryTestSetup)
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionRepositoryTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

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=984468&r1=984467&r2=984468&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 Wed Aug 11 16:43:22 2010
@@ -361,8 +361,9 @@ class SubversionRepositoryTestCase(unitt
 
 
 def suite():
-    return unittest.makeSuite(SubversionRepositoryTestCase, 'test',
-                              suiteClass=SubversionRepositoryTestSetup)
+    loader = unittest.TestLoader()
+    loader.suiteClass = SubversionRepositoryTestSetup
+    return loader.loadTestsFromTestCase(SubversionRepositoryTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/utils.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/utils.py?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/utils.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/utils.py Wed Aug 11 16:43:22 2010
@@ -18,13 +18,9 @@
 # under the License.
 #
 #
-import tempfile, urllib
+import os.path, sys, tempfile, urllib
 from svn import core, repos
-
-try:
-  from io import StringIO
-except ImportError:
-  from StringIO import StringIO
+from StringIO import StringIO
 
 class Temper(object):
   """Class to simplify allocation and cleanup of dummy Subversion
@@ -49,21 +45,31 @@ class Temper(object):
     self._cleanup_list.append((temp_dir_name, core.svn_io_remove_dir))
     return temp_dir_name
 
-  def alloc_repo(self, suffix = ""):
-    """Creates an empty repository. Returns a tuple of its handle, path and
+  def alloc_empty_repo(self, suffix = ""):
+    """Create an empty repository. Returns a tuple of its handle, path and
        file: URI in canonical internal form."""
     temp_path = tempfile.mkdtemp(suffix)
     repo_path = core.svn_dirent_internal_style(temp_path)
-    repo_uri = core.svn_uri_canonicalize(Temper._file_uri_for_path(temp_path))
+    repo_uri = core.svn_uri_canonicalize(file_uri_for_path(temp_path))
     handle = repos.create(repo_path, None, None, None, None)
     self._cleanup_list.append((repo_path, repos.svn_repos_delete))
     return (handle, repo_path, repo_uri)
+
+  def alloc_known_repo(self, repo_id, suffix = ""):
+    """Create a temporary repository and fill it with the contents of the
+       specified dump. repo_id is the path to the dump, relative to the script's
+       location. Returns the same as alloc_empty_repo."""
+    dump_path = os.path.join(os.path.dirname(sys.argv[0]), repo_id)
+    (handle, repo_path, repo_uri) = self.alloc_empty_repo(suffix=suffix)
+    repos.svn_repos_load_fs2(handle, open(dump_path, 'rb'), StringIO(),
+                             repos.load_uuid_default, None, False, False, None)
+    return (handle, repo_path, repo_uri)
     
-  @classmethod
-  def _file_uri_for_path(cls, path):
-    uri_path = urllib.pathname2url(path)
-
-    # pathname2url claims to return the path part of the URI, but on Windows
-    # it returns both the authority and path parts for no reason, which
-    # means we have to trim the leading slashes to "normalize" the result.
-    return 'file:///' + uri_path.lstrip('/')
+def file_uri_for_path(path):
+  """Return the file: URI corresponding to the given path."""
+  uri_path = urllib.pathname2url(path)
+
+  # pathname2url claims to return the path part of the URI, but on Windows
+  # it returns both the authority and path parts for no reason, which
+  # means we have to trim the leading slashes to "normalize" the result.
+  return 'file:///' + uri_path.lstrip('/')

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/wc.py?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/wc.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/python/tests/wc.py Wed Aug 11 16:43:22 2010
@@ -30,9 +30,7 @@ import svn.diff
 from svn import core, repos, wc, client
 from svn import delta, ra
 from svn.core import SubversionException, SVN_INVALID_REVNUM
-
-from trac.versioncontrol.tests.svn_fs import SubversionRepositoryTestSetup, \
-  REPOS_PATH, REPOS_URL
+import utils
 
 class SubversionWorkingCopyTestCase(unittest.TestCase):
   """Test cases for the Subversion working copy layer"""
@@ -40,23 +38,21 @@ class SubversionWorkingCopyTestCase(unit
   def setUp(self):
     """Load a Subversion repository"""
 
-    # Isolate each test from the others with a fresh repository.
-    # Eventually, we should move this into a shared TestCase base
-    # class that all test cases in this directory can use.
-    SubversionRepositoryTestSetup().setUp()
+    self.temper = utils.Temper()
 
-    # Open repository directly for cross-checking
-    self.repos = repos.open(REPOS_PATH)
+    # Isolate each test from the others with a fresh repository.
+    (self.repos, _, self.repos_uri) = self.temper.alloc_known_repo(
+      'trac/versioncontrol/tests/svnrepos.dump', suffix='-wc-repo')
     self.fs = repos.fs(self.repos)
 
-    self.path = core.svn_dirent_internal_style(tempfile.mktemp())
+    self.path = self.temper.alloc_empty_dir(suffix='-wc-wc')
 
     client_ctx = client.create_context()
 
     rev = core.svn_opt_revision_t()
     rev.kind = core.svn_opt_revision_head
 
-    client.checkout2(REPOS_URL, self.path, rev, rev, True, True,
+    client.checkout2(self.repos_uri, self.path, rev, rev, True, True,
             client_ctx)
 
     self.wc = wc.adm_open3(None, self.path, True, -1, None)
@@ -159,7 +155,7 @@ class SubversionWorkingCopyTestCase(unit
       self.assert_(wc.check_wc(self.path) > 0)
 
   def test_get_ancestry(self):
-      self.assertEqual([REPOS_URL, 12],
+      self.assertEqual([self.repos_uri, 12],
                        wc.get_ancestry(self.path, self.wc))
 
   def test_status(self):
@@ -237,7 +233,7 @@ class SubversionWorkingCopyTestCase(unit
     # Setup ra_ctx.
     ra.initialize()
     callbacks = ra.Callbacks()
-    ra_ctx = ra.open2(REPOS_URL, callbacks, None, None)
+    ra_ctx = ra.open2(self.repos_uri, callbacks, None, None)
 
     # Get commit editor.
     commit_info = [None]
@@ -294,7 +290,7 @@ class SubversionWorkingCopyTestCase(unit
   def test_diff_editor4(self):
     pool = None
     depth = core.svn_depth_infinity
-    url = REPOS_URL
+    url = self.repos_uri
 
     # cause file_changed: Replace README.txt's contents.
     readme_path = '%s/trunk/README.txt' % self.path
@@ -441,16 +437,14 @@ class SubversionWorkingCopyTestCase(unit
     self.assertEqual(got_diffs, expected_diffs)
 
   def tearDown(self):
-      try:
-        wc.adm_close(self.wc)
-        core.svn_io_remove_dir(self.path)
-      except:
-        print('Error in tearDown: %s' % sys.exc_info()[0])
+      wc.adm_close(self.wc)
       self.fs = None
       self.repos = None
+      self.temper.cleanup()
 
 def suite():
-    return unittest.makeSuite(SubversionWorkingCopyTestCase, 'test')
+    return unittest.defaultTestLoader.loadTestsFromTestCase(
+      SubversionWorkingCopyTestCase)
 
 if __name__ == '__main__':
     runner = unittest.TextTestRunner()

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_client.rb?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_client.rb Wed Aug 11 16:43:22 2010
@@ -1079,6 +1079,12 @@ class SvnClientTest < Test::Unit::TestCa
     end
   end
 
+=begin
+  We haven't yet figured out what to expect in the case of an obstruction,
+  but it is no longer an error.  Commenting out this test until that
+  decision is made (see issue #3680:
+  http://subversion.tigris.org/issues/show_bug.cgi?id=3680)
+
   def test_cleanup
     log = "sample log"
     file = "sample.txt"
@@ -1124,6 +1130,7 @@ class SvnClientTest < Test::Unit::TestCa
       end
     end
   end
+=end
 
   def test_relocate
     log = "sample log"

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_info.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_info.rb?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_info.rb (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/ruby/test/test_info.rb Wed Aug 11 16:43:22 2010
@@ -133,14 +133,13 @@ class SvnInfoTest < Test::Unit::TestCase
       assert_equal([].sort, info.deleted_dirs)
       assert_equal(["#{dir_svn_path}/", "#{tmp_dir_svn_path}/"].sort,
                    info.added_dirs)
-
-      File.open(file1_path, "w") {|f| f.puts "changed"}
-      File.open(file2_path, "w") {|f| f.puts "changed"}
-      File.open(file3_path, "w") {|f| f.puts "changed"}
     end
 
     log = "changed 3 files\ndeleted 2 files\nadded 3 files"
     make_context(log) do |ctx|
+      File.open(file1_path, "w") {|f| f.puts "changed"}
+      File.open(file2_path, "w") {|f| f.puts "changed"}
+      File.open(file3_path, "w") {|f| f.puts "changed"}
       ctx.rm_f([file4_path, file5_path])
       FileUtils.touch(file6_path)
       FileUtils.touch(file7_path)

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/swig/svn_delta.i?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/swig/svn_delta.i Wed Aug 11 16:43:22 2010
@@ -172,6 +172,60 @@ svn_txdelta_window_t_ops_get(svn_txdelta
 %}
 #endif
 
+#ifdef SWIGPYTHON
+%ignore svn_txdelta_window_t::ops;
+%inline %{
+static PyObject *
+svn_txdelta_window_t_ops_get(PyObject *window_ob)
+{
+  void *window;
+  PyObject *ops_list, *window_pool;
+  int status;
+  
+  /* Kludge alert!
+     Normally, these kinds of conversions would belong in a typemap.
+     However, typemaps won't allow us to change the result type to an array,
+     so we have to make this custom accessor function.
+     A cleaner approach would be to use something like: 
+     
+     %extend svn_txdelta_window_t { void get_ops(apr_array_header_t ** ops); }
+     
+     But that means unnecessary copying, plus more hacks to get the pool for the
+     array and for wrapping the individual op objects. So we just don't bother.
+  */
+  
+  /* Note: the standard svn-python typemap releases the GIL while calling the
+     wrapped function, but this function does Python stuff, so we have to
+     reacquire it again. */
+  svn_swig_py_acquire_py_lock();
+  status = svn_swig_ConvertPtr(window_ob, &window,
+    SWIG_TypeQuery("svn_txdelta_window_t *"));
+    
+  if (status != 0)
+    {
+      PyErr_SetString(PyExc_TypeError,
+                      "expected an svn_txdelta_window_t* proxy");
+      svn_swig_py_release_py_lock();
+      return NULL;
+    }
+    
+  window_pool = PyObject_GetAttrString(window_ob, "_parent_pool");
+
+  if (window_pool == NULL)
+    {
+      svn_swig_py_release_py_lock();
+      return NULL;
+    }
+    
+  ops_list = svn_swig_py_txdelta_window_t_ops_get(window,
+    SWIG_TypeQuery("svn_txdelta_op_t *"), window_pool);
+    
+  svn_swig_py_release_py_lock();
+  
+  return ops_list;
+}
+%}
+#endif
 
 %include svn_delta_h.swg
 

Modified: subversion/branches/ignore-mergeinfo/subversion/include/private/svn_eol_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/private/svn_eol_private.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/private/svn_eol_private.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/private/svn_eol_private.h Wed Aug 11 16:43:22 2010
@@ -58,23 +58,37 @@ svn_eol__find_eol_start(char *buf, apr_s
  * no more likely to be incorrect than correct for any caller that
  * doesn't.
  *
+ * The returned string is statically allocated.
+ *
+ * ### [JAF] Does it make sense for this to use "[buf, end)" while
+ *     svn_eol__find_eol_start() uses "buf, len"?
+ *
  * @since New in 1.7
  */
 const char *
 svn_eol__detect_eol(char *buf, char *endp);
 
-/* Detect the EOL marker used in @a file and return it in @a *eol.
+/* Set @a *eol to the EOL marker used in @a file.
  * If it cannot be detected, set @a *eol to NULL.
  *
  * The file is searched starting at the current file cursor position.
- * The first EOL marker found will be returnd. So if the file has
+ * The first EOL marker found will be returned. So if the file has
  * inconsistent EOL markers, this won't be detected.
  *
  * Upon return, the original file cursor position is always preserved,
  * even if an error is thrown.
  *
+ * The string @a *eol is statically allocated.
  * Do temporary allocations in @a pool.
  *
+ * ### [JAF] Apparent bug: implementation suffers from the "one byte of a
+ *     two-byte sequence" issue noted for svn_eol__detect_eol().
+ *
+ * ### [JAF] Apparent bug: if file pointer is at EOF, returns "success"
+ *     without initializing @a *eol.
+ *
+ * ### [JAF] Wouldn't it make more sense to accept a stream than a file?
+ *
  * @since New in 1.7 */
 svn_error_t *
 svn_eol__detect_file_eol(const char **eol, apr_file_t *file, apr_pool_t *pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/private/svn_fs_util.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/private/svn_fs_util.h Wed Aug 11 16:43:22 2010
@@ -98,63 +98,64 @@ svn_fs__check_fs(svn_fs_t *fs, svn_boole
 
 /* SVN_FS__ERR_NOT_MUTABLE: the caller attempted to change a node
    outside of a transaction. FS is of type "svn_fs_t *". */
-#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo)                   \
-  svn_error_createf                                                      \
-    (SVN_ERR_FS_NOT_MUTABLE, 0,                                          \
+#define SVN_FS__ERR_NOT_MUTABLE(fs, rev, path_in_repo, scratch_pool)     \
+  svn_error_createf(                                                     \
+     SVN_ERR_FS_NOT_MUTABLE, 0,                                          \
      _("File is not mutable: filesystem '%s', revision %ld, path '%s'"), \
-     fs->path, rev, path_in_repo)
+     svn_dirent_local_style(fs->path, scratch_pool), rev, path_in_repo)
 
 /* FS is of type "svn fs_t *".*/
-#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo)    \
-  svn_error_createf                                    \
-    (SVN_ERR_FS_NOT_DIRECTORY, 0,                      \
-     _("'%s' is not a directory in filesystem '%s'"),  \
-     path_in_repo, fs->path)
+#define SVN_FS__ERR_NOT_DIRECTORY(fs, path_in_repo, scratch_pool) \
+  svn_error_createf(                                              \
+     SVN_ERR_FS_NOT_DIRECTORY, 0,                                 \
+     _("'%s' is not a directory in filesystem '%s'"),             \
+     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
 
 /* FS is of type "svn fs_t *".   */
-#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo)         \
-  svn_error_createf                                    \
-    (SVN_ERR_FS_NOT_FILE, 0,                           \
-     _("'%s' is not a file in filesystem '%s'"),       \
-     path_in_repo, fs->path)
+#define SVN_FS__ERR_NOT_FILE(fs, path_in_repo, scratch_pool)      \
+  svn_error_createf(                                              \
+     SVN_ERR_FS_NOT_FILE, 0,                                      \
+     _("'%s' is not a file in filesystem '%s'"),                  \
+     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
+
 
 /* FS is of type "svn fs_t *", LOCK is of type "svn_lock_t *".   */
-#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock)                      \
-  svn_error_createf                                                    \
-    (SVN_ERR_FS_PATH_ALREADY_LOCKED, 0,                                \
-     _("Path '%s' is already locked by user '%s' in filesystem '%s'"), \
-     lock->path, lock->owner, fs->path)
+#define SVN_FS__ERR_PATH_ALREADY_LOCKED(fs, lock, scratch_pool)             \
+  svn_error_createf(                                                        \
+     SVN_ERR_FS_PATH_ALREADY_LOCKED, 0,                                     \
+     _("Path '%s' is already locked by user '%s' in filesystem '%s'"),      \
+     lock->path, lock->owner, svn_dirent_local_style(fs->path, scratch_pool))
 
 /* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_NO_SUCH_LOCK(fs, path_in_repo)     \
-  svn_error_createf                                    \
-    (SVN_ERR_FS_NO_SUCH_LOCK, 0,                       \
-     _("No lock on path '%s' in filesystem '%s'"),     \
-     path_in_repo, fs->path)
+#define SVN_FS__ERR_NO_SUCH_LOCK(fs, path_in_repo, scratch_pool)  \
+  svn_error_createf(                                              \
+     SVN_ERR_FS_NO_SUCH_LOCK, 0,                                  \
+     _("No lock on path '%s' in filesystem '%s'"),                \
+     path_in_repo, svn_dirent_local_style(fs->path, scratch_pool))
 
 /* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_LOCK_EXPIRED(fs, token)                      \
-  svn_error_createf                                              \
-    (SVN_ERR_FS_LOCK_EXPIRED, 0,                                 \
-     _("Lock has expired: lock-token '%s' in filesystem '%s'"), \
-     token, fs->path)
+#define SVN_FS__ERR_LOCK_EXPIRED(fs, token, scratch_pool)        \
+  svn_error_createf(                                             \
+     SVN_ERR_FS_LOCK_EXPIRED, 0,                                 \
+     _("Lock has expired: lock-token '%s' in filesystem '%s'"),  \
+     token, svn_dirent_local_style(fs->path, scratch_pool))
 
 /* FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_NO_USER(fs)                                     \
-  svn_error_createf                                                 \
-    (SVN_ERR_FS_NO_USER, 0,                                         \
+#define SVN_FS__ERR_NO_USER(fs, scratch_pool)                       \
+  svn_error_createf(                                                \
+     SVN_ERR_FS_NO_USER, 0,                                         \
      _("No username is currently associated with filesystem '%s'"), \
-     fs->path)
+     svn_dirent_local_style(fs->path, scratch_pool))
 
 /* SVN_FS__ERR_LOCK_OWNER_MISMATCH: trying to use a lock whose
    LOCK_OWNER doesn't match the USERNAME associated with FS.
    FS is of type "svn fs_t *". */
-#define SVN_FS__ERR_LOCK_OWNER_MISMATCH(fs, username, lock_owner)  \
-  svn_error_createf                                                \
-    (SVN_ERR_FS_LOCK_OWNER_MISMATCH, 0,                            \
-     _("User '%s' is trying to use a lock owned by '%s' in "       \
-       "filesystem '%s'"),                                         \
-     username, lock_owner, fs->path)
+#define SVN_FS__ERR_LOCK_OWNER_MISMATCH(fs, username, lock_owner, pool) \
+  svn_error_createf(                                                    \
+     SVN_ERR_FS_LOCK_OWNER_MISMATCH, 0,                                 \
+     _("User '%s' is trying to use a lock owned by '%s' in "            \
+       "filesystem '%s'"),                                              \
+     username, lock_owner, svn_dirent_local_style(fs->path, pool))
 
 /* Return a NULL-terminated copy of the first component of PATH,
    allocated in POOL.  If path is empty, or consists entirely of

Modified: subversion/branches/ignore-mergeinfo/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/private/svn_mergeinfo_private.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/private/svn_mergeinfo_private.h Wed Aug 11 16:43:22 2010
@@ -225,6 +225,21 @@ svn_rangelist__initialize(svn_revnum_t s
                           svn_boolean_t inheritable,
                           apr_pool_t *result_pool);
 
+/* Adjust in-place MERGEINFO's rangelists by OFFSET.  If OFFSET is negative 
+   and would adjust any part of MERGEINFO's source revisions to 0 or less,
+   then those revisions are dropped.  If all the source revisions for a merge
+   source path are dropped, then the path itself is dropped.  If all merge
+   source paths are dropped, then *ADJUSTED_MERGEINFO is set to an empty
+   hash.  *ADJUSTED_MERGEINFO is allocated in RESULT_POOL.  SCRATCH_POOL is
+   used for any temporary allocations. */
+svn_error_t *
+svn_mergeinfo__adjust_mergeinfo_rangelists(svn_mergeinfo_t *adjusted_mergeinfo,
+                                           svn_mergeinfo_t mergeinfo,
+                                           svn_revnum_t offset,
+                                           apr_pool_t *result_pool,
+                                           apr_pool_t *scratch_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/ignore-mergeinfo/subversion/include/private/svn_opt_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/private/svn_opt_private.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/private/svn_opt_private.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/private/svn_opt_private.h Wed Aug 11 16:43:22 2010
@@ -66,7 +66,6 @@ svn_opt__split_arg_at_peg_revision(const
 /* Attempt to transform URL_IN, which is a URL-like user input, into a
  * valid URL:
  *   - escape IRI characters and some other non-URI characters
- *   - check that only valid URI characters remain
  *   - check that no back-path ("..") components are present
  *   - canonicalize the separator ("/") characters
  * URL_IN is in UTF-8 encoding and has no peg revision specifier.

Modified: subversion/branches/ignore-mergeinfo/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/private/svn_wc_private.h?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/private/svn_wc_private.h Wed Aug 11 16:43:22 2010
@@ -55,15 +55,6 @@ svn_wc__path_switched(svn_boolean_t *swi
                       apr_pool_t *scratch_pool);
 
 
-/* Return the shallowest sufficient @c levels_to_lock value for @a depth;
- * see the @a levels_to_lock parameter of svn_wc_adm_open3() and
- * similar functions for more information.
- */
-#define SVN_WC__LEVELS_TO_LOCK_FROM_DEPTH(depth)              \
-  (((depth) == svn_depth_empty || (depth) == svn_depth_files) \
-   ? 0 : (((depth) == svn_depth_immediates) ? 1 : -1))
-
-
 /* Return TRUE iff CLHASH (a hash whose keys are const char *
    changelist names) is NULL or if LOCAL_ABSPATH is part of a changelist in
    CLHASH. */
@@ -73,25 +64,6 @@ svn_wc__changelist_match(svn_wc_context_
                          apr_hash_t *clhash,
                          apr_pool_t *scratch_pool);
 
-
-/* Set *MODIFIED_P to true if VERSIONED_FILE_ABSPATH is modified with respect
- * to BASE_FILE_ABSPATH, or false if it is not.  The comparison compensates
- * for VERSIONED_FILE_ABSPATH's eol and keyword properties, but leaves
- * BASE_FILE_ABSPATH alone (as though BASE_FILE_ABSPATH were a text-base file,
- * which it usually is, only sometimes we're calling this on incoming
- * temporary text-bases).
- *
- * If an error is returned, the effect on *MODIFIED_P is undefined.
- *
- * Use SCRATCH_POOL for temporary allocation; WC_CTX is the normal thing.
- */
-svn_error_t *
-svn_wc__versioned_file_modcheck(svn_boolean_t *modified_p,
-                                svn_wc_context_t *wc_ctx,
-                                const char *versioned_file_abspath,
-                                const char *base_file_abspath,
-                                apr_pool_t *scratch_pool);
-
 /**
  * Return a boolean answer to the question "Is @a status something that
  * should be reported?".  @a no_ignore and @a get_all are the same as
@@ -241,7 +213,7 @@ svn_wc__node_get_children(const apr_arra
 
 /**
  * Fetch the repository root information for a given @a local_abspath into
- * @a *repos_root_url and @a repos_uuid. Use @wc_ctx to access the working copy
+ * @a *repos_root_url and @a repos_uuid. Use @a wc_ctx to access the working copy
  * for @a local_abspath, @a scratch_pool for all temporary allocations,
  * @a result_pool for result allocations. Note: the result may be NULL if the
  * given node has no repository root associated with it (e.g. locally added).
@@ -394,8 +366,10 @@ svn_wc__node_get_copyfrom_info(const cha
                                apr_pool_t *scratch_pool);
 
 /**
- * Recursively call @a walk_callback for all nodes underneath
- * @a local_abspath, restricted by @a walk_depth.
+ * Call @a walk_callback with @a walk_baton for @a local_abspath and all
+ * nodes underneath it, restricted by @a walk_depth.
+ *
+ * If @a show_hidden is true, include hidden nodes, else ignore them.
  */
 svn_error_t *
 svn_wc__node_walk_children(svn_wc_context_t *wc_ctx,
@@ -520,7 +494,7 @@ svn_wc__node_get_base_rev(svn_revnum_t *
  * SVN_INVALID_REVNUM. In case of a replacement, we return the BASE
  * revision. 
  *
- * The @changed_rev is set to the latest committed change to @a
+ * The @a changed_rev is set to the latest committed change to @a
  * local_abspath before or equal to @a revision, unless the node is
  * copied-here or moved-here. Then it is the revision of the latest committed
  * change before or equal to the copyfrom_rev.  NOTE, that we use
@@ -645,25 +619,26 @@ svn_wc__node_get_info_bits(apr_time_t *t
 
 
 /**
- * Recursively acquire write locks for @a local_abspath if
- * @a anchor_abspath is NULL.  If @a anchor_abspath is not NULL then
- * recursively acquire write locks for the anchor of @a local_abspath
- * and return the anchor path in @a *anchor_abspath.  Use @a wc_ctx
- * for working copy access.
+ * Acquire a recursive write lock for @a local_abspath or if @a lock_anchor
+ * is true, determine if @a local_abspath has an anchor that should be locked
+ * instead. Store the obtained lock in @a wc_ctx.
+ *
+ * If @a lock_root_abspath is not NULL, store the root of the lock in
+ * @a *lock_root_abspath. If @a lock_root_abspath is NULL, then @a
+ * local_abspath must be a versioned directory and @a lock_anchor must be
+ * FALSE.
  *
  * Returns @c SVN_ERR_WC_LOCKED if an existing lock is encountered, in
  * which case any locks acquired will have been released.
  *
- * If @a *anchor_abspath is not NULL it will be set even when
- * SVN_ERR_WC_LOCKED is returned.
- *
- * ### @a anchor_abspath should be removed when we move to centralised
- * ### metadata as it will be unnecessary.
+ * If @a lock_anchor is TRUE and @a lock_root_abspath is not NULL, @a
+ * lock_root_abspath will be set even when SVN_ERR_WC_LOCKED is returned.
  */
 svn_error_t *
-svn_wc__acquire_write_lock(const char **anchor_abspath,
+svn_wc__acquire_write_lock(const char **lock_root_abspath,
                            svn_wc_context_t *wc_ctx,
                            const char *local_abspath,
+                           svn_boolean_t lock_anchor,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
@@ -672,6 +647,9 @@ svn_wc__acquire_write_lock(const char **
  * Recursively release write locks for @a local_abspath, using @a wc_ctx
  * for working copy access.  Only locks held by @a wc_ctx are released.
  * Locks are not removed if work queue items are present.
+ *
+ * If @a local_abspath is not the root of an owned SVN_ERR_WC_NOT_LOCKED
+ * is returned.
  */
 svn_error_t *
 svn_wc__release_write_lock(svn_wc_context_t *wc_ctx,
@@ -687,6 +665,10 @@ typedef svn_error_t *(*svn_wc__with_writ
 /** Call function @a func while holding a write lock on
  * @a local_abspath. The @a baton, and @a result_pool and
  * @a scratch_pool, is passed @a func.
+ *
+ * If @a lock_anchor is TRUE, determine if @a local_abspath has an anchor
+ * that should be locked instead.
+ *
  * Use @a wc_ctx for working copy access.
  * The lock is guaranteed to be released after @a func returns.
  */
@@ -695,6 +677,7 @@ svn_wc__call_with_write_lock(svn_wc__wit
                              void *baton,
                              svn_wc_context_t *wc_ctx,
                              const char *local_abspath,
+                             svn_boolean_t lock_anchor,
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
@@ -711,7 +694,10 @@ svn_wc__temp_mark_missing_not_present(co
                                       apr_pool_t *scratch_pool);
 
 /* Return the @a *keep_local flag for local_abspath. (This flag will
-   go away once we have a consolidated administrative area) */
+   go away once we have a consolidated administrative area. In that
+   case it will always return FALSE.) 
+
+   ### Only used by the commit processing in libsvn_client */
 svn_error_t *
 svn_wc__temp_get_keep_local(svn_boolean_t *keep_local,
                             svn_wc_context_t *wc_ctx,