Author: brane
Date: Sun May 10 07:43:30 2026
New Revision: 1934026

Log:
On the javahl-1.15 branch: Upgrade the native implementation to use
svn_client_revert4. Do not deprecate previou ISVNClient.checkout and
ISVNClient.upgrade methods, they provide reasonable defaults.

* BRANCH-README: Update TODO and DONE lists.

[in subversion/bindings/javahl/native/]

* SVNClient.h (SVNClient::revert),
  SVNClient.cpp (SVNClient::revert): Update prototype and implementaiton.
* org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_revert): Update native method.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl/]

* ISVNClient.java
  (ISVNClient.revert): Add new overload.
  (ISVNClient.checkout, ISVNClient.upgrade): Do not deprecate previous versions.
* SVNClient.java
  (ISVNClient.revert): Add new native method and compatibility wrapper.
  (SVNClient.checkout, SVNClient.upgrade): Do not deprecate previous versions.

Modified:
   subversion/branches/javahl-1.15/BRANCH-README
   
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp
   subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.h
   
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
   
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
   
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

Modified: subversion/branches/javahl-1.15/BRANCH-README
==============================================================================
--- subversion/branches/javahl-1.15/BRANCH-README       Sun May 10 07:38:44 
2026        (r1934025)
+++ subversion/branches/javahl-1.15/BRANCH-README       Sun May 10 07:43:30 
2026        (r1934026)
@@ -7,7 +7,6 @@ TODO:
   * Update use of deprecated Subversion APIs:
     - svn_client_diff6 -> svn_client_diff7
     - svn_client_diff_peg6 -> svn_client_diff_peg7
-    - svn_client_revert3 -> svn_client_revert4
   * Add Java wrappers for some new functionality
   * Update use of deprecated JavaHL APIs
   * Fix Java warnings where possible without breaking the JRE ABI
@@ -16,6 +15,7 @@ DONE:
   * Update use of deprecated Subversion APIs:
     - svn_client_checkout3 -> svn_client_checkout4
     - svn_client_upgrade -> svn_client_upgrade2
+    - svn_client_revert3 -> svn_client_revert4
   * Add Java wrappers for some new functionality
     - .types.VersionNumber extends Version (package scope)
     - .types.Version::getInstance(int major, int minor, int patch)

Modified: 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp
==============================================================================
--- 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp 
    Sun May 10 07:38:44 2026        (r1934025)
+++ 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.cpp 
    Sun May 10 07:43:30 2026        (r1934026)
@@ -359,7 +359,8 @@ void SVNClient::remove(Targets &targets,
 void SVNClient::revert(StringArray &paths, svn_depth_t depth,
                        StringArray &changelists,
                        bool clear_changelists,
-                       bool metadata_only)
+                       bool metadata_only,
+                       bool added_keep_local)
 {
     SVN::Pool subPool(pool);
 
@@ -369,10 +370,11 @@ void SVNClient::revert(StringArray &path
 
     Targets targets(paths, subPool);
     SVN_JNI_ERR(targets.error_occurred(), );
-    SVN_JNI_ERR(svn_client_revert3(targets.array(subPool), depth,
+    SVN_JNI_ERR(svn_client_revert4(targets.array(subPool), depth,
                                    changelists.array(subPool),
                                    clear_changelists,
                                    metadata_only,
+                                   added_keep_local,
                                    ctx, subPool.getPool()), );
 }
 

Modified: 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.h
==============================================================================
--- 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.h   
    Sun May 10 07:38:44 2026        (r1934025)
+++ 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/SVNClient.h   
    Sun May 10 07:43:30 2026        (r1934026)
@@ -163,7 +163,7 @@ class SVNClient :public SVNBase
   void add(const char *path, svn_depth_t depth, bool force,
            bool no_ignore, bool no_autoprops, bool add_parents);
   void revert(StringArray &paths, svn_depth_t depth, StringArray &changelists,
-              bool clear_changelists, bool metadata_only);
+              bool clear_changelists, bool metadata_only, bool 
added_keep_local);
   void remove(Targets &targets, CommitMessage *message, bool force,
               bool keep_local, PropertyTable &revprops,
               CommitCallback *callback);

Modified: 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
==============================================================================
--- 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
        Sun May 10 07:38:44 2026        (r1934025)
+++ 
subversion/branches/javahl-1.15/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
        Sun May 10 07:43:30 2026        (r1934026)
@@ -463,7 +463,8 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_revert
 (JNIEnv *env, jobject jthis, jobject jpaths, jobject jdepth,
- jobject jchangelists, jboolean jclear_changelists, jboolean jmetadata_only)
+ jobject jchangelists, jboolean jclear_changelists,
+ jboolean jmetadata_only, jboolean jadded_keep_local)
 {
   JNIEntry(SVNClient, revert);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -483,7 +484,8 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->revert(paths, EnumMapper::toDepth(jdepth),
-             changelists, bool(jclear_changelists), bool(jmetadata_only));
+             changelists, bool(jclear_changelists),
+             bool(jmetadata_only), bool(jadded_keep_local));
 }
 
 JNIEXPORT void JNICALL

Modified: 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
==============================================================================
--- 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
 Sun May 10 07:38:44 2026        (r1934025)
+++ 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
 Sun May 10 07:43:30 2026        (r1934026)
@@ -237,19 +237,6 @@ public interface ISVNClient
 
     /**
      * Executes a revision checkout.
-     * <p>
-     * Behaves like the 1.15 version with <code>wcFormatVersion = null</code>
-     * and <code>storePristines = Tristate.Unknown</code>
-     * @deprecated
-     */
-    @Deprecated
-    long checkout(String moduleName, String destPath, Revision revision,
-                  Revision pegRevision, Depth depth,
-                  boolean ignoreExternals,
-                  boolean allowUnverObstructions) throws ClientException;
-
-    /**
-     * Executes a revision checkout.
      * @param moduleName name of the module to checkout.
      * @param destPath destination directory for checkout.
      * @param revision the revision to checkout.
@@ -260,6 +247,7 @@ public interface ISVNClient
      * @param wcFormatVersion desired WC compatibiliy version or NULL default
      * @param storePristines whether to store pristine files
      * @throws ClientException
+     * @since 1.15
      */
     long checkout(String moduleName, String destPath, Revision revision,
                   Revision pegRevision, Depth depth,
@@ -269,6 +257,17 @@ public interface ISVNClient
                   Tristate storePristines) throws ClientException;
 
     /**
+     * Executes a revision checkout.
+     * <p>
+     * Behaves like the 1.15 version with <code>wcFormatVersion = null</code>
+     * and <code>storePristines = Tristate.Unknown</code>
+     */
+    long checkout(String moduleName, String destPath, Revision revision,
+                  Revision pegRevision, Depth depth,
+                  boolean ignoreExternals,
+                  boolean allowUnverObstructions) throws ClientException;
+
+    /**
      * Sets the notification callback used to send processing information back
      * to the calling program.
      * @param notify listener that the SVN library should call on many
@@ -315,7 +314,22 @@ public interface ISVNClient
      *                         from the reverted paths.
      * @param metadataOnly Revert just the metadata (including conflict data)
      *                     and not the working files/dirs
+     * @param addedKeepLocal With metadataOnly, keep locally added files.
      * @throws ClientException
+     * @since 1.15
+     */
+    void revert(Set<String> paths, Depth depth,
+                Collection<String> changelists,
+                boolean clearChangelists,
+                boolean metadataOnly,
+                boolean addedKeepLocal)
+            throws ClientException;
+
+    /**
+     * Reverts set of files or directories to a pristine state.
+     * <p>
+     * Behaves like the 1.15 version with <code>addedKeepLocal</code>
+     * set to <code>true</code>;
      * @since 1.9
      */
     void revert(Set<String> paths, Depth depth,
@@ -1619,16 +1633,6 @@ public interface ISVNClient
 
     /**
      * Recursively upgrade a working copy to a new metadata storage format.
-     * <p>
-     * Behaves like the 1.15 version with <code>targetWcVersion = null</code>.
-     * @deprecated
-     */
-    @Deprecated
-    void upgrade(String path) throws ClientException;
-
-
-    /**
-     * Recursively upgrade a working copy to a new metadata storage format.
      * @param path             the working copy path
      * @param targetWcVersion  the working copy version to upgrade to
      * @throws ClientException
@@ -1638,6 +1642,14 @@ public interface ISVNClient
             throws ClientException;
 
     /**
+     * Recursively upgrade a working copy to a new metadata storage format.
+     * <p>
+     * Behaves like the 1.15 version with <code>targetWcVersion = null</code>.
+     */
+    void upgrade(String path) throws ClientException;
+
+
+    /**
      * Apply a unidiff patch.
      * @param patchPath        the path of the patch
      * @param targetPath       the path to be patched

Modified: 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
==============================================================================
--- 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
  Sun May 10 07:38:44 2026        (r1934025)
+++ 
subversion/branches/javahl-1.15/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
  Sun May 10 07:43:30 2026        (r1934026)
@@ -204,7 +204,15 @@ public class SVNClient implements ISVNCl
                                    long limit, LogMessageCallback callback)
             throws ClientException;
 
-    @Deprecated
+    @Override
+    public native long checkout(String moduleName, String destPath,
+                                Revision revision, Revision pegRevision,
+                                Depth depth, boolean ignoreExternals,
+                                boolean allowUnverObstructions,
+                                Version wcFormatVersion,
+                                Tristate storePristines)
+        throws ClientException;
+
     @Override
     public long checkout(String moduleName, String destPath,
                                 Revision revision, Revision pegRevision,
@@ -218,15 +226,6 @@ public class SVNClient implements ISVNCl
                         null, Tristate.Unknown);
     }
 
-    @Override
-    public native long checkout(String moduleName, String destPath,
-                                Revision revision, Revision pegRevision,
-                                Depth depth, boolean ignoreExternals,
-                                boolean allowUnverObstructions,
-                                Version wcFormatVersion,
-                                Tristate storePristines)
-        throws ClientException;
-
     public void notification2(ClientNotifyCallback notify)
     {
         clientContext.notify = notify;
@@ -251,9 +250,21 @@ public class SVNClient implements ISVNCl
     public native void revert(Set<String> paths, Depth depth,
                               Collection<String> changelists,
                               boolean clearChangelists,
-                              boolean metadataOnly)
+                              boolean metadataOnly,
+                              boolean addedKeepLocal)
             throws ClientException;
 
+
+    public void revert(Set<String> paths, Depth depth,
+                       Collection<String> changelists,
+                       boolean clearChangelists,
+                       boolean metadataOnly)
+            throws ClientException
+    {
+        revert(paths, depth, changelists, clearChangelists,
+               metadataOnly, true);
+    }
+
     public void revert(Set<String> paths, Depth depth,
                        Collection<String> changelists)
             throws ClientException
@@ -789,17 +800,16 @@ public class SVNClient implements ISVNCl
                                         boolean lastChanged)
             throws ClientException;
 
-    @Deprecated
+    @Override
+    public native Version upgrade(String path, Version targetWcVersion)
+            throws ClientException;
+
     @Override
     public void upgrade(String path) throws ClientException
     {
         upgrade(path, (Version) null);
     }
 
-    @Override
-    public native Version upgrade(String path, Version targetWcVersion)
-            throws ClientException;
-
     /**
      * Enable logging in the JNI-code
      * @param logLevel      the level of information to log (See

Reply via email to