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/11/27 08:53:35 UTC

svn commit: r1545955 [3/15] - in /subversion/branches/fsfs-improvements: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/ contrib/server-side/svncutter/ notes/ subversion/bindings/javahl/native/ s...

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java Wed Nov 27 07:53:29 2013
@@ -31,8 +31,8 @@ import java.util.Map;
 
 /**
  * Editor interface (implements the EV2 abstraction).
- * @see <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/private/svn_editor.h"
- *      >svn_editor.h</a> for all restrictions on driving an editor.
+ * @see <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/private/svn_editor.h">svn_editor.h</a>
+ *      for all restrictions on driving an editor.
  * @since 1.9
  */
 public interface ISVNEditor
@@ -288,4 +288,86 @@ public interface ISVNEditor
      * @throws ClientException
      */
     void abort() throws ClientException;
+
+
+    /**
+     * Callback interface for providing the base contents of a file
+     * that is being modified.
+     * @see ISVNRemote.getCommitEditor(Map,CommitCallback,Set,boolean,ISVNEditor.ProvideBaseCallback,ISVNEditor.ProvidePropsCallback,ISVNEditor.GetNodeKindCallback)
+     */
+    public interface ProvideBaseCallback
+    {
+        public static class ReturnValue
+        {
+            /**
+             * @param contents The base ({@link Revision#BASE}) contents
+             *         of the file.
+             * @param revision The base revision number.
+             */
+            public ReturnValue(InputStream contents, long revision)
+            {
+                this.contents = contents;
+                this.revision = revision;
+            }
+
+            final InputStream contents;
+            final long revision;
+        }
+
+        /**
+         * Returns the base contents and revision number of the file.
+         * @param reposRelpath The repository path of the file,
+         *        relative to the session base URL.
+         */
+        ReturnValue getContents(String reposRelpath);
+    }
+
+    /**
+     * Callback interface for providing the base properties of a file
+     * or directory that is being modified.
+     * @see ISVNRemote.getCommitEditor(Map,CommitCallback,Set,boolean,ISVNEditor.ProvideBaseCallback,ISVNEditor.ProvidePropsCallback,ISVNEditor.GetNodeKindCallback)
+     */
+    public interface ProvidePropsCallback
+    {
+        public static class ReturnValue
+        {
+            /**
+             * @param properties The base ({@link Revision#BASE}) properties
+             *         of the file or directory.
+             * @param revision The base revision number.
+             */
+            public ReturnValue(Map<String, byte[]> properties, long revision)
+            {
+                this.properties = properties;
+                this.revision = revision;
+            }
+
+            final Map<String, byte[]> properties;
+            final long revision;
+        }
+
+        /**
+         * Returns the base properties and revision number of the file
+         * or directory.
+         * @param reposRelpath The repository path of the file or directory,
+         *        relative to the session base URL.
+         */
+        ReturnValue getProperties(String reposRelpath);
+    }
+
+    /**
+     * Callback interface for providing the kind of the node that was
+     * the source of a copy.
+     * @see ISVNRemote.getCommitEditor(Map,CommitCallback,Set,boolean,ISVNEditor.ProvideBaseCallback,ISVNEditor.ProvidePropsCallback,ISVNEditor.GetNodeKindCallback)
+     */
+    public interface GetNodeKindCallback
+    {
+        /**
+         * Returns the kind of the node that was the source of a copy.
+         * @param reposRelpath The repository path of the node,
+         *        relative to the session base URL.
+         * @param revision The copy-from revision.
+         */
+        NodeKind getKind(String reposRelpath, long revision);
+    }
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java Wed Nov 27 07:53:29 2013
@@ -34,7 +34,8 @@ import java.io.OutputStream;
 
 /**
  * Encapsulates an RA session object and related operations.
- * @see subversion/include/svn_ra.h#svn_ra_open
+ * @see <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_ra.h">svn_ra.h</a>,
+ *      the documentation of the <code>svn_ra_open</code> function.
  * @since 1.9
  */
 public interface ISVNRemote
@@ -53,9 +54,11 @@ public interface ISVNRemote
 
     /** Change the URL of the session to point to a new path in the
      * same repository.
+     *<p>
+     * <b>Note:</b> The operation fails if the URL has a different
+     * repository root than the current session URL.
+     *<p>
      * @throws ClientException
-     * @note The operation fails if the URL has a different repository
-     *       root than the current session URL.
      */
     void reparent(String url) throws ClientException;
 
@@ -115,20 +118,22 @@ public interface ISVNRemote
 
     /**
      * Change the value of an unversioned property.
+     *<p>
+     * <b>Note:</b> If the server has Capability.atomic_revprops and
+     * <code>oldValue</code> is not <code>null</code>, and the present
+     * value of the propery is not <code>oldValue</code> (e.g., if
+     * another client changed the property), then the operation will
+     * fail.
+     *<p>
+     * <b>Note:</b> If the server does not adveritse
+     * Capability.atomic_revprops, then <code>oldValue</code>
+     * <em>must</em> be <code>null</code>.
+     *<p>
      * @param revision The revision to which the propery is attached
      * @param propertyName The name of the propery
      * @param oldValue The previous value of the property (see note below)
      * @param newValue The new value of the property. If <code>newValue</code>
      *        is <code>null</code>, the property will be deleted.
-     *
-     * @node If the server has Capability.atomic_revprops and
-     *       <code>oldValue</code> is not <code>null</code>, and the
-     *       present value of the propery is not <code>oldValue</code>
-     *       (e.g., if another client changed the property), then
-     *       the operation will fail.
-     * @note If the server does not adveritse Capability.atomic_revprops,
-     *       then <code>oldValue</code> <em>must</em> be <code>null</code>.
-     *
      * @throws IllegalArgumentException if <code>oldValue</code> is not
      *         <code>null</code> and the server does not advertise the
      *         atomic_revprops capability.
@@ -190,14 +195,35 @@ public interface ISVNRemote
      * locks on committed objects.  Else, automatically release such
      * locks.
      * <p>
+     * The callbacks <code>getBase</code>, <code>getProps</code> and
+     * <code>getCopyfromKind</code> are invoked by the editor to fetch
+     * the contents, preoprties and copyfrom kind of an entry during
+     * the commit drive. They may be <code>null</code>; in that case,
+     * the commit may be less efficient because the client will not be
+     * able to delta-compress the data sent to the server, and more
+     * server connections may have to be opened.
+     * <p>
      * The caller may not perform any remote operations using this session
      * before finishing the edit.
      * @throws ClientException
      */
     ISVNEditor getCommitEditor(Map<String, byte[]> revisionProperties,
                                CommitCallback commitCallback,
-                               Set<Lock> lockTokens,
-                               boolean keepLocks)
+                               Set<Lock> lockTokens, boolean keepLocks,
+                               ISVNEditor.ProvideBaseCallback getBase,
+                               ISVNEditor.ProvidePropsCallback getProps,
+                               ISVNEditor.GetNodeKindCallback getCopyfromKind)
+            throws ClientException;
+
+    /**
+     * Like {@link #getCommitEditor(Map,CommitCallback<Set,boolean,
+     * ISVNEditor.ProvideBaseCallback,ISVNEditor.ProvidePropsCallback,
+     * ISVNEditor.GetNodeKindCallback)}, but with all callbacks set to
+     * <code>null</code>.
+     */
+    ISVNEditor getCommitEditor(Map<String, byte[]> revisionProperties,
+                               CommitCallback commitCallback,
+                               Set<Lock> lockTokens, boolean keepLocks)
             throws ClientException;
 
     /**
@@ -292,7 +318,7 @@ public interface ISVNRemote
      *
      * @param revision The revision to look for <code>paths</code>
      *                 in. Defaults to the youngest revision when
-     *                 {@link Revision.SVN_INVALID_REVNUM}.
+     *                 {@link Revision#SVN_INVALID_REVNUM}.
      * @param inherit Indicates whether explicit, explicit or
      *                inherited, or only inherited mergeinfo for
      *                <code>paths</code> is retrieved.

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java Wed Nov 27 07:53:29 2013
@@ -28,13 +28,9 @@ package org.apache.subversion.javahl;
  */
 public class JNIError extends Error
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java Wed Nov 27 07:53:29 2013
@@ -29,13 +29,9 @@ package org.apache.subversion.javahl;
  */
 class NativeException extends SubversionException
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**
@@ -58,9 +54,10 @@ class NativeException extends Subversion
      * @param aprError Any associated APR error code for a wrapped
      * <code>svn_error_t</code>.
      */
-    NativeException(String message, String source, int aprError)
+    NativeException(String message, String source, Throwable cause,
+                    int aprError)
     {
-        super(message);
+        super(message, cause);
         this.source = source;
         this.aprError = aprError;
     }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Wed Nov 27 07:53:29 2013
@@ -24,6 +24,7 @@
 package org.apache.subversion.javahl;
 
 import org.apache.subversion.javahl.types.Version;
+import org.apache.subversion.javahl.types.RuntimeVersion;
 
 /**
  * Handles activities related to management of native resouces
@@ -35,21 +36,32 @@ import org.apache.subversion.javahl.type
 public class NativeResources
 {
     /**
-     * @return Version information about the underlying native libraries.
+     * Version information about the underlying native libraries.
      */
     private static Version version;
 
     /**
-     * Returns version information about the underlying native libraries.
-     *
-     * @return version
-     *
+     * Runtime version information about the loaded libsvn_client.
+     */
+    private static RuntimeVersion runtimeVersion;
+
+    /**
+     * @return Version information about the underlying native libraries.
      */
-    public static Version getVersion() {
+    public static Version getVersion()
+    {
         return version;
     }
 
     /**
+     * @return Runtime version information about the loaded libsvn_client.
+     */
+    public static RuntimeVersion getRuntimeVersion()
+    {
+        return runtimeVersion;
+    }
+
+    /**
      * Load the required native library whose path is specified by the
      * system property <code>subversion.native.library</code> (which
      * can be passed to the JVM on start-up using an argument like
@@ -138,6 +150,16 @@ public class NativeResources
             throw new LinkageError("Native library version must be at least " +
                                    "1.9.0, but is only " + version);
         }
+
+        runtimeVersion = new RuntimeVersion();
+        if (runtimeVersion.getMajor() < version.getMajor()
+            || (runtimeVersion.getMajor() == version.getMajor()
+                && runtimeVersion.getMinor() < version.getMinor()))
+        {
+            throw new LinkageError(
+                "Compile-time Native library version is " + version +
+                " but the run-time version is " + runtimeVersion);
+        }
     }
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java Wed Nov 27 07:53:29 2013
@@ -31,13 +31,9 @@ import org.apache.subversion.javahl.call
  */
 public class ProgressEvent implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Wed Nov 27 07:53:29 2013
@@ -32,13 +32,9 @@ import org.apache.subversion.javahl.call
  */
 public class ReposNotifyInformation extends EventObject
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Wed Nov 27 07:53:29 2013
@@ -103,6 +103,11 @@ public class SVNClient implements ISVNCl
         return NativeResources.getVersion();
     }
 
+    public RuntimeVersion getRuntimeVersion()
+    {
+        return NativeResources.getRuntimeVersion();
+    }
+
     public native VersionExtended getVersionExtended(boolean verbose);
 
     public native String getAdminDirectoryName();
@@ -112,6 +117,7 @@ public class SVNClient implements ISVNCl
     /**
       * @deprecated
       */
+    @Deprecated
     public native String getLastPath();
 
     public native void status(String path, Depth depth, boolean onServer,
@@ -215,6 +221,7 @@ public class SVNClient implements ISVNCl
             throws ClientException;
 
     /** @deprecated */
+    @Deprecated
     public void move(Set<String> srcPaths, String destPath,
                      boolean force, boolean moveAsChild,
                      boolean makeParents,
@@ -323,6 +330,7 @@ public class SVNClient implements ISVNCl
 
 
     /** @deprecated */
+    @Deprecated
     public native void mergeReintegrate(String path, Revision pegRevision,
                                         String localPath, boolean dryRun)
             throws ClientException;
@@ -578,6 +586,12 @@ public class SVNClient implements ISVNCl
     public native String getConfigDirectory()
             throws ClientException;
 
+    public native void setConfigEventHandler(ConfigEvent configHandler)
+            throws ClientException;
+
+    public native ConfigEvent getConfigEventHandler()
+            throws ClientException;
+
     public native void cancelOperation()
             throws ClientException;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java Wed Nov 27 07:53:29 2013
@@ -24,15 +24,21 @@
 package org.apache.subversion.javahl;
 
 import org.apache.subversion.javahl.callback.*;
+import org.apache.subversion.javahl.types.*;
 import org.apache.subversion.javahl.util.*;
 
+import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 public class SVNUtil
 {
     //
     // Global configuration
     //
+    private static final ConfigLib configLib = new ConfigLib();
 
     /**
      * Enable storing authentication credentials in Subversion's
@@ -49,7 +55,7 @@ public class SVNUtil
     public static void enableNativeCredentialsStore()
         throws ClientException
       {
-          new ConfigLib().enableNativeCredentialsStore();
+          configLib.enableNativeCredentialsStore();
       }
 
     /**
@@ -73,7 +79,7 @@ public class SVNUtil
     public static void disableNativeCredentialsStore()
         throws ClientException
       {
-          new ConfigLib().disableNativeCredentialsStore();
+          configLib.disableNativeCredentialsStore();
       }
 
     /**
@@ -82,37 +88,13 @@ public class SVNUtil
     public static boolean isNativeCredentialsStoreEnabled()
         throws ClientException
       {
-          return new ConfigLib().isNativeCredentialsStoreEnabled();
-      }
-
-    /**
-     * Set an event handler that will be called every time the
-     * configuration is loaded.
-     * <p>
-     * This setting will be inherited by all ISVNClient and ISVNRemote
-     * objects. Changing the setting will not affect existing such
-     * objects.
-     * @throws ClientException
-     */
-    public static void setConfigEventHandler(ConfigEvent configHandler)
-        throws ClientException
-      {
-          new ConfigLib().setConfigEventHandler(configHandler);
-      }
-
-    /**
-     * Return a reference to the installed configuration event
-     * handler. The returned value may be <code>null</code>.
-     */
-    public static ConfigEvent getConfigEventHandler()
-        throws ClientException
-      {
-          return new ConfigLib().getConfigEventHandler();
+          return configLib.isNativeCredentialsStoreEnabled();
       }
 
     //
     // Diff and Merge
     //
+    private static final DiffLib diffLib = new DiffLib();
 
     /**
      * Options to control the behaviour of the file diff routines.
@@ -231,10 +213,10 @@ public class SVNUtil
                                    OutputStream resultStream)
         throws ClientException
     {
-        return new DiffLib().fileDiff(originalFile, modifiedFile, diffOptions,
-                                      originalHeader, modifiedHeader,
-                                      headerEncoding,
-                                      relativeToDir, resultStream);
+        return diffLib.fileDiff(originalFile, modifiedFile, diffOptions,
+                                originalHeader, modifiedHeader,
+                                headerEncoding,
+                                relativeToDir, resultStream);
     }
 
 
@@ -275,10 +257,398 @@ public class SVNUtil
                                     OutputStream resultStream)
         throws ClientException
     {
-        return new DiffLib().fileMerge(originalFile, modifiedFile, latestFile,
-                                       diffOptions,
-                                       conflictOriginal, conflictModified,
-                                       conflictLatest, conflictSeparator,
-                                       conflictStyle, resultStream);
+        return diffLib.fileMerge(originalFile, modifiedFile, latestFile,
+                                 diffOptions,
+                                 conflictOriginal, conflictModified,
+                                 conflictLatest, conflictSeparator,
+                                 conflictStyle, resultStream);
+    }
+
+    //
+    // Property validation and parsing
+    //
+    private static final PropLib propLib = new PropLib();
+
+    /**
+     * Validate the value of an <code>svn:</code> property on file or
+     * directory and return a canonical representation of its value.
+     * @param name The name of the property (must be a valid svn: property)
+     * @param value The property's value
+     * @param path The path or URL of the file or directory that
+     *        owns the property; only used for error messages
+     * @param kind The node kind of the file or dir that owns the property
+     * @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
+     *        tye file's mime-type, used for extra validation for the
+     *        <code>svn:eol-style</code> property. If it is <code>null</code>,
+     *        the extra validation will be skipped.
+     * @return a canonicalized representation of the property value
+     * @see http://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
+     */
+    public static byte[] canonicalizeNodeProperty(
+        String name, byte[] value, String path, NodeKind kind,
+        String mimeType)
+        throws ClientException
+    {
+        return propLib.canonicalizeNodeProperty(
+            name, value, path, kind, mimeType, null);
+    }
+
+    /**
+     * Validate the value of an <code>svn:</code> property on file or
+     * directory and return a canonical representation of its value.
+     * @param name The name of the property (must be a valid svn: property)
+     * @param value The property's value
+     * @param path The path or URL of the file or directory that
+     *        owns the property; only used for error messages
+     * @param kind The node kind of the file or dir that owns the property
+     * @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
+     *        tye file's mime-type, used for extra validation for the
+     *        <code>svn:eol-style</code> property. If it is <code>null</code>,
+     *        the extra validation will be skipped.
+     * @param fileContents A stream with the file's contents. Only used
+     *        to check for line-ending consistency when validating the
+     *        <code>svn:eol-style</code> property, and only when
+     *        <code>kind</code> is {@link NodeKind.file} and
+     *        <code>mimeType</code> is not <code>null</code>.
+     * @return a canonicalized representation of the property value
+     * @see http://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
+     */
+    public static byte[] canonicalizeNodeProperty(
+        String name, byte[] value, String path, NodeKind kind,
+        String mimeType, InputStream fileContents)
+        throws ClientException
+    {
+        return propLib.canonicalizeNodeProperty(
+            name, value, path, kind, mimeType, fileContents);
+    }
+
+    /**
+     * Parse <code>description</code>, assuming it is an externals
+     * specification in the format required for the
+     * <code>svn:externals</code> property, and return a list of
+     * parsed external items.
+     * @param description The externals description.
+     * @param parentDirectory Used to construct error messages.
+     * @param canonicalizeUrl Whe <code>true</code>, canonicalize the
+     *     <code>url</code> member of the returned objects. If the
+     *     <code>url</code> member refers to an absolute URL, it will
+     *     be canonicalized as URL consistent with the way URLs are
+     *     canonicalized throughout the Subversion API. If, however,
+     *     the <code>url</code> member makes use of the recognized
+     *     (SVN-specific) relative URL syntax for
+     *     <code>svn:externals</code>, "canonicalization" is an
+     *     ill-defined concept which may even result in munging the
+     *     relative URL syntax beyond recognition. You've been warned.
+     * @return a list of {@link ExternalItem}s
+     */
+    public static List<ExternalItem> parseExternals(byte[] description,
+                                                    String parentDirectory,
+                                                    boolean canonicalizeUrl)
+        throws ClientException
+    {
+        return propLib.parseExternals(description, parentDirectory,
+                                      canonicalizeUrl);
+    }
+
+    /**
+     * Unparse and list of external items into a format suitable for
+     * the value of the <code>svn:externals</code> property and
+     * validate the result.
+     * @param items The list of {@link ExternalItem}s
+     * @param parentDirectory Used to construct error messages.
+     * @param compatibleWithSvn1_5 When <code>true</code>, the format
+     *     of the returned property value will be compatible with
+     *     clients older than Subversion 1.5.
+     */
+    public static byte[] unparseExternals(List<ExternalItem> items,
+                                          String parentDirectory)
+        throws SubversionException
+    {
+        return propLib.unparseExternals(items, parentDirectory, false);
+    }
+
+    /**
+     * Unparse and list of external items into a format suitable for
+     * the value of the <code>svn:externals</code> property compatible
+     * with Subversion clients older than release 1.5, and validate
+     * the result.
+     * @param items The list of {@link ExternalItem}s
+     * @param parentDirectory Used to construct error messages.
+     */
+    public static byte[] unparseExternalsForAncientUnsupportedClients(
+        List<ExternalItem> items, String parentDirectory)
+        throws SubversionException
+    {
+        return propLib.unparseExternals(items, parentDirectory, true);
+    }
+
+    /**
+     * If the URL in <code>external</code> is relative, resolve it to
+     * an absolute URL, using <code>reposRootUrl</code> and
+     * <code>parentDirUrl</code> to provide contest.
+     *<p>
+     * Regardless if the URL is absolute or not, if there are no
+     * errors, the returned URL will be canonicalized.
+     *<p>
+     * The following relative URL formats are supported:
+     * <dl>
+     *  <dt><code>../</code></dt>
+     *  <dd>relative to the parent directory of the external</dd>
+     *  <dt><code>^/</code></dt>
+     *  <dd>relative to the repository root</dd>
+     *  <dt><code>//</code></dt>
+     *  <dd>relative to the scheme</dd>
+     *  <dt><code>/</code></dt>
+     *  <dd>relative to the server's hostname</dd>
+     * </dl>
+     *<p>
+     * The <code>../<code> and ^/ relative URLs may use <code>..</code>
+     * to remove path elements up to the server root.
+     *<p>
+     * The external URL should not be canonicalized before calling
+     * this function, as otherwise the scheme relative URL
+     * '<code>//host/some/path</code>' would have been canonicalized
+     * to '<code>/host/some/path</code>' and we would not be able to
+     * match on the leading '<code>//</code>'.
+    */
+    public static String resolveExternalsUrl(ExternalItem external,
+                                             String reposRootUrl,
+                                             String parentDirUrl)
+        throws ClientException
+    {
+        return propLib.resolveExternalsUrl(
+                   external, reposRootUrl, parentDirUrl);
+    }
+
+    //
+    // Newline translation and keyword expansion
+    //
+    private static final SubstLib substLib = new SubstLib();
+
+    /**
+     * Use the linefeed code point ('<code>\x0a</code>')
+     * for the newline separator.
+     * @see translateStream
+     * @see untranslateStream
+     */
+    public static final byte[] EOL_LF = SubstLib.EOL_LF;
+
+    /**
+     * Use the carraige-return code point ('<code>\x0d</code>')
+     * for the newline separator.
+     * @see translateStream
+     * @see untranslateStream
+     */
+    public static final byte[] EOL_CR = SubstLib.EOL_CR;
+
+    /**
+     * Use carriage-return/linefeed sequence ('<code>\x0d\x0a</code>')
+     * for the newline separator.
+     * @see translateStream
+     * @see untranslateStream
+     */
+    public static final byte[] EOL_CRLF = SubstLib.EOL_CRLF;
+
+
+    /**
+     * Build a dictionary of expanded keyword values, given the
+     * contents of a file's <code>svn:keywords</code> property, its
+     * revision, URL, the date it was committed on, the author of the
+     * commit and teh URL of the repository root.
+     *<p>
+     * Custom keywords defined in <code>svn:keywords</code> properties
+     * are expanded using the provided parameters and in accordance
+     * with the following format substitutions in the
+     * <code>keywordsValue</code>:
+     * <dl>
+     *   <dt><code>%a</dt></code>
+     * <dd>The author.</dd>
+     *   <dt><code>%b</dt></code>
+     * <dd>The basename of the URL.</dd>
+     *   <dt><code>%d</dt></code>
+     * <dd>Short format of the date.</dd>
+     *   <dt><code>%D</dt></code>
+     * <dd>Long format of the date.</dd>
+     *   <dt><code>%P</dt></code>
+     * <dd>The file's path, relative to the repository root URL.</dd>
+     *   <dt><code>%r</dt></code>
+     * <dd>The revision.</dd>
+     *   <dt><code>%R</dt></code>
+     * <dd>The URL to the root of the repository.</dd>
+     *   <dt><code>%u</dt></code>
+     * <dd>The URL of the file.</dd>
+     *   <dt><code>%_</dt></code>
+     * <dd>A space (keyword definitions cannot contain a literal space).</dd>
+     *   <dt><code>%%</dt></code>
+     * <dd>A literal '%'.</dd>
+     *   <dt><code>%H</dt></code>
+     * <dd>Equivalent to <code>%P%_%r%_%d%_%a</code>.</dd>
+     *   <dt><code>%I</dt></code>
+     * <dd>Equivalent to <code>%b%_%r%_%d%_%a</code>.</dd>
+     * </dl>
+     *<p>
+     * Custom keywords are defined by appending '=' to the keyword
+     * name, followed by a string containing any combination of the
+     * format substitutions.
+     *<p>
+     * Any of the <code>revision</code>, <code>url</code>,
+     * <code>reposRootUrl</code>, <code>date</code> and
+     * <code>author</code> parameters may be <code>null</code>, or
+     * {@link Revision#SVN_INVALID_REVNUM} for <code>revision</code>,
+     * to indicate that the information is not present. Each piece of
+     * information that is not present expands to the empty string
+     * wherever it appears in an expanded keyword value.  (This can
+     * result in multiple adjacent spaces in the expansion of a
+     * multi-valued keyword such as "<code>Id</code>".)
+     */
+    public static Map<String, byte[]> buildKeywords(byte[] keywordsValue,
+                                                    long revision,
+                                                    String url,
+                                                    String reposRootUrl,
+                                                    Date date,
+                                                    String author)
+        throws SubversionException, ClientException
+    {
+        return substLib.buildKeywords(keywordsValue, revision,
+                                      url, reposRootUrl, date, author);
+    }
+
+    /**
+     * Return a stream which performs end-of-line translation and
+     * keyword expansion when read from.
+     *<p>
+     * <b>Important:</b> Make sure you close the reurned stream to
+     * ensure all data are flushed and cleaned up (this will also
+     * close the provided stream and dispose the related netive
+     * object).
+     *<p>
+     * If <code>eolMarker</code> is not <code>null</code>, replace
+     * whatever any end-of-line sequences in the input with
+     * <code>eolMarker</code>.  If the input has an inconsistent line
+     * ending style, then:
+     * <ul>
+     *   <li>if <code>repairEol</code> is <code>false</code>, then a
+     *       subsequent read or other operation on the stream will
+     *       generate an error when the inconsistency is detected;</li>
+     *   <li>if <code>repaorEol</code> is <code>true</code>, convert any
+     *       line ending to <code>eolMarker</code>.<br/>
+     *       Recognized line endings are: "<code>\n</code>",
+     *       "<code>\r</code>", and "<code>\r\n</code>".</li>
+     * </ul>
+     *<p>
+     * Expand or contract keywords using the contents of
+     * <code>keywords</code> as the new values.  If
+     * <code>expandKeywords</code> is <code>true</code>, expand
+     * contracted keywords and re-expand expanded keywords; otherwise,
+     * contract expanded keywords and ignore contracted ones.
+     * Keywords not found in the dictionary are ignored (not
+     * contracted or expanded).  If the <code>keywords</code> itself
+     * is <code>null</code>, keyword substitution will be altogether
+     * ignored.
+     *<p>
+     * Detect only keywords that are no longer than
+     * <code>SVN_KEYWORD_MAX_LEN</code> bytes (currently: 255),
+     * including the delimiters and the keyword itself.
+     *<p>
+     * Recommendation: if <code>expandKeywords</code> is
+     * <code>false</code>, then you don't care about the keyword
+     * values, so just put <code>null</code> values into the
+     * <code>keywords</code> dictionary.
+     *<p>
+     * If the inner stream implements marking and seeking via
+     * {@link InputStream#mark} and {@link InputStream#reset}, the
+     * translated stream will too.
+     *
+     * @param source the source (untranslated) stream.
+     * @param eolMarker the byte sequence to use as the end-of-line marker;
+     *     must be one of {@link #EOL_LF}, {@link #EOL_CR}
+     *     or {@link #EOL_CRLF}.
+     * @param repairEol flag to repair end-of-lines; see above
+     * @param keywords the keyword dictionary; see {@link buildKeywords}
+     * @param expandKeywords flag to expand keywords
+     */
+    public static InputStream translateStream(InputStream source,
+                                              byte[] eolMarker,
+                                              boolean repairEol,
+                                              Map<String, byte[]> keywords,
+                                              boolean expandKeywords)
+        throws SubversionException, ClientException
+    {
+        return substLib.translateInputStream(
+                    source, eolMarker, repairEol,
+                    keywords, true, expandKeywords,
+                    null, Revision.SVN_INVALID_REVNUM,
+                    null, null, null, null);
+    }
+
+    /**
+     * Expand keywords and return a stream which performs end-of-line
+     * translation and keyword expansion when read from.
+     * @see buildKeywords
+     * @see translateStream(InputStream,byte[],boolean,Map,boolean)
+     */
+    public static InputStream translateStream(InputStream source,
+                                              byte[] eolMarker,
+                                              boolean repairEol,
+                                              boolean expandKeywords,
+                                              byte[] keywordsValue,
+                                              long revision,
+                                              String url,
+                                              String reposRootUrl,
+                                              Date date,
+                                              String author)
+        throws SubversionException, ClientException
+    {
+        return substLib.translateInputStream(
+                    source, eolMarker, repairEol,
+                    null, false, expandKeywords,
+                    keywordsValue, revision,
+                    url, reposRootUrl, date, author);
+    }
+
+    /**
+     * Return a stream which performs end-of-line translation and
+     * keyword expansion when written to. Behaves like
+     * {@link #translateStream(InputStream,byte[],boolean,Map,boolean)},
+     * except that it translates an <code>OutputStream</code> and never
+     * supports marking and seeking.
+     */
+    public static OutputStream translateStream(OutputStream destination,
+                                               byte[] eolMarker,
+                                               boolean repairEol,
+                                               Map<String, byte[]> keywords,
+                                               boolean expandKeywords)
+        throws SubversionException, ClientException
+    {
+        return substLib.translateOutputStream(
+                    destination, eolMarker, repairEol,
+                    keywords, true, expandKeywords,
+                    null, Revision.SVN_INVALID_REVNUM,
+                    null, null, null, null);
+    }
+
+    /**
+     * Expand keywords and return a stream which performs end-of-line
+     * translation and keyword expansion when written to.
+     * @see buildKeywords
+     * @see translateStream(OutputStream,byte[],boolean,Map,boolean)
+     */
+    public static OutputStream translateStream(OutputStream destination,
+                                               byte[] eolMarker,
+                                               boolean repairEol,
+                                               boolean expandKeywords,
+                                               byte[] keywordsValue,
+                                               long revision,
+                                               String url,
+                                               String reposRootUrl,
+                                               Date date,
+                                               String author)
+        throws SubversionException, ClientException
+    {
+        return substLib.translateOutputStream(
+                    destination, eolMarker, repairEol,
+                    null, false, expandKeywords,
+                    keywordsValue, revision,
+                    url, reposRootUrl, date, author);
     }
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java Wed Nov 27 07:53:29 2013
@@ -47,4 +47,16 @@ public class SubversionException extends
     {
         super(message);
     }
+
+    /**
+     * This constructor is only used by sub-classes and the native
+     * implementation.
+     *
+     * @param message A description of the problem.
+     * @param cause The root cause of the exception.
+     */
+    protected SubversionException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java Wed Nov 27 07:53:29 2013
@@ -131,12 +131,15 @@ public class CommitEditor extends JNIObj
         CommitEditor createInstance(RemoteSession session,
                                     Map<String, byte[]> revisionProperties,
                                     CommitCallback commitCallback,
-                                    Set<Lock> lockTokens,
-                                    boolean keepLocks)
+                                    Set<Lock> lockTokens, boolean keepLocks,
+                                    ISVNEditor.ProvideBaseCallback baseCB,
+                                    ISVNEditor.ProvidePropsCallback propsCB,
+                                    ISVNEditor.GetNodeKindCallback kindCB)
             throws ClientException
     {
-        long cppAddr = nativeCreateInstance(session, revisionProperties,
-                                            commitCallback, lockTokens, keepLocks);
+        long cppAddr = nativeCreateInstance(
+            session, revisionProperties, commitCallback,
+            lockTokens, keepLocks, baseCB, propsCB, kindCB);
         return new CommitEditor(cppAddr, session);
     }
 
@@ -163,7 +166,9 @@ public class CommitEditor extends JNIObj
         long nativeCreateInstance(RemoteSession session,
                                   Map<String, byte[]> revisionProperties,
                                   CommitCallback commitCallback,
-                                  Set<Lock> lockTokens,
-                                  boolean keepLocks)
+                                  Set<Lock> lockTokens, boolean keepLocks,
+                                  ISVNEditor.ProvideBaseCallback baseCB,
+                                  ISVNEditor.ProvidePropsCallback propsCB,
+                                  ISVNEditor.GetNodeKindCallback kindCB)
             throws ClientException;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java Wed Nov 27 07:53:29 2013
@@ -60,6 +60,7 @@ public class RemoteFactory
                          String username, String password,
                          UserPasswordCallback prompt,
                          ProgressCallback progress,
+                         ConfigEvent configHandler,
                          TunnelAgent tunnelAgent)
     {
         setConfigDirectory(configDirectory);
@@ -67,6 +68,7 @@ public class RemoteFactory
         setPassword(password);
         setPrompt(prompt);
         setProgressCallback(progress);
+        setConfigEventHandler(configHandler);
         setTunnelAgent(tunnelAgent);
     }
 
@@ -127,6 +129,16 @@ public class RemoteFactory
     }
 
     /**
+     * Set an event handler that will be called every time the
+     * configuration is loaded by the ISVNRemote objects created by
+     * this factory.
+     */
+    public void setConfigEventHandler(ConfigEvent configHandler)
+    {
+        this.configHandler = configHandler;
+    }
+
+    /**
      * Set callbacks for ra_svn tunnel handling.
      */
     public void setTunnelAgent(TunnelAgent tunnelAgent)
@@ -151,7 +163,8 @@ public class RemoteFactory
             throws ClientException, SubversionException
     {
         return open(1, url, null, configDirectory,
-                    username, password, prompt, progress, tunnelAgent);
+                    username, password, prompt, progress,
+                    configHandler, tunnelAgent);
     }
 
     /**
@@ -178,7 +191,8 @@ public class RemoteFactory
             throw new IllegalArgumentException(
                 "retryAttempts must be positive");
         return open(retryAttempts, url, null, configDirectory,
-                    username, password, prompt, progress, tunnelAgent);
+                    username, password, prompt, progress,
+                    configHandler, tunnelAgent);
     }
 
     /**
@@ -205,7 +219,8 @@ public class RemoteFactory
         if (reposUUID == null)
             throw new IllegalArgumentException("reposUUID may not be null");
         return open(1, url, reposUUID, configDirectory,
-                    username, password, prompt, progress, tunnelAgent);
+                    username, password, prompt, progress,
+                    configHandler, tunnelAgent);
     }
 
     /**
@@ -239,7 +254,8 @@ public class RemoteFactory
             throw new IllegalArgumentException(
                 "retryAttempts must be positive");
         return open(retryAttempts, url, reposUUID, configDirectory,
-                    username, password, prompt, progress, tunnelAgent);
+                    username, password, prompt, progress,
+                    configHandler, tunnelAgent);
     }
 
     private String configDirectory;
@@ -247,6 +263,7 @@ public class RemoteFactory
     private String password;
     private UserPasswordCallback prompt;
     private ProgressCallback progress;
+    private ConfigEvent configHandler;
     private TunnelAgent tunnelAgent;
 
     /* Native factory implementation. */
@@ -256,6 +273,7 @@ public class RemoteFactory
                                           String username, String password,
                                           UserPasswordCallback prompt,
                                           ProgressCallback progress,
+                                          ConfigEvent configHandler,
                                           TunnelAgent tunnelAgent)
             throws ClientException, SubversionException;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java Wed Nov 27 07:53:29 2013
@@ -132,20 +132,32 @@ public class RemoteSession extends JNIOb
 
     public ISVNEditor getCommitEditor(Map<String, byte[]> revisionProperties,
                                       CommitCallback commitCallback,
-                                      Set<Lock> lockTokens,
-                                      boolean keepLocks)
+                                      Set<Lock> lockTokens, boolean keepLocks,
+                                      ISVNEditor.ProvideBaseCallback getBase,
+                                      ISVNEditor.ProvidePropsCallback getProps,
+                                      ISVNEditor.GetNodeKindCallback getCopyfromKind)
             throws ClientException
     {
         check_inactive(editorReference, reporterReference);
         ISVNEditor ed =
             CommitEditor.createInstance(this, revisionProperties,
-                                        commitCallback, lockTokens, keepLocks);
+                                        commitCallback, lockTokens, keepLocks,
+                                        getBase, getProps, getCopyfromKind);
         if (editorReference != null)
             editorReference.clear();
         editorReference = new WeakReference<ISVNEditor>(ed);
         return ed;
     }
 
+    public ISVNEditor getCommitEditor(Map<String, byte[]> revisionProperties,
+                                      CommitCallback commitCallback,
+                                      Set<Lock> lockTokens, boolean keepLocks)
+            throws ClientException
+    {
+        return getCommitEditor(revisionProperties, commitCallback,
+                               lockTokens, keepLocks, null, null, null);
+    }
+
     public long getFile(long revision, String path,
                         OutputStream contents,
                         Map<String, byte[]> properties)

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ChangePath.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ChangePath.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ChangePath.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ChangePath.java Wed Nov 27 07:53:29 2013
@@ -25,13 +25,9 @@ package org.apache.subversion.javahl.typ
 
 public class ChangePath implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 2L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Checksum.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Checksum.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Checksum.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Checksum.java Wed Nov 27 07:53:29 2013
@@ -25,13 +25,9 @@ package org.apache.subversion.javahl.typ
 
 public class Checksum implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/CopySource.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/CopySource.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/CopySource.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/CopySource.java Wed Nov 27 07:53:29 2013
@@ -29,13 +29,9 @@ package org.apache.subversion.javahl.typ
  */
 public class CopySource implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DirEntry.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DirEntry.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DirEntry.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DirEntry.java Wed Nov 27 07:53:29 2013
@@ -32,13 +32,9 @@ import org.apache.subversion.javahl.ISVN
  */
 public class DirEntry implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Info.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Info.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Info.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Info.java Wed Nov 27 07:53:29 2013
@@ -35,13 +35,9 @@ import org.apache.subversion.javahl.ISVN
  */
 public class Info implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Lock.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Lock.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Lock.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Lock.java Wed Nov 27 07:53:29 2013
@@ -31,13 +31,9 @@ import java.util.Date;
  */
 public class Lock implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Mergeinfo.java Wed Nov 27 07:53:29 2013
@@ -37,13 +37,9 @@ import org.apache.subversion.javahl.Subv
  */
 public class Mergeinfo implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java Wed Nov 27 07:53:29 2013
@@ -32,13 +32,9 @@ import java.util.Locale;
  */
 public class Revision implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**
@@ -277,6 +273,16 @@ public class Revision implements java.io
                 throw new IllegalArgumentException("a date must be specified");
             revDate = date;
         }
+
+        /**
+         * Create a revision from a timestamp in milliseconds.
+         * Used by the native implementaiton.
+         */
+        private DateSpec(long milliseconds)
+        {
+            this(new Date(milliseconds));
+        }
+
         /**
          * Returns the date of the revision
          * @return the date
@@ -316,7 +322,6 @@ public class Revision implements java.io
         {
             return revDate.hashCode();
         }
-
     }
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRange.java Wed Nov 27 07:53:29 2013
@@ -29,13 +29,9 @@ package org.apache.subversion.javahl.typ
  */
 public class RevisionRange implements Comparable<RevisionRange>, java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 2L;
 
     private Revision from;

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java Wed Nov 27 07:53:29 2013
@@ -35,13 +35,9 @@ import org.apache.subversion.javahl.Conf
  */
 public class Status implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // 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
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 2L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java Wed Nov 27 07:53:29 2013
@@ -54,12 +54,4 @@ public class ConfigLib
     /** @see SVNUtil.isNativeCredentialsStoreEnabled */
     public native boolean isNativeCredentialsStoreEnabled()
         throws ClientException;
-
-    /** @see SVNUtil.setConfigEventHandler */
-    public native void setConfigEventHandler(ConfigEvent configHandler)
-        throws ClientException;
-
-    /** @see SVNUtil.setConfigEventHandler */
-    public native ConfigEvent getConfigEventHandler()
-        throws ClientException;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/DiffLib.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/DiffLib.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/DiffLib.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/DiffLib.java Wed Nov 27 07:53:29 2013
@@ -43,7 +43,7 @@ public class DiffLib
         NativeResources.loadNativeLibrary();
     }
 
-    /** @see ISVNUtil.fileDiff */
+    /** @see SVNUtil.fileDiff */
     public boolean fileDiff(String originalFile,
                             String modifiedFile,
                             SVNUtil.DiffOptions diffOptions,
@@ -88,7 +88,7 @@ public class DiffLib
                                OutputStream resultStream)
         throws ClientException;
 
-    /** @see ISVNUtil.fileMerge */
+    /** @see SVNUtil.fileMerge */
     public boolean fileMerge(String originalFile,
                              String modifiedFile,
                              String latestFile,

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Nov 27 07:53:29 2013
@@ -219,6 +219,33 @@ public class BasicTests extends SVNTests
     }
 
     /**
+     * Test RuntimeVersion
+     */
+    public void testRuntimeVersion() throws Throwable
+    {
+        try
+        {
+            RuntimeVersion runtimeVersion = client.getRuntimeVersion();
+            String versionString = runtimeVersion.toString();
+            if (versionString == null || versionString.trim().length() == 0)
+            {
+                throw new Exception("Version string empty");
+            }
+        }
+        catch (Exception e)
+        {
+            fail("RuntimeVersion should always be available unless the " +
+                 "native libraries failed to initialize: " + e);
+        }
+
+        RuntimeVersion runtimeVersion = client.getRuntimeVersion();
+        Version version = client.getVersion();
+        assertTrue(runtimeVersion.getMajor() > version.getMajor()
+                   || (runtimeVersion.getMajor() == version.getMajor()
+                       && runtimeVersion.getMinor() >= version.getMinor()));
+    }
+
+    /**
      * Test the JNIError class functionality
      * @throws Throwable
      */
@@ -2350,7 +2377,7 @@ public class BasicTests extends SVNTests
         List<RevisionRange> ranges = mergeInfo.getRevisions(mergeSrc);
         assertTrue("Missing merge info for source '" + mergeSrc + "' on '" +
                    targetPath + '\'', ranges != null && !ranges.isEmpty());
-        RevisionRange range = (RevisionRange) ranges.get(0);
+        RevisionRange range = ranges.get(0);
         String expectedMergedRevs = expectedMergeStart + "-" + expectedMergeEnd;
         assertEquals("Unexpected first merged revision range for '" +
                      mergeSrc + "' on '" + targetPath + '\'',
@@ -2613,6 +2640,7 @@ public class BasicTests extends SVNTests
      * @throws Throwable
      * @since 1.5
      */
+    @SuppressWarnings("deprecation")
     public void testMergeReintegrate() throws Throwable
     {
         OneTest thisTest = setupAndPerformMerge();
@@ -3269,7 +3297,7 @@ public class BasicTests extends SVNTests
 
         // Rigorously inspect one of our DiffSummary notifications.
         final String BETA_PATH = "A/B/E/beta";
-        DiffSummary betaDiff = (DiffSummary) summaries.get(BETA_PATH);
+        DiffSummary betaDiff = summaries.get(BETA_PATH);
         assertNotNull("No diff summary for " + BETA_PATH, betaDiff);
         assertEquals("Incorrect path for " + BETA_PATH, BETA_PATH,
                      betaDiff.getPath());
@@ -3963,8 +3991,11 @@ public class BasicTests extends SVNTests
         extends HashMap<String, Collection<String>>
         implements ChangelistCallback
     {
+        private static final long serialVersionUID = 1L;
+
         public void doChangelist(String path, String changelist)
         {
+            path = fileToSVNPath(new File(path), true);
             if (super.containsKey(path))
             {
                 // Append the changelist to the existing list