subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r918072 - in /subversion/trunk/subversion/bindings/javahl: src/org/apache/subversion/javahl/ src/org/tigris/subversion/javahl/ tests/org/apache/subversion/javahl/
Date Tue, 02 Mar 2010 15:20:38 GMT
Author: hwright
Date: Tue Mar  2 15:20:38 2010
New Revision: 918072

URL: http://svn.apache.org/viewvc?rev=918072&view=rev
Log:
JavaHL: Update one more path array to use a Set of strings.

[ in subversion/bindings/javahl/ ]
* tests/org/apache/subversion/javahl/BasicTests.java
  (testTreeConflict, testMove): Update the tests to use the new API.

* src/org/tigris/subversion/javahl/SVNClient.java
  (move): Update wrapper.

* src/org/apache/subversion/javahl/SVNClient.java
  (move): Rewrite the public method as a wrapper around the private native
    version.

* src/org/apache/subversion/javahl/ISVNClient.java
  (move): Modify the API to accept a Set of Strings.

Modified:
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=918072&r1=918071&r2=918072&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
Tue Mar  2 15:20:38 2010
@@ -330,7 +330,7 @@
      * @throws ClientException If the move operation fails.
      * @since 1.5
      */
-    void move(String[] srcPaths, String destPath, String message,
+    void move(Set<String> srcPaths, String destPath, String message,
               boolean force, boolean moveAsChild, boolean makeParents,
               Map<String, String> revpropTable)
         throws ClientException;

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=918072&r1=918071&r2=918072&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Tue Mar  2 15:20:38 2010
@@ -331,10 +331,20 @@
     /**
      * @since 1.5
      */
-    public native void move(String[] srcPaths, String destPath, String message,
-                            boolean force, boolean moveAsChild,
-                            boolean makeParents,
-                            Map<String, String> revpropTable)
+    public void move(Set<String> srcPaths, String destPath,
+                     String message, boolean force, boolean moveAsChild,
+                     boolean makeParents, Map<String, String> revpropTable)
+            throws ClientException
+    {
+        this.move(srcPaths.toArray(new String[srcPaths.size()]), destPath,
+                  message, force, moveAsChild, makeParents, revpropTable);
+    }
+
+    private native void move(String[] srcPaths, String destPath,
+                             String message,
+                             boolean force, boolean moveAsChild,
+                             boolean makeParents,
+                             Map<String, String> revpropTable)
             throws ClientException;
 
     /**

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=918072&r1=918071&r2=918072&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 Mar  2 15:20:38 2010
@@ -935,7 +935,8 @@
     {
         try
         {
-            aSVNClient.move(srcPaths, destPath, message, force, moveAsChild,
+            aSVNClient.move(new HashSet<String>(Arrays.asList(srcPaths)),
+                            destPath, message, force, moveAsChild,
                             makeParents, revpropTable);
         }
         catch (org.apache.subversion.javahl.ClientException ex)

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=918072&r1=918071&r2=918072&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Tue Mar  2 15:20:38 2010
@@ -947,12 +947,14 @@
         WC wc = thisTest.getWc();
 
         // Move files from A/B/E to A/B/F.
-        String[] srcPaths = { "alpha", "beta" };
-        for (int i = 0; i < srcPaths.length; i++)
+        Set<String> relPaths = new HashSet<String>(2);
+        relPaths.add("alpha");
+        relPaths.add("beta");
+        Set<String> srcPaths = new HashSet<String>(2);
+        for (String fileName : relPaths)
         {
-            String fileName = srcPaths[i];
-            srcPaths[i] = new File(thisTest.getWorkingCopy(),
-                                   "A/B/E/" + fileName).getPath();
+            srcPaths.add(new File(thisTest.getWorkingCopy(),
+                                  "A/B/E/" + fileName).getPath());
 
             wc.addItem("A/B/F/" + fileName,
                        wc.getItemContent("A/B/E/" + fileName));
@@ -3172,12 +3174,13 @@
 
 
         // Move files from A/B/E to A/B/F.
-        String[] srcPaths = { "alpha" };
-        for (int i = 0; i < srcPaths.length; i++)
+        Set<String> relPaths = new HashSet<String>(1);
+        relPaths.add("alpha");
+        Set<String> srcPaths = new HashSet<String>(1);
+        for (String fileName : relPaths)
         {
-            String fileName = srcPaths[i];
-            srcPaths[i] = new File(thisTest.getWorkingCopy(),
-                                   "A/B/E/" + fileName).getPath();
+            srcPaths.add(new File(thisTest.getWorkingCopy(),
+                                   "A/B/E/" + fileName).getPath());
 
             wc.addItem("A/B/F/" + fileName,
                        wc.getItemContent("A/B/E/" + fileName));



Mime
View raw message