subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r881374 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/tigris/subversion/javahl/
Date Tue, 17 Nov 2009 16:57:33 GMT
Author: hwright
Date: Tue Nov 17 16:57:32 2009
New Revision: 881374

URL: http://svn.apache.org/viewvc?rev=881374&view=rev
Log:
JavaHL:  Bring the diff APIs up-to-date with the native library.

[ in subversion/bindings/javahl/ ]
* native/org_tigris_subversion_javahl_SVNClient.cpp
  (Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZ):
Rename to...
  (Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZZ):
..this, adding extra boolean parameter.
  (Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZ):
Rename to...
  (Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZZ):
...this, adding extra boolean parameter.

* native/SVNClient.h,
  native/SVNClient.cpp
  (diff, diff, diff): Add extra boolean parameter, and update to new client
    APIs.

* src/org/tigris/subversion/javahl/SVNClientSynchronized.java,
  src/org/tigris/subversion/javahl/SVNClient.java,
  src/org/tigris/subversion/javahl/SVNClientInterface.java:
  (diff, diff): Add new diff APIs, deprecating the old ones.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
    subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Tue Nov 17 16:57:32 2009
@@ -982,7 +982,8 @@
                      Revision *pegRevision, const char *relativeToDir,
                      const char *outfileName, svn_depth_t depth,
                      StringArray &changelists,
-                     bool ignoreAncestry, bool noDiffDelete, bool force)
+                     bool ignoreAncestry, bool noDiffDelete, bool force,
+                     bool showCopiesAsAdds)
 {
     svn_error_t *err;
     SVN::Pool requestPool;
@@ -1022,7 +1023,7 @@
 
     if (pegRevision)
     {
-        err = svn_client_diff_peg4(diffOptions,
+        err = svn_client_diff_peg5(diffOptions,
                                    path1.c_str(),
                                    pegRevision->revision(),
                                    revision1.revision(),
@@ -1031,6 +1032,7 @@
                                    depth,
                                    ignoreAncestry,
                                    noDiffDelete,
+                                   showCopiesAsAdds,
                                    force,
                                    SVN_APR_LOCALE_CHARSET,
                                    outfile,
@@ -1052,7 +1054,7 @@
             SVN_JNI_ERR(err, );
         }
 
-        err = svn_client_diff4(diffOptions,
+        err = svn_client_diff5(diffOptions,
                                path1.c_str(),
                                revision1.revision(),
                                path2.c_str(),
@@ -1061,6 +1063,7 @@
                                depth,
                                ignoreAncestry,
                                noDiffDelete,
+                               showCopiesAsAdds,
                                force,
                                SVN_APR_LOCALE_CHARSET,
                                outfile,
@@ -1087,21 +1090,24 @@
                      const char *target2, Revision &revision2,
                      const char *relativeToDir, const char *outfileName,
                      svn_depth_t depth, StringArray &changelists,
-                     bool ignoreAncestry, bool noDiffDelete, bool force)
+                     bool ignoreAncestry, bool noDiffDelete, bool force,
+                     bool showCopiesAsAdds)
 {
     diff(target1, revision1, target2, revision2, NULL, relativeToDir,
-         outfileName, depth, changelists, ignoreAncestry, noDiffDelete, force);
+         outfileName, depth, changelists, ignoreAncestry, noDiffDelete, force,
+         showCopiesAsAdds);
 }
 
 void SVNClient::diff(const char *target, Revision &pegRevision,
                      Revision &startRevision, Revision &endRevision,
                      const char *relativeToDir, const char *outfileName,
                      svn_depth_t depth, StringArray &changelists,
-                     bool ignoreAncestry, bool noDiffDelete, bool force)
+                     bool ignoreAncestry, bool noDiffDelete, bool force,
+                     bool showCopiesAsAdds)
 {
     diff(target, startRevision, NULL, endRevision, &pegRevision,
          relativeToDir, outfileName, depth, changelists,
-         ignoreAncestry, noDiffDelete, force);
+         ignoreAncestry, noDiffDelete, force, showCopiesAsAdds);
 }
 
 void

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Tue Nov 17 16:57:32 2009
@@ -189,12 +189,14 @@
             const char *target2, Revision &revision2,
             const char *relativeToDir, const char *outfileName,
             svn_depth_t depth, StringArray &changelists,
-            bool ignoreAncestry, bool noDiffDelete, bool force);
+            bool ignoreAncestry, bool noDiffDelete, bool force,
+            bool showCopiesAsAdds);
   void diff(const char *target, Revision &pegevision,
             Revision &startRevision, Revision &endRevision,
             const char *relativeToDir, const char *outfileName,
             svn_depth_t depth, StringArray &changelists,
-            bool ignoreAncestry, bool noDiffDelete, bool force);
+            bool ignoreAncestry, bool noDiffDelete, bool force,
+            bool showCopiesAsAdds);
   void diffSummarize(const char *target1, Revision &revision1,
                      const char *target2, Revision &revision2,
                      svn_depth_t depth, StringArray &changelists,
@@ -224,7 +226,8 @@
             const char *target2, Revision &revision2,
             Revision *pegRevision, const char *relativeToDir,
             const char *outfileName, svn_depth_t depth, StringArray &changelists,
-            bool ignoreAncestry, bool noDiffDelete, bool force);
+            bool ignoreAncestry, bool noDiffDelete, bool force,
+            bool showCopiesAsAdds);
 
   Notify *m_notify;
   Notify2 *m_notify2;

Modified: subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
Tue Nov 17 16:57:32 2009
@@ -1197,11 +1197,12 @@
 }
 
 JNIEXPORT void JNICALL
-Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZ
+Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget1, jobject jrevision1,
  jstring jtarget2, jobject jrevision2, jstring jrelativeToDir,
  jstring joutfileName, jint jdepth, jobjectArray jchangelists,
- jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce)
+ jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
+ jboolean jcopiesAsAdds)
 {
   JNIEntry(SVNClient, diff);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1241,15 +1242,17 @@
   cl->diff(target1, revision1, target2, revision2, relativeToDir, outfileName,
            (svn_depth_t)jdepth, changelists,
            jignoreAncestry ? true:false,
-           jnoDiffDeleted ? true:false, jforce ? true:false);
+           jnoDiffDeleted ? true:false, jforce ? true:false,
+           jcopiesAsAdds ? true:false);
 }
 
 JNIEXPORT void JNICALL
-Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZ
+Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2I_3Ljava_lang_String_2ZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget, jobject jpegRevision,
  jobject jstartRevision, jobject jendRevision, jstring jrelativeToDir,
  jstring joutfileName, jint jdepth, jobjectArray jchangelists,
- jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce)
+ jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
+ jboolean jcopiesAsAdds)
 {
   JNIEntry(SVNClient, diff);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1289,7 +1292,8 @@
   cl->diff(target, pegRevision, startRevision, endRevision, relativeToDir,
            outfileName, (svn_depth_t) jdepth, changelists,
            jignoreAncestry ? true:false,
-           jnoDiffDeleted ? true:false, jforce ? true:false);
+           jnoDiffDeleted ? true:false, jforce ? true:false,
+           jcopiesAsAdds ? true:false);
 }
 
 JNIEXPORT void JNICALL

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
Tue Nov 17 16:57:32 2009
@@ -888,13 +888,32 @@
     }
 
     /**
+     * @deprecated Use {@link #diff(String, Revision, String, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
+    public void diff(String target1, Revision revision1, String target2,
+                     Revision revision2, String relativeToDir,
+                     String outFileName, int depth, String[] changelists,
+                     boolean ignoreAncestry, boolean noDiffDeleted,
+                     boolean force)
+            throws ClientException
+    {
+        diff(target1, revision1, target2, revision2, relativeToDir,
+             outFileName, depth, changelists, ignoreAncestry, noDiffDeleted,
+             force, false);
+    }
+
+    /**
+     * @since 1.7
+     */
     public native void diff(String target1, Revision revision1, String target2,
                             Revision revision2, String relativeToDir,
-                            String outFileName, int depth, String[] changelists,
-                            boolean ignoreAncestry, boolean noDiffDeleted,
-                            boolean force)
+                            String outFileName, int depth,
+                            String[] changelists, boolean ignoreAncestry,
+                            boolean noDiffDeleted, boolean force,
+                            boolean copiesAsAdds)
             throws ClientException;
 
     /**
@@ -916,14 +935,32 @@
     }
 
     /**
+     * @deprecated Use {@link #diff(String, Revision, Revision, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
+    public void diff(String target, Revision pegRevision,
+                     Revision startRevision, Revision endRevision,
+                     String relativeToDir, String outFileName, int depth,
+                     String[] changelists, boolean ignoreAncestry,
+                     boolean noDiffDeleted, boolean force)
+            throws ClientException
+    {
+        diff(target, pegRevision, startRevision, endRevision, relativeToDir,
+             outFileName, depth, changelists, ignoreAncestry, noDiffDeleted,
+             force, false);
+    }
+
+    /**
+     * @since 1.7
+     */
     public native void diff(String target, Revision pegRevision,
                             Revision startRevision, Revision endRevision,
                             String relativeToDir, String outFileName,
                             int depth, String[] changelists,
                             boolean ignoreAncestry, boolean noDiffDeleted,
-                            boolean force)
+                            boolean force, boolean copiesAsAdds)
             throws ClientException;
 
     /**

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
Tue Nov 17 16:57:32 2009
@@ -1184,7 +1184,33 @@
      * @param ignoreAncestry ignore if files are not related
      * @param noDiffDeleted no output on deleted files
      * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
      * @throws ClientException
+     * @since 1.7
+     */
+    void diff(String target1, Revision revision1, String target2,
+              Revision revision2, String relativeToDir, String outFileName,
+              int depth, String[] changelists, boolean ignoreAncestry,
+              boolean noDiffDeleted, boolean force, boolean copiesAsAdds)
+            throws ClientException;
+
+    /**
+     * Display the differences between two paths
+     * @param target1       first path or url
+     * @param revision1     first revision
+     * @param target2       second path or url
+     * @param revision2     second revision
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @throws ClientException
+     * @deprecated Use {@link #diff(String, Revision, String, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
     void diff(String target1, Revision revision1, String target2,
@@ -1228,7 +1254,34 @@
      * @param ignoreAncestry ignore if files are not related
      * @param noDiffDeleted no output on deleted files
      * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
      * @throws ClientException
+     * @since 1.7
+     */
+    void diff(String target, Revision pegRevision, Revision startRevision,
+              Revision endRevision, String relativeToDir, String outFileName,
+              int depth, String[] changelists, boolean ignoreAncestry,
+              boolean noDiffDeleted, boolean force, boolean copiesAsAdds)
+            throws ClientException;
+
+    /**
+     * Display the differences between two paths.
+     * @param target        path or url
+     * @param pegRevision   revision tointerpret target
+     * @param startRevision first Revision to compare
+     * @param endRevision   second Revision to compare
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param changelists  if non-null, filter paths using changelists
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @throws ClientException
+     * @deprecated Use {@link #diff(String, Revision, Revision, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
     void diff(String target, Revision pegRevision, Revision startRevision,

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java?rev=881374&r1=881373&r2=881374&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
Tue Nov 17 16:57:32 2009
@@ -1143,6 +1143,9 @@
     }
 
     /**
+     * @deprecated Use {@link #diff(String, Revision, String, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
     public void diff(String target1, Revision revision1, String target2,
@@ -1161,6 +1164,24 @@
     }
 
     /**
+     * @since 1.7
+     */
+    public void diff(String target1, Revision revision1, String target2,
+                     Revision revision2, String relativeToDir,
+                     String outFileName, int depth, String[] changelists,
+                     boolean ignoreAncestry, boolean noDiffDeleted,
+                     boolean force, boolean copiesAsAdds)
+            throws ClientException
+    {
+        synchronized (clazz)
+        {
+            worker.diff(target1, revision1, target2, revision2, relativeToDir,
+                        outFileName, depth, changelists, ignoreAncestry,
+                        noDiffDeleted, force, copiesAsAdds);
+        }
+    }
+
+    /**
      * @deprecated Use {@link #diff(String, Revision, Revision, Revision,
      *                              String, String, int, boolean, boolean,
      *                              boolean)} instead.
@@ -1182,6 +1203,9 @@
     }
 
     /**
+     * @deprecated Use {@link #diff(String, Revision, Revision, Revision,
+     *                              String, String, int, boolean, boolean,
+     *                              boolean, boolean)} instead.
      * @since 1.5
      */
     public void diff(String target, Revision pegRevision,
@@ -1200,6 +1224,25 @@
     }
 
     /**
+     * @since 1.7
+     */
+    public void diff(String target, Revision pegRevision,
+                     Revision startRevision, Revision endRevision,
+                     String relativeToDir, String outFileName, int depth,
+                     String[] changelists, boolean ignoreAncestry,
+                     boolean noDiffDeleted, boolean force,
+                     boolean copiesAsAdds)
+            throws ClientException
+    {
+        synchronized (clazz)
+        {
+            worker.diff(target, pegRevision, startRevision, endRevision,
+                        relativeToDir, outFileName, depth, changelists,
+                        ignoreAncestry, noDiffDeleted, force, copiesAsAdds);
+        }
+    }
+
+    /**
      * @since 1.5
      */
     public void diffSummarize(String target1, Revision revision1,



Mime
View raw message