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

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

Modified: subversion/branches/cache-server/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/native/SVNClient.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/native/SVNClient.h Tue Oct 15 08:52:06 2013
@@ -53,7 +53,7 @@ class PatchCallback;
 class ChangelistCallback;
 class CommitMessage;
 class StringArray;
-class RevpropTable;
+class PropertyTable;
 class DiffOptions;
 #include "svn_types.h"
 #include "svn_client.h"
@@ -62,12 +62,14 @@ class DiffOptions;
 class SVNClient :public SVNBase
 {
  public:
+  jobject openRemoteSession(const char* path, int);
   void patch(const char *patchPath, const char *targetPath, bool dryRun,
              int stripCount, bool reverse, bool ignoreWhitespace,
              bool removeTempfiles, PatchCallback *callback);
-  void info2(const char *path, Revision &revision, Revision &pegRevision,
-             svn_depth_t depth, StringArray &changelists,
-             InfoCallback *callback);
+  void info2(const char *path,
+             Revision &revision, Revision &pegRevision, svn_depth_t depth,
+             svn_boolean_t fetchExcluded, svn_boolean_t fetchActualOnly,
+             StringArray &changelists, InfoCallback *callback);
   void unlock(Targets &targets, bool force);
   void lock(Targets &targets, const char *comment, bool force);
   jobject revProperties(const char *path, Revision &revision);
@@ -86,7 +88,7 @@ class SVNClient :public SVNBase
   void propertySetRemote(const char *path, long base_rev, const char *name,
                          CommitMessage *message,
                          JNIByteArray &value, bool force,
-                         RevpropTable &revprops, CommitCallback *callback);
+                         PropertyTable &revprops, CommitCallback *callback);
   void properties(const char *path, Revision &revision,
                   Revision &pegRevision, svn_depth_t depth,
                   StringArray &changelists, ProplistCallback *callback);
@@ -114,7 +116,7 @@ class SVNClient :public SVNBase
   void doImport(const char *path, const char *url, CommitMessage *message,
                 svn_depth_t depth, bool noIgnore, bool noAutoProps,
                 bool ignoreUnknownNodeTypes,
-                RevpropTable &revprops, ImportFilterCallback *ifCallback,
+                PropertyTable &revprops, ImportFilterCallback *ifCallback,
                 CommitCallback *commitCallback);
   jlong doSwitch(const char *path, const char *url, Revision &revision,
                  Revision &pegRevision, svn_depth_t depth,
@@ -122,24 +124,24 @@ class SVNClient :public SVNBase
                  bool allowUnverObstructions, bool ignoreAncestry);
   jlong doExport(const char *srcPath, const char *destPath,
                  Revision &revision, Revision &pegRevision, bool force,
-                 bool ignoreExternals, svn_depth_t depth,
-                 const char *nativeEOL);
+                 bool ignoreExternals, bool ignoreKeywords,
+                 svn_depth_t depth, const char *nativeEOL);
   void resolve(const char *path, svn_depth_t depth,
                svn_wc_conflict_choice_t choice);
   void cleanup(const char *path);
   void mkdir(Targets &targets, CommitMessage *message, bool makeParents,
-             RevpropTable &revprops, CommitCallback *callback);
+             PropertyTable &revprops, CommitCallback *callback);
   void move(Targets &srcPaths, const char *destPath,
             CommitMessage *message, bool force, bool moveAsChild,
             bool makeParents, bool metadataOnly, bool allowMixRev,
-            RevpropTable &revprops, CommitCallback *callback);
+            PropertyTable &revprops, CommitCallback *callback);
   void copy(CopySources &copySources, const char *destPath,
             CommitMessage *message, bool copyAsChild, bool makeParents,
-            bool ignoreExternals, RevpropTable &revprops,
+            bool ignoreExternals, PropertyTable &revprops,
             CommitCallback *callback);
   void commit(Targets &targets, CommitMessage *message, svn_depth_t depth,
               bool noUnlock, bool keepChangelist,
-              StringArray &changelists, RevpropTable &revprops,
+              StringArray &changelists, PropertyTable &revprops,
               CommitCallback *callback);
   jlongArray update(Targets &targets, Revision &revision, svn_depth_t depth,
                     bool depthIsSticky, bool makeParents, bool ignoreExternals,
@@ -148,7 +150,7 @@ class SVNClient :public SVNBase
            bool no_ignore, bool no_autoprops, bool add_parents);
   void revert(const char *path, svn_depth_t depth, StringArray &changelists);
   void remove(Targets &targets, CommitMessage *message, bool force,
-              bool keep_local, RevpropTable &revprops,
+              bool keep_local, PropertyTable &revprops,
               CommitCallback *callback);
   jlong checkout(const char *moduleName, const char *destPath,
                  Revision &revision, Revision &pegRevsion, svn_depth_t depth,

Modified: subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_NativeResources.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_NativeResources.cpp?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_NativeResources.cpp (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_NativeResources.cpp Tue Oct 15 08:52:06 2013
@@ -28,11 +28,11 @@
 #include "JNIUtil.h"
 #include "../include/org_apache_subversion_javahl_NativeResources.h"
 
-JNIEXPORT void JNICALL
+JNIEXPORT jboolean JNICALL
 Java_org_apache_subversion_javahl_NativeResources_initNativeLibrary
 (JNIEnv *env, jclass jclazz)
 {
   // No usual JNIEntry here, as the prerequisite native library
   // initialization is performed here.
-  JNIUtil::JNIGlobalInit(env);
+  return jboolean(JNIUtil::JNIGlobalInit(env));
 }

Modified: subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Oct 15 08:52:06 2013
@@ -50,7 +50,7 @@
 #include "ImportFilterCallback.h"
 #include "ChangelistCallback.h"
 #include "StringArray.h"
-#include "RevpropTable.h"
+#include "PropertyTable.h"
 #include "VersionExtended.h"
 #include "DiffOptions.h"
 #include "svn_version.h"
@@ -275,6 +275,21 @@ Java_org_apache_subversion_javahl_SVNCli
 }
 
 JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_setTunnelAgent
+(JNIEnv *env, jobject jthis, jobject jtunnelcb)
+{
+  JNIEntry(SVNClient, setPrompt);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+
+  cl->getClientContext().setTunnelCallback(jtunnelcb);
+}
+
+JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_logMessages
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision,
  jobject jranges, jboolean jstopOnCopy, jboolean jdisoverPaths,
@@ -384,7 +399,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -498,7 +513,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -539,7 +554,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -577,7 +592,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -610,7 +625,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -660,7 +675,8 @@ JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_doExport
 (JNIEnv *env, jobject jthis, jstring jsrcPath, jstring jdestPath,
  jobject jrevision, jobject jpegRevision, jboolean jforce,
- jboolean jignoreExternals, jobject jdepth, jstring jnativeEOL)
+ jboolean jignoreExternals, jboolean jignoreKeywords,
+ jobject jdepth, jstring jnativeEOL)
 {
   JNIEntry(SVNClient, doExport);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -690,7 +706,9 @@ Java_org_apache_subversion_javahl_SVNCli
     return -1;
 
   return cl->doExport(srcPath, destPath, revision, pegRevision,
-                      jforce ? true : false, jignoreExternals ? true : false,
+                      jforce ? true : false,
+                      jignoreExternals ? true : false,
+                      jignoreKeywords ? true : false,
                       EnumMapper::toDepth(jdepth), nativeEOL);
 }
 
@@ -758,7 +776,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1009,7 +1027,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  RevpropTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1792,8 +1810,9 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_info2
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision, jobject jdepth, jobject jchangelists,
- jobject jinfoCallback)
+ jobject jpegRevision, jobject jdepth,
+ jboolean jfetchExcluded, jboolean jfetchActualOnly,
+ jobject jchangelists, jobject jinfoCallback)
 {
   JNIEntry(SVNClient, info2);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1820,6 +1839,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
   InfoCallback callback(jinfoCallback);
   cl->info2(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
+            svn_boolean_t(jfetchExcluded), svn_boolean_t(jfetchActualOnly),
             changelists, &callback);
 }
 
@@ -1851,3 +1871,22 @@ Java_org_apache_subversion_javahl_SVNCli
             jreverse ? true : false, jignoreWhitespace ? true : false,
             jremoveTempfiles ? true : false, &callback);
 }
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_SVNClient_nativeOpenRemoteSession
+(JNIEnv *env, jobject jthis, jstring jpath, jint jretryAttempts)
+{
+  JNIEntry(SVNClient, openRemoteSession);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError("bad C++ this");
+      return NULL;
+    }
+
+  JNIStringHolder path(jpath);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  return cl->openRemoteSession(path, jretryAttempts);
+}

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java Tue Oct 15 08:52:06 2013
@@ -22,6 +22,7 @@
  */
 
 package org.apache.subversion.javahl;
+import java.util.List;
 
 /**
  * This exception is thrown whenever something goes wrong in the
@@ -36,7 +37,54 @@ public class ClientException extends Nat
     // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
     // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
     // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
-    private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 2L;
+
+    /**
+     * Describes a single error message in a stack of messages
+     * associated with this exception.
+     * @since 1.9
+     */
+    public static final class ErrorMessage
+    {
+        ErrorMessage(int code, String message, boolean generic)
+        {
+            this.code = code;
+            this.message = message;
+            this.generic = generic;
+        }
+
+        /** @return The APR error code associated with the message. */
+        public final int getCode() { return code; }
+
+        /** @return The error message text. */
+        public final String getMessage() { return message; }
+
+        /** @return A flag indicating whether this is a generic
+            message for the APR error code, or a more specific message
+            generated by the native libraries. */
+        public final boolean isGeneric() { return generic; }
+
+        private final int code;
+        private final String message;
+        private final boolean generic;
+    };
+
+    /**
+     * This constructor is only used by the native library.
+     *
+     * @param message A description of the problem.
+     * @param source The error's source.
+     * @param aprError Any associated APR error code for a wrapped
+     *        <code>svn_error_t</code>.
+     * @param messageStack The whole stack of error messages
+     * @since 1.9
+     */
+    ClientException(String message, String source, int aprError,
+                    List<ErrorMessage> messageStack)
+    {
+        super(message, source, aprError);
+        this.messageStack = messageStack;
+    }
 
     /**
      * This constructor is only used by the native library.
@@ -48,7 +96,12 @@ public class ClientException extends Nat
      */
     ClientException(String message, String source, int aprError)
     {
-        super(message, source, aprError);
+        this(message, source, aprError, null);
+    }
+
+    public List<ErrorMessage> getAllMessages()
+    {
+        return messageStack;
     }
 
     /**
@@ -68,4 +121,6 @@ public class ClientException extends Nat
             return new ClientException(t.getMessage(), null, -1);
         }
     }
+
+    private final List<ErrorMessage> messageStack;
 }

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Tue Oct 15 08:52:06 2013
@@ -23,10 +23,12 @@
 
 package org.apache.subversion.javahl;
 
+import org.apache.subversion.javahl.types.*;
+import org.apache.subversion.javahl.callback.ClientNotifyCallback;
+
+import java.util.List;
 import java.util.Map;
 import java.util.EventObject;
-import org.apache.subversion.javahl.callback.ClientNotifyCallback;
-import org.apache.subversion.javahl.types.*;
 
 /**
  * The event passed to the {@link ClientNotifyCallback#onNotify}
@@ -41,7 +43,7 @@ public class ClientNotifyInformation ext
     // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
     // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
     // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
-    private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 2L;
 
     /**
      * The {@link Action} which triggered this event.
@@ -69,6 +71,12 @@ public class ClientNotifyInformation ext
     private String errMsg;
 
     /**
+     * A detailed stack of error messages for the item.
+     * @see ClientException
+     */
+    private List<ClientException.ErrorMessage> errMsgStack;
+
+    /**
      * The {@link Status} of the content of the item.
      */
     private Status contentState;
@@ -157,6 +165,7 @@ public class ClientNotifyInformation ext
         this.mimeType = mimeType;
         this.lock = lock;
         this.errMsg = errMsg;
+        this.errMsgStack = null;
         this.contentState = contentState;
         this.propState = propState;
         this.lockState = lockState;
@@ -176,6 +185,34 @@ public class ClientNotifyInformation ext
     }
 
     /**
+     * This constructor will be called only by the native code.
+     *
+     * In addition to all the other parameters, sets the detailed
+     * message stack.
+     */
+    protected ClientNotifyInformation(String path, Action action, NodeKind kind,
+                             String mimeType, Lock lock, String errMsg,
+                             List<ClientException.ErrorMessage> errMsgStack,
+                             Status contentState, Status propState,
+                             LockStatus lockState, long revision,
+                             String changelistName, RevisionRange mergeRange,
+                             String pathPrefix, String propName,
+                             Map<String, String> revProps, long oldRevision,
+                             long hunkOriginalStart, long hunkOriginalLength,
+                             long hunkModifiedStart, long hunkModifiedLength,
+                             long hunkMatchedLine, int hunkFuzz)
+    {
+        this(path, action, kind, mimeType, lock, errMsg,
+             contentState, propState, lockState, revision,
+             changelistName, mergeRange, pathPrefix, propName,
+             revProps, oldRevision,
+             hunkOriginalStart, hunkOriginalLength,
+             hunkModifiedStart, hunkModifiedLength,
+             hunkMatchedLine, hunkFuzz);
+        this.errMsgStack = errMsgStack;
+    }
+
+    /**
      * @return The path of the item, which is the source of the event.
      */
     public String getPath()
@@ -224,6 +261,14 @@ public class ClientNotifyInformation ext
     }
 
     /**
+     * @return Details about the error message for the item.
+     */
+    public List<ClientException.ErrorMessage> getErrMsgDetails()
+    {
+        return errMsgStack;
+    }
+
+    /**
      * @return The {@link Status} of the content of the item.
      */
     public Status getContentState()

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Oct 15 08:52:06 2013
@@ -134,6 +134,12 @@ public interface ISVNClient
     void setPrompt(UserPasswordCallback prompt);
 
     /**
+     * Set callbacks for ra_svn tunnel handling.
+     * @since 1.9
+     */
+    void setTunnelAgent(TunnelAgent tunnelAgent);
+
+    /**
      * Retrieve the log messages for an item.
      * @param path          path or url to get the log message for.
      * @param pegRevision   revision to interpret path
@@ -221,6 +227,10 @@ public interface ISVNClient
 
     /**
      * Adds a file to the repository.
+     * <p>
+     * <b>Note:</b> Behaves like the 1.8 version with
+     * <code>noAutoProps</code> set to <code>false</code>.
+     *
      * @param path      path to be added.
      * @param depth     the depth to recurse into subdirectories
      * @param force     if adding a directory and recurse true and path is a
@@ -229,7 +239,6 @@ public interface ISVNClient
      *                  ignore patterns
      * @param addParents add any intermediate parents to the working copy
      * @throws ClientException
-     * @note this method behaves like the 1.8 version with noAutoProps=false
      */
     void add(String path, Depth depth, boolean force, boolean noIgnores,
              boolean addParents)
@@ -399,6 +408,31 @@ public interface ISVNClient
      * @param depth           how deep to recurse in subdirectories
      * @param nativeEOL       which EOL characters to use during export
      * @throws ClientException
+     * @since 1.9
+     */
+    long doExport(String srcPath, String destPath, Revision revision,
+                  Revision pegRevision, boolean force,
+                  boolean ignoreExternals, boolean ignoreKeywords,
+                  Depth depth, String nativeEOL)
+            throws ClientException;
+
+    /**
+     * Exports the contents of either a subversion repository into a
+     * 'clean' directory (meaning a directory with no administrative
+     * directories).
+     * <p>
+     * <b>Note:</b> Behaves like the 1.9 version with
+     * ignoreKeywords set to false.
+     *
+     * @param srcPath         the url of the repository path to be exported
+     * @param destPath        a destination path that must not already exist.
+     * @param revision        the revsion to be exported
+     * @param pegRevision     the revision to interpret srcPath
+     * @param force           set if it is ok to overwrite local files
+     * @param ignoreExternals ignore external during export
+     * @param depth           how deep to recurse in subdirectories
+     * @param nativeEOL       which EOL characters to use during export
+     * @throws ClientException
      */
     long doExport(String srcPath, String destPath, Revision revision,
                   Revision pegRevision, boolean force, boolean ignoreExternals,
@@ -457,6 +491,10 @@ public interface ISVNClient
     /**
      * Import a file or directory into a repository directory  at
      * head.
+     * <p>
+     * <b>Note:</b> Behaves like the 1.8 version with noAutoProps
+     * set to false and without the filtering option.
+     *
      * @param path      the local path
      * @param url       the target url
      * @param depth     depth to traverse into subdirectories
@@ -469,8 +507,6 @@ public interface ISVNClient
      * @param handler   the commit message callback
      * @param callback  the commit status callback
      * @throws ClientException
-     * @note this method behaves like the 1.8 version with noAutoProps=false
-     *       and without the filtering option.
      */
     void doImport(String path, String url, Depth depth,
                   boolean noIgnore, boolean ignoreUnknownNodeTypes,
@@ -513,6 +549,9 @@ public interface ISVNClient
 
     /**
      * Merge changes from two paths into a new local path.
+     * <p>
+     * <b>Note:</b> Behaves like the 1.8 version where ignoreAncestry
+     * maps to both ignoreMergeinfo and diffIgnoreAncestry
      *
      * @param path1          first path or url
      * @param revision1      first revision
@@ -525,8 +564,6 @@ public interface ISVNClient
      * @param dryRun         do not change anything
      * @param recordOnly     record mergeinfo but do not run merge
      * @throws ClientException
-     * @note Behaves like the 1.8 where ignoreAncestry maps to
-     *       both ignoreMergeinfo and diffIgnoreAncestry
      */
     void merge(String path1, Revision revision1, String path2,
                Revision revision2, String localPath, boolean force, Depth depth,
@@ -557,6 +594,10 @@ public interface ISVNClient
 
     /**
      * Merge set of revisions into a new local path.
+     * <p>
+     * <b>Note:</b> Behaves like the 1.8 version where ignoreAncestry
+     * maps to both ignoreMergeinfo and diffIgnoreAncestry
+     *
      * @param path          path or url
      * @param pegRevision   revision to interpret path
      * @param revisions     revisions to merge;
@@ -569,8 +610,6 @@ public interface ISVNClient
      * @param dryRun        do not change anything
      * @param recordOnly    record mergeinfo but do not run merge
      * @throws ClientException
-     * @note Behaves like the 1.8 where ignoreAncestry maps to
-     *       both ignoreMergeinfo and diffIgnoreAncestry
      */
     void merge(String path, Revision pegRevision, List<RevisionRange> revisions,
                String localPath, boolean force, Depth depth,
@@ -635,6 +674,10 @@ public interface ISVNClient
 
     /**
      * Retrieve either merged or eligible-to-be-merged revisions.
+     * <p>
+     * <b>Note:</b> Behaves like the 1.8 version, with unspecified
+     * revision range.
+     *
      * @param kind                   kind of revisions to receive
      * @param pathOrUrl              target of merge
      * @param pegRevision            peg rev for pathOrUrl
@@ -644,7 +687,6 @@ public interface ISVNClient
      * @param depth                  the depth to recurse to
      * @param revProps               the revprops to retrieve
      * @param callback               the object to receive the log messages
-     * @note Behaves like the 1.8 version, with unspecified revision range.
      */
     void getMergeinfoLog(Mergeinfo.LogKind kind, String pathOrUrl,
                          Revision pegRevision, String mergeSourceUrl,
@@ -1097,7 +1139,56 @@ public interface ISVNClient
             throws ClientException;
 
     /**
+     * Invoke <code>callback</code> to return information
+     * <code>pathOrUrl</code> in <code>revision</code>.  The
+     * information returned is system-generated metadata, not the sort
+     * of "property" metadata created by users.
+     * <p>
+     * If both revision arguments are either <code>null</code> or
+     * {@link Revision#START}, then information will be pulled solely
+     * from the working copy; no network connections will be made.
+     * <p>
+     * Otherwise, information will be pulled from a repository.  The
+     * actual node revision selected is determined by the
+     * <code>pathOrUrl</code> as it exists in
+     * <code>pegRevision</code>.  If <code>pegRevision</code> is
+     * {@link Revision#START}, then it defaults to {@link
+     * Revision#HEAD} for URLs or {@link Revision#WORKING} for WC
+     * targets.
+     * <p>
+     * If <code>pathOrUrl</code> is not a local path, then if
+     * <code>revision</code> is {@link Revision#PREVIOUS} (or some
+     * other kind that requires a local path), an error will be
+     * returned, because the desired revision cannot be determined.
+     * <p>
+     * If <code>pathOrUrl</code> is a file, just invoke the callback on it.  If it
+     * is a directory, then descend according to <code>depth</code>.
+     * <p>
+     * @param pathOrUrl     the path or the url of the item
+     * @param revision      the revision of the item to return
+     * @param pegRevision   the revision to interpret pathOrUrl
+     * @param depth         the depth to recurse
+     * @param fetchExcluded when <code>true</code>, retreive
+     * information about nodes that are excluded from the working copy
+     * @param fetchActualOnly when <code>true</code>, retreive
+     * information about node that are not versioned, but are still
+     * tree conflicted.
+     * @param changelists   if non-null, filter paths using changelists
+     * @param callback      a callback to receive the infos retrieved
+     * @since 1.9
+     */
+    void info2(String pathOrUrl,
+               Revision revision, Revision pegRevision, Depth depth,
+               boolean fertchExcluded, boolean fetchActualOnly,
+               Collection<String> changelists, InfoCallback callback)
+        throws ClientException;
+
+    /**
      * Retrieve information about repository or working copy items.
+     * <p>
+     * Behaves like the 1.9 version, with <code>fetchExcluded</code>
+     * set to <code>false</code> and <code>fetchActualOnly</code> set
+     * to <code>true</code>.
      * @param pathOrUrl     the path or the url of the item
      * @param revision      the revision of the item to return
      * @param pegRevision   the revision to interpret pathOrUrl
@@ -1145,4 +1236,40 @@ public interface ISVNClient
                int stripCount, boolean reverse, boolean ignoreWhitespace,
                boolean removeTempfiles, PatchCallback callback)
             throws ClientException;
+
+    /**
+     * Open a persistent session to a repository.
+     * <p>
+     * <b>Note:</b> The session object inherits the progress callback,
+     * configuration directory and authentication info.
+     *
+     * @param pathOrUrl A path in a working copy from which the
+     *        session URL is derived, or the URL itself.
+     * @throws remote.RetryOpenSession If the session URL was redirected
+     * @throws SubversionException If an URL redirect cycle was detected
+     * @throws ClientException
+     * @since 1.9
+     */
+    ISVNRemote openRemoteSession(String pathOrUrl)
+            throws ClientException, SubversionException;
+
+    /**
+     * Open a persistent session to a repository.
+     * <p>
+     * <b>Note:</b> The session object inherits the progress callback,
+     * configuration directory and authentication info.
+     *
+     * @param pathOrUrl A path in a working copy from which the
+     *        session URL is derived, or the URL itself.
+     * @param retryAttempts The number of times to retry the operation
+     *        if the given URL is redirected.
+     * @throws IllegalArgumentException If <code>retryAttempts</code>
+     *         is not positive
+     * @throws remote.RetryOpenSession If the session URL was redirected
+     * @throws SubversionException If an URL redirect cycle was detected
+     * @throws ClientException
+     * @since 1.9
+     */
+    ISVNRemote openRemoteSession(String pathOrUrl, int retryAttempts)
+            throws ClientException, SubversionException;
 }

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Tue Oct 15 08:52:06 2013
@@ -129,17 +129,19 @@ public class NativeResources
      */
     private static final void init()
     {
-        initNativeLibrary();
+        if (!initNativeLibrary())
+            throw new LinkageError("Native library initialization failed");
+
         version = new Version();
-        if (!version.isAtLeast(1, 7, 0))
+        if (!version.isAtLeast(1, 9, 0))
         {
             throw new LinkageError("Native library version must be at least " +
-                                   "1.7.0, but is only " + version);
+                                   "1.9.0, but is only " + version);
         }
     }
 
     /**
      * Initialize the native library layer.
      */
-    private static native void initNativeLibrary();
+    private static native boolean initNativeLibrary();
 }

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Tue Oct 15 08:52:06 2013
@@ -132,6 +132,8 @@ public class SVNClient implements ISVNCl
 
     public native void setPrompt(UserPasswordCallback prompt);
 
+    public native void setTunnelAgent(TunnelAgent tunnelAgent);
+
     public native void logMessages(String path, Revision pegRevision,
                                    List<RevisionRange> revisionRanges,
                                    boolean stopOnCopy, boolean discoverPath,
@@ -151,14 +153,14 @@ public class SVNClient implements ISVNCl
         clientContext.notify = notify;
     }
 
-    public void setConflictResolver(ConflictResolverCallback listener)
+    public void setConflictResolver(ConflictResolverCallback resolver)
     {
-        clientContext.resolver = listener;
+        clientContext.resolver = resolver;
     }
 
-    public void setProgressCallback(ProgressCallback listener)
+    public void setProgressCallback(ProgressCallback progress)
     {
-        clientContext.listener = listener;
+        clientContext.setProgressCallback(progress);
     }
 
     public native void remove(Set<String> paths, boolean force,
@@ -239,9 +241,20 @@ public class SVNClient implements ISVNCl
     public native long doExport(String srcPath, String destPath,
                                 Revision revision, Revision pegRevision,
                                 boolean force, boolean ignoreExternals,
+                                boolean ignorKeywords,
                                 Depth depth, String nativeEOL)
             throws ClientException;
 
+    public long doExport(String srcPath, String destPath,
+                                Revision revision, Revision pegRevision,
+                                boolean force, boolean ignoreExternals,
+                                Depth depth, String nativeEOL)
+            throws ClientException
+    {
+        return doExport(srcPath, destPath, revision, pegRevision,
+                        force, ignoreExternals, false, depth, nativeEOL);
+    }
+
     public native long doSwitch(String path, String url, Revision revision,
                                 Revision pegRevision, Depth depth,
                                 boolean depthIsSticky, boolean ignoreExternals,
@@ -651,26 +664,54 @@ public class SVNClient implements ISVNCl
 
     public native void info2(String pathOrUrl, Revision revision,
                              Revision pegRevision, Depth depth,
+                             boolean fetchExcluded, boolean fetchActualOnly,
                              Collection<String> changelists,
                              InfoCallback callback)
             throws ClientException;
 
+    public void info2(String pathOrUrl, Revision revision,
+                      Revision pegRevision, Depth depth,
+                      Collection<String> changelists,
+                      InfoCallback callback)
+            throws ClientException
+    {
+        info2(pathOrUrl, revision, pegRevision, depth,
+              false, true, changelists, callback);
+    }
+
     public native void patch(String patchPath, String targetPath,
                              boolean dryRun, int stripCount, boolean reverse,
                              boolean ignoreWhitespace, boolean removeTempfiles,
                              PatchCallback callback)
             throws ClientException;
 
+    public ISVNRemote openRemoteSession(String pathOrUrl)
+            throws ClientException, SubversionException
+    {
+        return nativeOpenRemoteSession(pathOrUrl, 1);
+    }
+
+    public ISVNRemote openRemoteSession(String pathOrUrl, int retryAttempts)
+            throws ClientException, SubversionException
+    {
+        if (retryAttempts <= 0)
+            throw new IllegalArgumentException(
+                "retryAttempts must be positive");
+        return nativeOpenRemoteSession(pathOrUrl, retryAttempts);
+    }
+
+    private native ISVNRemote nativeOpenRemoteSession(
+        String pathOrUrl, int retryAttempts)
+            throws ClientException, SubversionException;
+
     /**
      * A private class to hold the contextual information required to
      * persist in this object, such as notification handlers.
      */
-    private class ClientContext
-        implements ClientNotifyCallback, ProgressCallback,
-            ConflictResolverCallback
+    private class ClientContext extends OperationContext
+        implements ClientNotifyCallback, ConflictResolverCallback
     {
         public ClientNotifyCallback notify = null;
-        public ProgressCallback listener = null;
         public ConflictResolverCallback resolver = null;
 
         public void onNotify(ClientNotifyInformation notifyInfo)
@@ -679,12 +720,6 @@ public class SVNClient implements ISVNCl
                 notify.onNotify(notifyInfo);
         }
 
-        public void onProgress(ProgressEvent event)
-        {
-            if (listener != null)
-                listener.onProgress(event);
-        }
-
         public ConflictResult resolve(ConflictDescriptor conflict)
             throws SubversionException
         {

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java Tue Oct 15 08:52:06 2013
@@ -69,6 +69,31 @@ public class Mergeinfo implements java.i
     }
 
     /**
+     * The three ways to request mergeinfo affecting a given path
+     * in {@link org.apache.subversion.javahl.ISVNRemote#getMergeinfo}.
+     * @since 1.9
+     */
+    public static enum Inheritance
+    {
+        /** Explicit mergeinfo only. */
+        explicit,
+
+        /**
+         * Explicit mergeinfo, or if that doesn't exist, the inherited
+         * mergeinfo from a target's nearest (path-wise, not history-wise)
+         * ancestor.
+         */
+        inherited,
+
+        /**
+         * Mergeinfo inherited from a target's nearest (path-wise,
+         * not history-wise) ancestor, regardless of whether target
+         * has explicit mergeinfo.
+         */
+        nearest_ancestor;
+    }
+
+    /**
      * Add one or more RevisionRange objects to merge info. If the
      * merge source is already stored, the list of revisions is
      * replaced.
@@ -83,6 +108,11 @@ public class Mergeinfo implements java.i
             addRevisionRange(mergeSrc, range);
     }
 
+    public void addRevisions(String mergeSrc, RevisionRangeList ranges)
+    {
+        addRevisions(mergeSrc, ranges.getRanges());
+    }
+
     /**
      * Add a revision range to the merged revisions for a path.  If
      * the merge source already has associated revision ranges, add
@@ -131,6 +161,14 @@ public class Mergeinfo implements java.i
     }
 
     /**
+     * Like {@link #getReivsionRange}, but returns a {@link RevisionRangeList}.
+     */
+    public RevisionRangeList getRevisionRangeList(String mergeSrc)
+    {
+        return new RevisionRangeList(getRevisionRange(mergeSrc));
+    }
+
+    /**
      * Parse the <code>svn:mergeinfo</code> property to populate the
      * merge source URLs and revision ranges of this instance.
      * @param mergeinfo <code>svn:mergeinfo</code> property value.

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java Tue Oct 15 08:52:06 2013
@@ -36,25 +36,35 @@ public class RevisionRange implements Co
     // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
     // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
     // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
-    private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 2L;
 
     private Revision from;
     private Revision to;
+    private boolean inheritable;
 
     /**
      * Creates a new instance.  Called by native library.
      */
-    @SuppressWarnings("unused")
-    private RevisionRange(long from, long to)
+    protected RevisionRange(long from, long to, boolean inheritable)
     {
         this.from = Revision.getInstance(from);
         this.to = Revision.getInstance(to);
+        this.inheritable = inheritable;
+    }
+
+    /** @since 1.9 */
+    public RevisionRange(Revision from, Revision to, boolean inheritable)
+    {
+        this.from = from;
+        this.to = to;
+        this.inheritable = inheritable;
     }
 
     public RevisionRange(Revision from, Revision to)
     {
         this.from = from;
         this.to = to;
+        this.inheritable = true;
     }
 
     /**
@@ -70,6 +80,11 @@ public class RevisionRange implements Co
             return;
         }
 
+        this.inheritable = !revisionElement.endsWith("*");
+        if (!this.inheritable)
+            revisionElement =
+                revisionElement.substring(0, revisionElement.length() - 1);
+
         int hyphen = revisionElement.indexOf('-');
         if (hyphen > 0)
         {
@@ -113,14 +128,20 @@ public class RevisionRange implements Co
         return to;
     }
 
+    public boolean isInheritable()
+    {
+        return inheritable;
+    }
+
     public String toString()
     {
         if (from != null && to != null)
         {
-            if (from.equals(to))
-                return from.toString();
-            else
-                return from.toString() + '-' + to.toString();
+            String rep = (from.equals(to) ? from.toString()
+                          : from.toString() + '-' + to.toString());
+            if (!inheritable)
+                return rep + '*';
+            return rep;
         }
         return super.toString();
     }
@@ -138,7 +159,7 @@ public class RevisionRange implements Co
     public int hashCode()
     {
         final int prime = 31;
-        int result = 1;
+        int result = (inheritable ? 1 : 2);
         result = prime * result + ((from == null) ? 0 : from.hashCode());
         result = prime * result + ((to == null) ? 0 : to.hashCode());
         return result;
@@ -178,10 +199,12 @@ public class RevisionRange implements Co
             return false;
         }
 
-        return true;
+        return (inheritable == other.inheritable);
     }
 
     /**
+     * <b>Note:</b> Explicitly ignores inheritable state.
+     *
      * @param range The RevisionRange to compare this object to.
      */
     public int compareTo(RevisionRange range)

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java Tue Oct 15 08:52:06 2013
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.types;
 
+import org.apache.subversion.javahl.NativeResources;
+
 /**
  * Encapsulates version information about the underlying native
  * libraries.  Basically a wrapper for <a
@@ -31,6 +33,14 @@ package org.apache.subversion.javahl.typ
 public class Version
 {
     /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
+    /**
      * @return The full version string for the loaded JavaHL library,
      * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
      */

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java Tue Oct 15 08:52:06 2013
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.types;
 
+import org.apache.subversion.javahl.NativeResources;
+
 /**
  * Encapsulates information about the compile-time and run-time
  * properties of the Subversion libraries.
@@ -31,6 +33,14 @@ package org.apache.subversion.javahl.typ
 public class VersionExtended
 {
     /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
+    /**
      * @return The date when the libsvn_subr library was compiled, in
      * the format defined by the C standard macro #__DATE__.
      */
@@ -45,9 +55,9 @@ public class VersionExtended
     /**
      * @return The canonical host triplet (arch-vendor-osname) of the
      * system where libsvn_subr was compiled.
-     *
-     * @note On Unix-like systems (includng Mac OS X), this string is
-     * the same as the output of the config.guess script for the
+     * <p>
+     * <b>Note:</b> On Unix-like systems (includng Mac OS X), this string
+     * is the same as the output of the config.guess script for the
      * underlying Subversion libraries.
      */
     public native String getBuildHost();
@@ -60,8 +70,8 @@ public class VersionExtended
     /**
      * @return The canonical host triplet (arch-vendor-osname) of the
      * system where the current process is running.
-     *
-     * @note This string may not be the same as the output of
+     * <p>
+     * <b>Note:</b> This string may not be the same as the output of
      * config.guess on the same system.
      */
     public native String getRuntimeHost();
@@ -139,8 +149,8 @@ public class VersionExtended
     /**
      * @return Iterator for an immutable internal list of #LoadedLib
      * describing loaded shared libraries.  The the list may be empty.
-     *
-     * @note On Mac OS X, the loaded frameworks, private frameworks
+     * <p>
+     * <b>Note:</b> On Mac OS X, the loaded frameworks, private frameworks
      * and system libraries will not be listed.
      */
     public java.util.Iterator<LoadedLib> getLoadedLibs()
@@ -178,7 +188,8 @@ public class VersionExtended
 
         /**
          * Implementation of java.util.Iterator#remove().
-         * @note Not implemented, all sequences are immutable.
+         * <p>
+         * <b>Note:</b> Not implemented, all sequences are immutable.
          */
         public void remove()
         {
@@ -219,7 +230,8 @@ public class VersionExtended
 
         /**
          * Implementation of java.util.Iterator#remove().
-         * @note Not implemented, all sequences are immutable.
+         * <p>
+         * <b>Note:</b> Not implemented, all sequences are immutable.
          */
         public void remove()
         {

Modified: subversion/branches/cache-server/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java Tue Oct 15 08:52:06 2013
@@ -31,14 +31,6 @@ package org.tigris.subversion.javahl;
 public class Path
 {
     /**
-     * Load the required native library.
-     */
-    static
-    {
-        org.apache.subversion.javahl.NativeResources.loadNativeLibrary();
-    }
-
-    /**
      * A valid path is a UTF-8 string without any control characters.
      *
      * @return Whether Subversion can store the path in a repository.

Modified: subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Tue Oct 15 08:52:06 2013
@@ -33,6 +33,9 @@ import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
 import java.text.ParseException;
 import java.util.Collection;
 import java.util.Arrays;
@@ -251,16 +254,17 @@ public class BasicTests extends SVNTests
     public void testMergeinfoParser() throws Throwable
     {
         String mergeInfoPropertyValue =
-            "/trunk:1-300,305,307,400-405\n/branches/branch:308-400";
+            "/trunk:1-300,305*,307,400-405*\n" +
+            "/branches/branch:308-400";
         Mergeinfo info = new Mergeinfo(mergeInfoPropertyValue);
         Set<String> paths = info.getPaths();
         assertEquals(2, paths.size());
         List<RevisionRange> trunkRange = info.getRevisionRange("/trunk");
         assertEquals(4, trunkRange.size());
         assertEquals("1-300", trunkRange.get(0).toString());
-        assertEquals("305", trunkRange.get(1).toString());
+        assertEquals("305*", trunkRange.get(1).toString());
         assertEquals("307", trunkRange.get(2).toString());
-        assertEquals("400-405", trunkRange.get(3).toString());
+        assertEquals("400-405*", trunkRange.get(3).toString());
         List<RevisionRange> branchRange =
             info.getRevisionRange("/branches/branch");
         assertEquals(1, branchRange.size());
@@ -3299,6 +3303,16 @@ public class BasicTests extends SVNTests
         }
     }
 
+    private static class CountingProgressListener implements ProgressCallback
+    {
+        public void onProgress(ProgressEvent event)
+        {
+            // TODO: Examine the byte counts from "event".
+            gotProgress = true;
+        }
+        public boolean gotProgress = false;
+    }
+
     public void testDataTransferProgressReport() throws Throwable
     {
         // ### FIXME: This isn't working over ra_local, because
@@ -3308,25 +3322,13 @@ public class BasicTests extends SVNTests
 
         // build the test setup
         OneTest thisTest = new OneTest();
-        ProgressCallback listener = new ProgressCallback()
-        {
-            public void onProgress(ProgressEvent event)
-            {
-                // TODO: Examine the byte counts from "event".
-                throw new RuntimeException("Progress reported as expected");
-            }
-        };
+        CountingProgressListener listener = new CountingProgressListener();
         client.setProgressCallback(listener);
 
         // Perform an update to exercise the progress notification.
-        try
-        {
-            update(thisTest);
+        update(thisTest);
+        if (!listener.gotProgress)
             fail("No progress reported");
-        }
-        catch (RuntimeException progressReported)
-        {
-        }
     }
 
     /**
@@ -3745,6 +3747,139 @@ public class BasicTests extends SVNTests
     }
 
     /**
+     * Test RevisionRangeList.remove
+     */
+    public void testRevisionRangeListRemove() throws Throwable
+    {
+        RevisionRangeList ranges =
+            new RevisionRangeList(new ArrayList<RevisionRange>());
+        ranges.getRanges()
+            .add(new RevisionRange(Revision.getInstance(1),
+                                   Revision.getInstance(5),
+                                   true));
+        ranges.getRanges()
+            .add(new RevisionRange(Revision.getInstance(7),
+                                   Revision.getInstance(9),
+                                   false));
+        RevisionRangeList eraser =
+            new RevisionRangeList(new ArrayList<RevisionRange>());
+        eraser.getRanges()
+            .add(new RevisionRange(Revision.getInstance(7),
+                                   Revision.getInstance(9),
+                                   true));
+
+        List<RevisionRange> result = ranges.remove(eraser, true).getRanges();
+        assertEquals(2, ranges.getRanges().size());
+        assertEquals(1, eraser.getRanges().size());
+        assertEquals(2, result.size());
+
+        result = ranges.remove(eraser.getRanges(), false);
+        assertEquals(2, ranges.getRanges().size());
+        assertEquals(1, eraser.getRanges().size());
+        assertEquals(1, result.size());
+    }
+
+    private class Tunnel extends Thread implements TunnelAgent
+    {
+        public boolean checkTunnel(String name)
+        {
+            return name.equals("test");
+        }
+
+        public void openTunnel(ReadableByteChannel request,
+                               WritableByteChannel response,
+                               String name, String user,
+                               String hostname, int port)
+        {
+            this.request = request;
+            this.response = response;
+            start();
+        }
+
+        public void closeTunnel(String name, String user,
+                                String hostname, int port)
+            throws Throwable
+        {
+            request.close();
+            join();
+            response.close();
+        }
+
+        private ReadableByteChannel request;
+        private WritableByteChannel response;
+
+        public void run()
+        {
+
+            int index = 0;
+            byte[] raw_data = new byte[1024];
+            ByteBuffer data = ByteBuffer.wrap(raw_data);
+            while(index < commands.length && request.isOpen()) {
+                try {
+                    byte[] command = commands[index++];
+                    response.write(ByteBuffer.wrap(command));
+                } catch (IOException ex) {
+                    break;
+                }
+
+                try {
+                    data.clear();
+                    request.read(data);
+                } catch (Throwable ex) {}
+            }
+
+            try {
+                response.close();
+                request.close();
+            } catch (Throwable t) {}
+        }
+
+        private final byte[][] commands = new byte[][]{
+            // Initial capabilities negotiation
+            ("( success ( 2 2 ( ) " +
+             "( edit-pipeline svndiff1 absent-entries commit-revprops " +
+             "depth log-revprops atomic-revprops partial-replay " +
+             "inherited-props ephemeral-txnprops file-revs-reverse " +
+             ") ) ) ").getBytes(),
+
+            // Response for successful connection
+            ("( success ( ( ANONYMOUS EXTERNAL ) " +
+             "36:e3c8c113-03ba-4ec5-a8e6-8fc555e57b91 ) ) ").getBytes(),
+
+            // Response to authentication request
+            ("( success ( ) ) ( success ( " +
+             "36:e3c8c113-03ba-4ec5-a8e6-8fc555e57b91 " +
+             "24:svn+test://localhost/foo ( mergeinfo ) ) ) ").getBytes(),
+
+            // Response to revprop request
+            ("( success ( ( ) 0: ) ) ( success ( ( 4:fake ) ) ) ").getBytes()
+        };
+    }
+
+    /**
+     * Test tunnel handling.
+     */
+    public void testTunnelAgent() throws Throwable
+    {
+        byte[] revprop;
+        SVNClient cl = new SVNClient();
+        try {
+            cl.notification2(new MyNotifier());
+            cl.setPrompt(new DefaultPromptUserPassword());
+            cl.username(USERNAME);
+            cl.setProgressCallback(new DefaultProgressListener());
+            cl.setConfigDirectory(conf.getAbsolutePath());
+
+            cl.setTunnelAgent(new Tunnel());
+            revprop = cl.revProperty("svn+test://localhost/foo", "svn:log",
+                                     Revision.getInstance(0L));
+        } finally {
+            cl.dispose();
+        }
+        assertEquals("fake", new String(revprop));
+    }
+
+    /**
      * @return <code>file</code> converted into a -- possibly
      * <code>canonical</code>-ized -- Subversion-internal path
      * representation.
@@ -3970,8 +4105,8 @@ public class BasicTests extends SVNTests
     {
        final List<Info> infos = new ArrayList<Info>();
 
-        client.info2(pathOrUrl, revision, pegRevision, depth, changelists,
-                     new InfoCallback () {
+       client.info2(pathOrUrl, revision, pegRevision, depth, true, true,
+                     changelists, new InfoCallback () {
             public void singleInfo(Info info)
             { infos.add(info); }
         });

Modified: subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java Tue Oct 15 08:52:06 2013
@@ -91,8 +91,10 @@ public class RunTests
             if (testCases == null || testCases.length == 0)
             {
                 // Add default test suites.
-                suite.addTestSuite(SVNReposTests.class);
                 suite.addTestSuite(BasicTests.class);
+                suite.addTestSuite(UtilTests.class);
+                suite.addTestSuite(SVNRemoteTests.class);
+                suite.addTestSuite(SVNReposTests.class);
             }
             else
             {

Modified: subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/cache-server/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Tue Oct 15 08:52:06 2013
@@ -173,6 +173,17 @@ class SVNTests extends TestCase
 
     private void init()
     {
+        String disableCredStore = System.getProperty("test.disablecredstore");
+        if (disableCredStore != null)
+        {
+            try {
+                SVNUtil.disableNativeCredentialsStore();
+            } catch(Throwable ex) {
+                System.err.println("*** ERROR: Could not disable" +
+                                   " the native credentials store");
+            }
+        }
+
         // if not already set, get a usefull value for rootDir
         if (rootDirectoryName == null)
             rootDirectoryName = System.getProperty("test.rootdir");
@@ -324,12 +335,12 @@ class SVNTests extends TestCase
 
         public boolean prompt(String realm, String username)
         {
-            return false;
+            return true;
         }
 
         public boolean prompt(String realm, String username, boolean maySave)
         {
-            return false;
+            return true;
         }
 
         public String askQuestion(String realm, String question,
@@ -344,7 +355,7 @@ class SVNTests extends TestCase
         }
     }
 
-    private static class DefaultProgressListener implements ProgressCallback
+    protected static class DefaultProgressListener implements ProgressCallback
     {
 
         public void onProgress(ProgressEvent event)

Modified: subversion/branches/cache-server/subversion/bindings/swig/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/INSTALL?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/INSTALL Tue Oct 15 08:52:06 2013
@@ -232,35 +232,15 @@ BUILDING SWIG BINDINGS FOR SVN ON WINDOW
              compile in Release mode.  (This is due to pyconfig.h using the
             _DEBUG flag too and setting a #pragma comment(lib) value.)
 
-       For Perl support, you also need to add the paths into Visual Studio.
-
-       In Visual C++ 6, go to Tools -> Options -> Directories.
-
-       In Visual C++ .NET, go to Tools -> Options -> Projects
-       -> VC++ Directories.
-
-       Add the following paths:
-
-           Executable Directories:
-
-               For Perl, path to perl.exe
-               (for example, C:\Program Files\Perl\bin)
-
-           Library Directories:
-
-               For Perl, path to perl##.lib
-               (for example, C:\Program Files\Perl\lib\CORE)
-
-           Include Directories:
-
-               For Perl, path to perl.h
-               (for example, C:\Program Files\Perl\lib\CORE)
+       Our project generator detects Perl, Ruby and Python installs and will
+       generate the swig projects for these languages if both swig and the
+       language is found.
 
    3.  Create the Visual Studio project files via gen-make.py, adding in
        the --with-swig parameter to the installed location for SWIG.
        Example:
 
-        > gen-make.py -t vcproj --with-swig="C:\Program Files\SWIG-2.0.2"
+        > gen-make.py <other options> --with-swig="C:\Program Files\SWIG-2.0.2"
 
    4.  If you haven't already built Subversion, you should do so now.
        Instructions are in the main INSTALL file.
@@ -271,6 +251,7 @@ BUILDING SWIG BINDINGS FOR SVN ON WINDOW
 
            __SWIG_PYTHON__
            __SWIG_PERL__
+           __SWIG_RUBY__
 
    6. Install the bindings. The procedure varies depending on the language.
 

Modified: subversion/branches/cache-server/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/core.i?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/core.i (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/core.i Tue Oct 15 08:52:06 2013
@@ -514,7 +514,8 @@
     else if ($input == Py_None) {
         $1 = NULL;
     }
-    else if (svn_swig_ConvertPtr($input, (void **)&$1, $descriptor(svn_auth_ssl_server_cert_info_t *)) == 0) {
+    else if (svn_swig_py_convert_ptr($input, (void **)&$1,
+                                     $descriptor(svn_auth_ssl_server_cert_info_t *)) == 0) {
     }
     else {
         PyErr_SetString(PyExc_TypeError, "not a known type");
@@ -644,28 +645,20 @@ typedef int apr_status_t;
 #ifdef SWIGPERL
 apr_pool_t *current_pool;
 
-#if SWIG_VERSION <= 0x010324
-%{
-#define SVN_SWIGEXPORT(t) SWIGEXPORT(t)
-%}
-#else
-%{
-#define SVN_SWIGEXPORT(t) SWIGEXPORT t
-%}
-#endif
-
 %{
 
+/* ### Eventually this should go away. This is not thread safe and a very
+   ### good example on HOW NOT TO USE pools */
 static apr_pool_t *current_pool = 0;
 
-SVN_SWIGEXPORT(apr_pool_t *)
-svn_swig_pl_get_current_pool (void)
+static apr_pool_t *
+core_get_current_pool (void)
 {
   return current_pool;
 }
 
-SVN_SWIGEXPORT(void)
-svn_swig_pl_set_current_pool (apr_pool_t *pool)
+static void
+core_set_current_pool (apr_pool_t *pool)
 {
   current_pool = pool;
 }
@@ -869,10 +862,8 @@ static void svn_auth_set_gnome_keyring_u
 #include "svn_private_config.h"
 %}
 %init %{
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
-  svn_swig_pl_bind_current_pool_fns (&svn_swig_pl_get_current_pool,
-                                     &svn_swig_pl_set_current_pool);
-#endif
+  svn_swig_pl__bind_current_pool_fns(&core_get_current_pool,
+                                     &core_set_current_pool);
 %}
 #endif
 

Modified: subversion/branches/cache-server/subversion/bindings/swig/include/svn_containers.swg
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/include/svn_containers.swg?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/include/svn_containers.swg (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/include/svn_containers.swg Tue Oct 15 08:52:06 2013
@@ -266,6 +266,13 @@
 #endif
 
 #ifdef SWIGPERL
+%typemap(in) apr_hash_t *PROPHASH
+  (apr_pool_t *_global_pool = NULL)
+{
+  if (_global_pool == NULL)
+    _global_pool = svn_swig_pl_make_pool((SV *)NULL);
+  $1 = svn_swig_pl_hash_to_prophash($input, _global_pool);  
+}
 %typemap(out) apr_hash_t *PROPHASH
 {
   %append_output(svn_swig_pl_prophash_to_hash($1));
@@ -593,11 +600,11 @@
 #endif
 #ifdef SWIGPERL
 %typemap(in) const apr_array_header_t *STRINGLIST {
-    $1 = (apr_array_header_t *) svn_swig_pl_strings_to_array($input,
+    $1 = svn_swig_pl_strings_to_array($input,
                                                              _global_pool);
 }
 %typemap(in) const apr_array_header_t *STRINGLIST_MAY_BE_NULL {
-    $1 = SvOK($input) ? (apr_array_header_t *) svn_swig_pl_strings_to_array(
+    $1 = SvOK($input) ? svn_swig_pl_strings_to_array(
         $input, _global_pool) : NULL;
 }
 #endif
@@ -639,7 +646,7 @@
 */
 #ifdef SWIGPERL
 %typemap(in) apr_array_header_t *providers {
-    $1 = (apr_array_header_t *) svn_swig_pl_objs_to_array($input,
+    $1 = svn_swig_pl_objs_to_array($input,
       $descriptor(svn_auth_provider_object_t *), _global_pool);
 }
 #endif
@@ -777,6 +784,12 @@
 }
 #endif
 
+#ifdef SWIGPERL
+%typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
+  $1 = svn_swig_pl_array_to_apr_array_revision_range($input, _global_pool);
+}
+#endif
+
 #ifdef SWIGRUBY
 %typemap(in) apr_array_header_t *REVISION_RANGE_LIST {
   $1 = svn_swig_rb_array_to_apr_array_revision_range($input, _global_pool);

Modified: subversion/branches/cache-server/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/bindings/swig/include/svn_types.swg?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/cache-server/subversion/bindings/swig/include/svn_types.swg Tue Oct 15 08:52:06 2013
@@ -71,8 +71,8 @@
 
 #ifdef SWIGPYTHON
 %typemap(argout) SWIGTYPE **OUTPARAM {
-  %append_output(svn_swig_NewPointerObj(*$1, $*1_descriptor,
-                                        _global_py_pool, args));
+  %append_output(svn_swig_py_new_pointer_obj(*$1, $*1_descriptor,
+                                             _global_py_pool, args));
 }
 #else
 %typemap(argout) SWIGTYPE **OUTPARAM {
@@ -508,15 +508,15 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 
 %typemap(in) POINTER_TYPES
 {
-  $1 = ($1_ltype)svn_swig_MustGetPtr($input, $descriptor, $svn_argnum);
+  $1 = ($1_ltype)svn_swig_py_must_get_ptr($input, $descriptor, $svn_argnum);
   if (PyErr_Occurred()) {
     SWIG_fail;
   }
 }
 
 %typemap(out) POINTER_TYPES
-    "$result = svn_swig_NewPointerObj((void*)($1), $descriptor,
-                                      _global_py_pool, args);";
+    "$result = svn_swig_py_new_pointer_obj((void*)($1), $descriptor,
+                                           _global_py_pool, args);";
 
 %apply POINTER_TYPES { void *, SWIGTYPE *, SWIGTYPE [] };
 
@@ -635,8 +635,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
  */
 
 %typemap(argout) CALLABLE_CALLBACK * {
-  %append_output(svn_swig_NewPointerObj($1, $descriptor,
-                                        _global_py_pool, args));
+  %append_output(svn_swig_py_new_pointer_obj($1, $descriptor,
+                                             _global_py_pool, args));
 }
 
 /* Convert the pointer to a function pointer back into a regular
@@ -645,7 +645,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 
 %typemap(in) CALLABLE_CALLBACK {
   $&ltype tmp =
-    svn_swig_MustGetPtr($input, $&descriptor, $svn_argnum);
+    svn_swig_py_must_get_ptr($input, $&descriptor, $svn_argnum);
   if (tmp == NULL || PyErr_Occurred()) {
     SWIG_fail;
   }
@@ -675,8 +675,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
       SWIG_fail;
     }
     *tmp = ($ltype) $1;
-    $result = svn_swig_NewPointerObj(tmp, $&1_descriptor,
-                                     py_pool, args);
+    $result = svn_swig_py_new_pointer_obj(tmp, $&1_descriptor,
+                                          py_pool, args);
   }
 }
 
@@ -694,7 +694,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
   *tmp = ($ltype) $value;
 
   %set_constant("$symname",
-    svn_swig_NewPointerObj(tmp, $&descriptor, NULL, NULL)
+    svn_swig_py_new_pointer_obj(tmp, $&descriptor, NULL, NULL)
   );
 
 }
@@ -922,6 +922,12 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
   $2 = (void *)baton;
 }
 #endif
+#ifdef SWIGPERL
+%ignore svn_fs_set_warning_func;
+#endif
+#ifdef SWIGPYTHON
+%ignore svn_fs_set_warning_func;
+#endif
 
 /* -----------------------------------------------------------------------
    svn_stream_t interoperability with language native io handles
@@ -997,8 +1003,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
       /* We don't know the type of this reference, so we'll have to
        * treat it as an opaque void pointer.
        */
-      $result = svn_swig_NewPointerObj($1, $descriptor,
-        _global_py_pool, args);
+      $result = svn_swig_py_new_pointer_obj($1, $descriptor,
+                                            _global_py_pool, args);
     }
   }
 
@@ -1173,7 +1179,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 */
 #ifdef SWIGPERL
 %typemap(in) svn_opt_revision_t * (svn_opt_revision_t rev) {
-    $1 = svn_swig_pl_set_revision(&rev, $input);
+  $1 = svn_swig_pl_set_revision(&rev, $input, TRUE);
 }
 #endif