You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/03 21:21:15 UTC

svn commit: r982007 [1/3] - in /subversion/branches/atomic-revprop: ./ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ subversion/bindings/swig/ subversion/bindings/swig...

Author: danielsh
Date: Tue Aug  3 19:21:13 2010
New Revision: 982007

URL: http://svn.apache.org/viewvc?rev=982007&view=rev
Log:
On the 'atomic-revprop' branch, merge r981280 through r982005 from trunk.

Modified:
    subversion/branches/atomic-revprop/   (props changed)
    subversion/branches/atomic-revprop/Makefile.in
    subversion/branches/atomic-revprop/configure.ac
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/svn/delta.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/auth.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/client.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/core.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/mergeinfo.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/pool.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/ra.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/repository.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/utils.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/wc.py
    subversion/branches/atomic-revprop/subversion/bindings/swig/ruby/test/test_info.rb
    subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i
    subversion/branches/atomic-revprop/subversion/include/svn_dirent_uri.h
    subversion/branches/atomic-revprop/subversion/libsvn_client/cmdline.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/delete.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/export.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/log.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c
    subversion/branches/atomic-revprop/subversion/libsvn_client/prop_commands.c
    subversion/branches/atomic-revprop/subversion/libsvn_diff/diff_memory.c
    subversion/branches/atomic-revprop/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/atomic-revprop/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_files.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/ambient_depth_filter_editor.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/deprecated.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/diff.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.h
    subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/node.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/util.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc.h
    subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
    subversion/branches/atomic-revprop/subversion/libsvn_wc/workqueue.c
    subversion/branches/atomic-revprop/subversion/mod_dav_svn/deadprops.c
    subversion/branches/atomic-revprop/subversion/svn/delete-cmd.c
    subversion/branches/atomic-revprop/subversion/svn/diff-cmd.c
    subversion/branches/atomic-revprop/subversion/svn/export-cmd.c
    subversion/branches/atomic-revprop/subversion/svn/import-cmd.c
    subversion/branches/atomic-revprop/subversion/svn/log-cmd.c
    subversion/branches/atomic-revprop/subversion/svn/main.c
    subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c
    subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h
    subversion/branches/atomic-revprop/subversion/svnrdump/svnrdump.c
    subversion/branches/atomic-revprop/subversion/tests/cmdline/depth_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/diff_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/resolved_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/stat_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py
    subversion/branches/atomic-revprop/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/atomic-revprop/tools/dev/unix-build/Makefile.svn

Propchange: subversion/branches/atomic-revprop/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug  3 19:21:13 2010
@@ -34,4 +34,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:965046-981279
+/subversion/trunk:965046-982005

Modified: subversion/branches/atomic-revprop/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/Makefile.in?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/Makefile.in (original)
+++ subversion/branches/atomic-revprop/Makefile.in Tue Aug  3 19:21:13 2010
@@ -426,9 +426,9 @@ revision-install:
 install-static: @INSTALL_STATIC_RULES@
 
 # JavaHL target aliases
-javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-lib @JAVAHL_TESTS_TARGET@
+javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
 install-javahl: javahl install-javahl-java install-javahl-javah install-javahl-lib
-javahl-compat: javahl-compat-java javahl @JAVAHL_COMPAT_TESTS_TARGET@
+javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
 
 clean-javahl:
 	rm -rf $(javahl_java_PATH) $(javahl_javah_PATH) @JAVAHL_OBJDIR@
@@ -441,7 +441,7 @@ check-javahl-compat: javahl-compat-tests
 	@FIX_JAVAHL_LIB@
 	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
 
-check-javahl: javahl
+check-javahl: javahl check-javahl-compat
 	@FIX_JAVAHL_LIB@
 	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" -Djava.library.path=@JAVAHL_OBJDIR@:$(libdir) -classpath $(javahl_tests_PATH):$(javahl_tests_CLASSPATH) "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
 

Modified: subversion/branches/atomic-revprop/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/configure.ac?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/configure.ac (original)
+++ subversion/branches/atomic-revprop/configure.ac Tue Aug  3 19:21:13 2010
@@ -902,6 +902,9 @@ AS_HELP_STRING([--enable-maintainer-mode
         CFLAGS="-Wold-style-definition $CFLAGS_KEEP"
         AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"])
 
+        CFLAGS="-Wno-system-headers $CFLAGS_KEEP"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"])
+
         AC_LANG_POP([C])
         CFLAGS="$CFLAGS_KEEP"
       fi

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Tue Aug  3 19:21:13 2010
@@ -25,9 +25,10 @@ package org.apache.subversion.javahl;
 
 import java.util.Map;
 import java.util.EventObject;
+import org.apache.subversion.javahl.callback.ClientNotifyCallback;
 
 /**
- * The event passed to the {@link Notify2#onNotify(NotifyInformation)}
+ * The event passed to the {@link ClientNotifyCallback#onNotify}
  * API to notify {@link ISVNClient} of relevant events.
  *
  * @since 1.2
@@ -128,14 +129,14 @@ public class ClientNotifyInformation ext
      * This constructor is to be used by the native code.
      *
      * @param path The path of the item, which is the source of the event.
-     * @param action The {@link NotifyAction} which triggered this event.
+     * @param action The {@link Action} which triggered this event.
      * @param kind The {@link NodeKind} of the item.
      * @param mimeType The MIME type of the item.
      * @param lock Any lock for the item.
      * @param errMsg Any error message for the item.
-     * @param contentState The {@link NotifyStatus} of the content of
+     * @param contentState The {@link Status} of the content of
      * the item.
-     * @param propState The {@link NotifyStatus} of the properties of
+     * @param propState The {@link Status} of the properties of
      * the item.
      * @param lockState The {@link LockStatus} of the lock of the item.
      * @param revision The revision of the item.
@@ -187,7 +188,7 @@ public class ClientNotifyInformation ext
     }
 
     /**
-     * @return The {@link NotifyAction} which triggered this event.
+     * @return The {@link Action} which triggered this event.
      */
     public Action getAction()
     {
@@ -227,7 +228,7 @@ public class ClientNotifyInformation ext
     }
 
     /**
-     * @return The {@link NotifyStatus} of the content of the item.
+     * @return The {@link Status} of the content of the item.
      */
     public Status getContentState()
     {
@@ -235,7 +236,7 @@ public class ClientNotifyInformation ext
     }
 
     /**
-     * @return The {@link NotifyStatus} of the properties of the item.
+     * @return The {@link Status} of the properties of the item.
      */
     public Status getPropState()
     {

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java Tue Aug  3 19:21:13 2010
@@ -24,11 +24,11 @@
 package org.apache.subversion.javahl;
 
 import java.util.EventObject;
+import org.apache.subversion.javahl.callback.DiffSummaryCallback;
 
 /**
- * The event passed to the {@link
- * DiffSummaryReceiver#onSummary(DiffSummary)} API in response to path
- * differences reported by {@link ISVNClient#diffSummarize}.
+ * The event passed to the {@link DiffSummaryCallback#onSummary} API
+ * in response to path differences reported by {@link ISVNClient#diffSummarize}.
  *
  * @since 1.5
  */

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Aug  3 19:21:13 2010
@@ -620,11 +620,11 @@ public interface ISVNClient
      *
      * @param target Path or URL.
      * @param pegRevision Revision at which to interpret
-     * <code>target</code>.  If {@link RevisionKind#unspecified} or
+     * <code>target</code>.  If {@link Revision.Kind#unspecified} or
      * <code>null</code>, behave identically to {@link
-     * #diffSummarize(String, Revision, String, Revision, int,
-     * boolean, DiffSummaryCallback)}, using <code>path</code> for
-     * both of that method's targets.
+     * #diffSummarize(String, Revision, String, Revision, Depth,
+     * Collection, boolean, DiffSummaryCallback)}, using
+     * <code>path</code> for both of that method's targets.
      * @param startRevision Beginning of range for comparsion of
      * <code>target</code>.
      * @param endRevision End of range for comparsion of

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Tue Aug  3 19:21:13 2010
@@ -137,7 +137,6 @@ public interface ISVNRepos {
 	 * load the data of a dump into a repository,
 	 * @param path              the path to the repository
 	 * @param dataInput         the data input source
-	 * @param messageOutput     the target for processing messages
 	 * @param ignoreUUID        ignore any UUID found in the input stream
 	 * @param forceUUID         set the repository UUID to any found in the
 	 *                          stream
@@ -145,6 +144,7 @@ public interface ISVNRepos {
 	 * @param usePostCommitHook use the post-commit hook when processing commits
 	 * @param relativePath      the directory in the repository, where the data
 	 *                          in put optional.
+	 * @param callback          the target for processing messages
 	 * @throws ClientException  throw in case of problem
 	 * @since 1.5
 	 */

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java Tue Aug  3 19:21:13 2010
@@ -26,7 +26,7 @@ package org.apache.subversion.javahl;
 import java.util.Date;
 
 /**
- * this class is returned by {@link ISVNClient.info2} and contains information
+ * this class is returned by {@link ISVNClient#info2} and contains information
  * about items in the repository or working copy
  * @since 1.2
  */

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java Tue Aug  3 19:21:13 2010
@@ -23,10 +23,11 @@
 
 package org.apache.subversion.javahl;
 
+import org.apache.subversion.javahl.callback.ProgressCallback;
+
 /**
- * The event passed to the {@link
- * ProgressListener#onProgress(ProgressEvent)} API to inform {@link
- * ISVNClient} of command progress (in terms of bytes).
+ * The event passed to the {@link ProgressCallback#onProgress} API to inform
+ * {@link ISVNClient} of command progress (in terms of bytes).
  *
  * @since 1.5
  */

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Tue Aug  3 19:21:13 2010
@@ -24,9 +24,10 @@
 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)}
+ * The event passed to the {@link ReposNotifyCallback#onNotify}
  * API to notify {@link ISVNClient} of relevant events.
  *
  * @since 1.2
@@ -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/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java Tue Aug  3 19:21:13 2010
@@ -26,6 +26,7 @@ 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
@@ -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/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ChangelistCallback.java Tue Aug  3 19:21:13 2010
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.callback;
 
+import org.apache.subversion.javahl.ISVNClient;
+
 /**
  * This interface is used to receive every status item for
  * the {@link ISVNClient#status} call.

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/DiffSummaryCallback.java Tue Aug  3 19:21:13 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

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InfoCallback.java Tue Aug  3 19:21:13 2010
@@ -24,6 +24,7 @@
 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

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java Tue Aug  3 19:21:13 2010
@@ -25,6 +25,7 @@ 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

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/LogMessageCallback.java Tue Aug  3 19:21:13 2010
@@ -24,6 +24,7 @@
 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;

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/PatchCallback.java Tue Aug  3 19:21:13 2010
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.callback;
 
+import org.apache.subversion.javahl.ISVNClient;
+
 /**
  * This interface is invoked before each patch in a
  * {@link ISVNClient#patch} call.
@@ -30,9 +32,10 @@ package org.apache.subversion.javahl.cal
 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/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java Tue Aug  3 19:21:13 2010
@@ -24,6 +24,7 @@
 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

Modified: subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/StatusCallback.java Tue Aug  3 19:21:13 2010
@@ -24,6 +24,7 @@
 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

Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Tue Aug  3 19:21:13 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,17 @@ 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 *result = PyList_New(window->num_ops);
+  int i;
+  
+  for (i = 0; i < window->num_ops; ++i)
+      PyList_SET_ITEM(result, i,
+                      SWIG_NewPointerObj(window->ops + i, op_type_info, 0));
+
+  return result;
+}

Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Tue Aug  3 19:21:13 2010
@@ -508,6 +508,14 @@ 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 *". */
+SVN_SWIG_SWIGUTIL_EXPORT
+PyObject *
+svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
+                                     swig_type_info * op_type_info);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/svn/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/svn/delta.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/svn/delta.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/svn/delta.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/auth.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/auth.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/auth.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/auth.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/client.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/client.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/client.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/client.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/core.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/core.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/core.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py Tue Aug  3 19:21:13 2010
@@ -48,7 +48,7 @@ class DeltaTestCase(unittest.TestCase):
     window_handler(None, baton)
 
 def suite():
-  return unittest.makeSuite(DeltaTestCase, 'test')
+  return unittest.defaultTestLoader.loadTestsFromTestCase(DeltaTestCase)
 
 if __name__ == '__main__':
   runner = unittest.TextTestRunner()

Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/mergeinfo.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/mergeinfo.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/mergeinfo.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/mergeinfo.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/pool.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/pool.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/pool.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/pool.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/ra.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/ra.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/ra.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/ra.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/repository.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/repository.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/utils.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/utils.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/utils.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/utils.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/python/tests/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/wc.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/wc.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/wc.py Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/ruby/test/test_info.rb
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/ruby/test/test_info.rb?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/ruby/test/test_info.rb (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/ruby/test/test_info.rb Tue Aug  3 19:21:13 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/atomic-revprop/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i Tue Aug  3 19:21:13 2010
@@ -172,6 +172,17 @@ 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(svn_txdelta_window_t *window)
+{
+  return svn_swig_py_txdelta_window_t_ops_get(window,
+    SWIG_TypeQuery("svn_txdelta_op_t *"));
+}
+%}
+#endif
 
 %include svn_delta_h.swg
 

Modified: subversion/branches/atomic-revprop/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_dirent_uri.h?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_dirent_uri.h Tue Aug  3 19:21:13 2010
@@ -766,20 +766,22 @@ svn_uri_condense_targets(const char **pc
                          apr_pool_t *scratch_pool);
 
 /** Check that when @a path is joined to @a base_path, the resulting path
- * is still under BASE_PATH in the local filesystem. If not, return @c FALSE.
- * If @c TRUE is returned, @a *full_path will be set to the absolute path
- * of @a path, allocated in @a pool.
+ * is still under BASE_PATH in the local filesystem. If not, set @a under_root
+ * to @c FALSE. If @a under_root is @c TRUE is returned, and @a result_path is
+ * not @c NULL, then @a *result_path will be set to the absolute path of @a
+ * path, allocated in @a result_pool.
  *
  * Note: Use of this function is strongly encouraged. Do not roll your own.
  * (http://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-3846)
  *
  * @since New in 1.7.
  */
-svn_boolean_t
-svn_dirent_is_under_root(char **full_path,
+svn_error_t *
+svn_dirent_is_under_root(svn_boolean_t *under_root,
+                         const char **result_path,
                          const char *base_path,
                          const char *path,
-                         apr_pool_t *pool);
+                         apr_pool_t *result_pool);
 
 /** Set @a *dirent to the path corresponding to the file:// URL @a url, using
  * the platform-specific file:// rules.

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/cmdline.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/cmdline.c Tue Aug  3 19:21:13 2010
@@ -121,10 +121,15 @@ check_root_url_of_target(const char **ro
       /* It is OK if the given target does not exist, it just means
        * we will not be able to determine the root url from this particular
        * argument.
+       *
+       * If the target itself is a URL to a repository that does not exist,
+       * that's fine, too. The callers will deal with this argument in an
+       * appropriate manter if it does not make any sense.
        */
       if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
           || (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-          || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
+          || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+          || (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED))
         {
           svn_error_clear(err);
           return SVN_NO_ERROR;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/commit.c Tue Aug  3 19:21:13 2010
@@ -694,6 +694,11 @@ svn_client_import4(const char *path,
   const char *dir;
   apr_pool_t *subpool;
 
+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
   base_dir_abspath = local_abspath;
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/delete.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/delete.c Tue Aug  3 19:21:13 2010
@@ -318,17 +318,31 @@ svn_client_delete4(const apr_array_heade
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
+  svn_boolean_t is_url;
+  int i;
+
   if (! paths->nelts)
     return SVN_NO_ERROR;
 
-  if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
+  /* Check that all targets are of the same type. */
+  is_url = svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *));
+  for (i = 1; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      if (is_url != svn_path_is_url(path))
+        return svn_error_return(
+                 svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                  _("Cannot mix repository and working copy "
+                                    "targets")));
+    }
+
+  if (is_url)
     {
       SVN_ERR(delete_urls(paths, revprop_table, ctx, pool));
     }
   else
     {
       apr_pool_t *subpool = svn_pool_create(pool);
-      int i;
 
       for (i = 0; i < paths->nelts; i++)
         {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/export.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/export.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/export.c Tue Aug  3 19:21:13 2010
@@ -942,6 +942,11 @@ svn_client_export5(svn_revnum_t *result_
   SVN_ERR_ASSERT(peg_revision != NULL);
   SVN_ERR_ASSERT(revision != NULL);
 
+  if (svn_path_is_url(to))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              to));
+    
   peg_revision = svn_cl__rev_default_to_head_or_working(peg_revision, from);
   revision = svn_cl__rev_default_to_peg(revision, peg_revision);
 

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/externals.c Tue Aug  3 19:21:13 2010
@@ -877,7 +877,8 @@ handle_external_item_change(const void *
             SVN_ERR(svn_client_export4(NULL, new_item->url, local_abspath,
                                        &(new_item->peg_revision),
                                        &(new_item->revision),
-                                       FALSE, TRUE, svn_depth_infinity, NULL,
+                                       FALSE, TRUE, svn_depth_infinity,
+                                       ib->native_eol,
                                        ib->ctx, ib->iter_pool));
           else
             SVN_ERR(switch_file_external(local_abspath,

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/log.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/log.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/log.c Tue Aug  3 19:21:13 2010
@@ -391,8 +391,17 @@ svn_client_log5(const apr_array_header_t
         {
           /* We have some paths, let's use them. Start after the URL.  */
           for (i = 1; i < targets->nelts; i++)
-            APR_ARRAY_PUSH(condensed_targets, const char *) =
-                APR_ARRAY_IDX(targets, i, const char *);
+            {
+              const char *target;
+
+              target = APR_ARRAY_IDX(targets, i, const char *);
+              if (svn_path_is_url(target) || svn_dirent_is_absolute(target))
+                return svn_error_return(svn_error_createf(
+                                          SVN_ERR_ILLEGAL_TARGET, NULL,
+                                          _("'%s' is not a relative path"),
+                                          target));
+              APR_ARRAY_PUSH(condensed_targets, const char *) = target;
+            }
         }
       else
         {

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/patch.c Tue Aug  3 19:21:13 2010
@@ -145,7 +145,7 @@ typedef struct patch_target_t {
   /* The absolute path of the target on the filesystem.
    * Any symlinks the path from the patch file may contain are resolved.
    * Is not always known, so it may be NULL. */
-  char *local_abspath;
+  const char *local_abspath;
 
   /* The target file, read-only, seekable. This is NULL in case the target
    * file did not exist prior to patch application. */
@@ -337,12 +337,18 @@ resolve_target_path(patch_target_t *targ
                     apr_pool_t *scratch_pool)
 {
   const char *stripped_path;
+  const char *full_path;
   svn_wc_status3_t *status;
   svn_error_t *err;
+  svn_boolean_t under_root;
 
   target->canon_path_from_patchfile = svn_dirent_internal_style(
                                         path_from_patchfile, result_pool);
-  if (target->canon_path_from_patchfile[0] == '\0')
+
+  /* We allow properties to be set on the wc root dir.
+   * ### Do we need to check for empty paths here, shouldn't the parser
+   * ### guarentee that the paths returned are non-empty? */
+  if (! prop_changes_only && target->canon_path_from_patchfile[0] == '\0')
     {
       /* An empty patch target path? What gives? Skip this. */
       target->skipped = TRUE;
@@ -362,7 +368,6 @@ resolve_target_path(patch_target_t *targ
       target->local_relpath = svn_dirent_is_child(local_abspath, stripped_path,
                                                   result_pool);
 
-      /* ### We need to allow setting props on the wc root dir */
       if (! target->local_relpath)
         {
           /* The target path is either outside of the working copy
@@ -380,8 +385,11 @@ resolve_target_path(patch_target_t *targ
 
   /* Make sure the path is secure to use. We want the target to be inside
    * of the working copy and not be fooled by symlinks it might contain. */
-  if (! svn_dirent_is_under_root(&target->local_abspath, local_abspath,
-                                 target->local_relpath, result_pool))
+  SVN_ERR(svn_dirent_is_under_root(&under_root,
+                                   &full_path, local_abspath,
+                                   target->local_relpath, result_pool));
+
+  if (! under_root)
     {
       /* The target path is outside of the working copy. Skip it. */
       target->skipped = TRUE;
@@ -389,6 +397,9 @@ resolve_target_path(patch_target_t *targ
       return SVN_NO_ERROR;
     }
 
+  SVN_ERR(svn_dirent_get_absolute(&target->local_abspath, full_path,
+                                  result_pool));
+
   /* Skip things we should not be messing with. */
   err = svn_wc_status3(&status, wc_ctx, target->local_abspath,
                        result_pool, scratch_pool);
@@ -466,7 +477,7 @@ init_prop_target(prop_patch_target_t **p
   target_content_info_t *content_info; 
   const svn_string_t *value;
   const char *patched_path;
-
+  svn_error_t *err;
 
   content_info = apr_pcalloc(result_pool, sizeof(*content_info));
 
@@ -485,8 +496,18 @@ init_prop_target(prop_patch_target_t **p
   new_prop_target->operation = operation;
   new_prop_target->content_info = content_info;
 
-  SVN_ERR(svn_wc_prop_get2(&value, wc_ctx, local_abspath, prop_name, 
-                           result_pool, scratch_pool));
+  err = svn_wc_prop_get2(&value, wc_ctx, local_abspath, prop_name, 
+                           result_pool, scratch_pool);
+  if (err)
+    {
+      if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+        {
+          svn_error_clear(err);
+          value = NULL;
+        }
+      else
+        return svn_error_return(err);
+    }
 
   if (value)
     {
@@ -1556,8 +1577,12 @@ send_patch_notification(const patch_targ
 
               hi = APR_ARRAY_IDX(prop_target->content_info->hunks, i,
                                  hunk_info_t *);
-              SVN_ERR(send_hunk_notification(hi, target, prop_target->name, 
-                                             ctx, iterpool));
+
+              /* Don't notify on the hunk level for added or deleted props. */
+              if (prop_target->operation != svn_diff_op_added &&
+                  prop_target->operation != svn_diff_op_deleted)
+                SVN_ERR(send_hunk_notification(hi, target, prop_target->name, 
+                                               ctx, iterpool));
             }
         }
       svn_pool_destroy(iterpool);
@@ -1925,7 +1950,10 @@ create_missing_parents(patch_target_t *t
       else if (wc_kind == svn_node_dir)
         {
           if (is_deleted)
-            break;
+            {
+              target->skipped = TRUE;
+              break;
+            }
 
           /* continue one level deeper */
           present_components++;
@@ -2047,7 +2075,25 @@ install_patched_target(patch_target_t *t
                                    svn_dirent_dirname(target->local_abspath,
                                                       pool),
                                    FALSE, pool));
-          if (parent_db_kind != svn_node_dir)
+
+          /* We don't allow targets to be added under dirs scheduled for
+           * deletion. */
+          if (parent_db_kind == svn_node_dir)
+            {
+              const char *parent_abspath;
+              svn_boolean_t is_deleted;
+              
+              parent_abspath = svn_dirent_dirname(target->local_abspath,
+                                                  pool);
+              SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
+                                                     parent_abspath, pool));
+              if (is_deleted)
+                {
+                  target->skipped = TRUE;
+                  return SVN_NO_ERROR;
+                }
+            }
+          else
             SVN_ERR(create_missing_parents(target, abs_wc_path, ctx,
                                            dry_run, pool));
         }

Modified: subversion/branches/atomic-revprop/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_client/prop_commands.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_client/prop_commands.c Tue Aug  3 19:21:13 2010
@@ -118,7 +118,8 @@ propset_walk_cb(const char *local_abspat
 
   err = svn_wc_prop_set4(wb->wc_ctx, local_abspath, wb->propname, wb->propval,
                          wb->force, wb->notify_func, wb->notify_baton, pool);
-  if (err && err->apr_err == SVN_ERR_ILLEGAL_TARGET)
+  if (err && (err->apr_err == SVN_ERR_ILLEGAL_TARGET
+              || err->apr_err == SVN_ERR_WC_INVALID_SCHEDULE))
     {
       svn_error_clear(err);
       err = SVN_NO_ERROR;

Modified: subversion/branches/atomic-revprop/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_diff/diff_memory.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_diff/diff_memory.c Tue Aug  3 19:21:13 2010
@@ -519,8 +519,13 @@ output_unified_diff_modified(void *baton
   targ_orig = (targ_orig < 0) ? 0 : targ_orig;
   targ_mod = modified_start;
 
+  /* If the changed ranges are far enough apart (no overlapping or
+   * connecting context), flush the current hunk. */
   if (btn->next_token + SVN_DIFF__UNIFIED_CONTEXT_SIZE < targ_orig)
     SVN_ERR(output_unified_flush_hunk(btn, btn->hunk_delimiter));
+  /* Adjust offset if it's not the first hunk. */
+  else if (btn->hunk_length[0] != 0)
+    targ_orig = btn->next_token;
 
   if (btn->hunk_length[0] == 0
       && btn->hunk_length[1] == 0)