Author: rhuijben
Date: Thu Jan 29 15:24:44 2015
New Revision: 1655704

URL: http://svn.apache.org/r1655704
Log:
Following up on r1655637, fill even more svn_client_commit_item3_t fields
and apply some updated expected results in JavaHL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (testJNIError,
   testBasicMkdirUrl): Expect creation of directory when using mkdir URL.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
  (setUp): Expect import to provide a url and kind.
* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
  (setUp): Expect import to provide a url and kind.

* subversion/libsvn_client/import.c
  (svn_client_import5): Provide kind an url in commit item.

* subversion/libsvn_client/util.c
  (svn_client_commit_item3_create): Use svn_node_unknown as default kind.

Modified:
    
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
    
subversion/trunk/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
    subversion/trunk/subversion/libsvn_client/import.c
    subversion/trunk/subversion/libsvn_client/util.c

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=1655704&r1=1655703&r2=1655704&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
 Thu Jan 29 15:24:44 2015
@@ -259,7 +259,7 @@ public class BasicTests extends SVNTests
         tempclient.dispose();
 
         // create Y and Y/Z directories in the repository
-        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", 
NodeKind.none,
+        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", 
NodeKind.dir,
                               CommitItemStateFlags.Add);
         Set<String> urls = new HashSet<String>(1);
         urls.add(thisTest.getUrl() + "/Y");
@@ -1004,9 +1004,9 @@ public class BasicTests extends SVNTests
         OneTest thisTest = new OneTest();
 
         // create Y and Y/Z directories in the repository
-        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", 
NodeKind.none,
+        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", 
NodeKind.dir,
                               CommitItemStateFlags.Add);
-        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y/Z", 
NodeKind.none,
+        addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y/Z", 
NodeKind.dir,
                               CommitItemStateFlags.Add);
         Set<String> urls = new HashSet<String>(2);
         urls.add(thisTest.getUrl() + "/Y");

Modified: 
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1655704&r1=1655703&r2=1655704&view=diff
==============================================================================
--- 
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
 (original)
+++ 
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
 Thu Jan 29 15:24:44 2015
@@ -257,10 +257,11 @@ class SVNTests extends TestCase
         greekRepos = new File(localTmp, "repos");
         greekDump = new File(localTmp, "greek_dump");
         admin.create(greekRepos, true,false, null, this.fsType);
-        addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
-                              NodeKind.none, CommitItemStateFlags.Add);
+        addExpectedCommitItem(greekFiles.getAbsolutePath(),
+                              makeReposUrl(greekRepos).toString(), null,
+                              NodeKind.dir, CommitItemStateFlags.Add);
         client.doImport(greekFiles.getAbsolutePath(),
-                       makeReposUrl(greekRepos).toString(),
+                        makeReposUrl(greekRepos).toString(),
                         Depth.infinity, false, false, null,
                         new MyCommitMessage(), null);
         admin.dump(greekRepos, new FileOutputStream(greekDump),

Modified: 
subversion/trunk/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java?rev=1655704&r1=1655703&r2=1655704&view=diff
==============================================================================
--- 
subversion/trunk/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
 (original)
+++ 
subversion/trunk/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNTests.java
 Thu Jan 29 15:24:44 2015
@@ -232,8 +232,9 @@ class SVNTests extends TestCase
         greekDump = new File(localTmp, "greek_dump");
         admin.create(greekRepos.getAbsolutePath(), true,false, null,
                      this.fsType);
-        addExpectedCommitItem(greekFiles.getAbsolutePath(), null, null,
-                              NodeKind.none, CommitItemStateFlags.Add);
+        addExpectedCommitItem(greekFiles.getAbsolutePath(),
+                              makeReposUrl(greekRepos).toString(), null,
+                              NodeKind.dir, CommitItemStateFlags.Add);
         client.doImport(greekFiles.getAbsolutePath(), makeReposUrl(greekRepos),
                         null, true );
         admin.dump(greekRepos.getAbsolutePath(), new FileOutputer(greekDump),

Modified: subversion/trunk/subversion/libsvn_client/import.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/import.c?rev=1655704&r1=1655703&r2=1655704&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/import.c (original)
+++ subversion/trunk/subversion/libsvn_client/import.c Thu Jan 29 15:24:44 2015
@@ -832,6 +832,8 @@ svn_client_import5(const char *path,
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
 
+  SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
+
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
     {
@@ -845,6 +847,8 @@ svn_client_import5(const char *path,
 
       item = svn_client_commit_item3_create(scratch_pool);
       item->path = local_abspath;
+      item->url = url;
+      item->kind = kind;
       item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
       APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
 
@@ -860,8 +864,6 @@ svn_client_import5(const char *path,
         }
     }
 
-  SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
-
   SVN_ERR(svn_client_open_ra_session2(&ra_session, url, NULL,
                                       ctx, scratch_pool, iterpool));
 

Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1655704&r1=1655703&r2=1655704&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Thu Jan 29 15:24:44 2015
@@ -142,6 +142,7 @@ svn_client_commit_item3_create(apr_pool_
 
   item->revision = SVN_INVALID_REVNUM;
   item->copyfrom_rev = SVN_INVALID_REVNUM;
+  item->kind = svn_node_unknown;
 
   return item;
 }


Reply via email to