You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/11 00:07:31 UTC

svn commit: r984234 [2/20] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ notes/ notes/api-errata/ notes/obliterate/ notes/obliterate/fspec-cc1/ notes/rename-tracking/ notes/svnpatch/ notes/tree-conflicts/ notes...

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.cpp?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.cpp (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.cpp Tue Aug 10 22:07:24 2010
@@ -26,6 +26,7 @@
 
 #include "SVNAdmin.h"
 #include "CreateJ.h"
+#include "ReposNotifyCallback.h"
 #include "JNIUtil.h"
 #include "svn_error_codes.h"
 #include "svn_repos.h"
@@ -58,50 +59,57 @@ void SVNAdmin::dispose(jobject jthis)
   SVNBase::dispose(jthis, &fid, JAVA_PACKAGE"/SVNAdmin");
 }
 
-void SVNAdmin::create(const char *path, bool disableFsyncCommits,
-                      bool keepLogs, const char *configPath,
+void SVNAdmin::create(File &path, bool disableFsyncCommits,
+                      bool keepLogs, File &configPath,
                       const char *fstype)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
-  if (configPath != NULL)
-    configPath = svn_dirent_internal_style(configPath, requestPool.pool());
   svn_repos_t *repos;
   apr_hash_t *config;
-  apr_hash_t *fs_config = apr_hash_make (requestPool.pool());
+  apr_hash_t *fs_config = apr_hash_make(requestPool.pool());
 
-  apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
-                APR_HASH_KEY_STRING,
-                (disableFsyncCommits? "1" : "0"));
-
-  apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
-                APR_HASH_KEY_STRING,
-                (keepLogs ? "0" : "1"));
-  apr_hash_set (fs_config, SVN_FS_CONFIG_FS_TYPE,
-                APR_HASH_KEY_STRING,
-                fstype);
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
+               APR_HASH_KEY_STRING,
+               (disableFsyncCommits? "1" : "0"));
+
+  apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
+               APR_HASH_KEY_STRING,
+               (keepLogs ? "0" : "1"));
+  apr_hash_set(fs_config, SVN_FS_CONFIG_FS_TYPE,
+               APR_HASH_KEY_STRING, fstype);
 
   SVN_JNI_ERR(svn_config_get_config(&config,
-                                    configPath,
+                                    configPath.getInternalStyle(requestPool),
                                     requestPool.pool()),);
-  SVN_JNI_ERR(svn_repos_create(&repos, path, NULL, NULL,
-                               config, fs_config, requestPool.pool()), );
+  SVN_JNI_ERR(svn_repos_create(&repos, path.getInternalStyle(requestPool),
+                               NULL, NULL, config, fs_config,
+                               requestPool.pool()), );
 }
 
-void SVNAdmin::deltify(const char *path, Revision &revStart, Revision &revEnd)
+void SVNAdmin::deltify(File &path, Revision &revStart, Revision &revEnd)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_revnum_t start = SVN_INVALID_REVNUM, end = SVN_INVALID_REVNUM;
   svn_revnum_t youngest, revision;
   SVN::Pool revisionPool;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
-  fs = svn_repos_fs (repos);
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
+  fs = svn_repos_fs(repos);
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
 
   if (revStart.revision()->kind == svn_opt_revision_number)
@@ -151,21 +159,26 @@ void SVNAdmin::deltify(const char *path,
   return;
 }
 
-void SVNAdmin::dump(const char *path, OutputStream &dataOut,
-                    OutputStream &messageOut,
+void SVNAdmin::dump(File &path, OutputStream &dataOut,
                     Revision &revsionStart, Revision &revisionEnd,
-                    bool incremental, bool useDeltas)
+                    bool incremental, bool useDeltas,
+                    ReposNotifyCallback *notifyCallback)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_revnum_t youngest;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
-  fs = svn_repos_fs (repos);
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
+  fs = svn_repos_fs(repos);
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
 
   /* ### We only handle revision numbers right now, not dates. */
@@ -208,42 +221,60 @@ void SVNAdmin::dump(const char *path, Ou
                      " (%ld)"), youngest), );
     }
 
-  SVN_JNI_ERR(svn_repos_dump_fs2(repos, dataOut.getStream(requestPool),
-                                 messageOut.getStream(requestPool),
+  SVN_JNI_ERR(svn_repos_dump_fs3(repos, dataOut.getStream(requestPool),
                                  lower, upper, incremental, useDeltas,
+                                 notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                 notifyCallback,
                                  NULL, NULL, requestPool.pool()), );
 }
 
-void SVNAdmin::hotcopy(const char *path, const char *targetPath,
+void SVNAdmin::hotcopy(File &path, File &targetPath,
                        bool cleanLogs)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  SVN_JNI_NULL_PTR_EX(targetPath, "targetPath", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
-  targetPath = svn_dirent_internal_style(targetPath, requestPool.pool());
-  SVN_JNI_ERR(svn_repos_hotcopy(path, targetPath, cleanLogs,
-                                requestPool.pool()), );
+
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  if (targetPath.isNull())
+    {
+      JNIUtil::throwNullPointerException("targetPath");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_hotcopy(path.getInternalStyle(requestPool),
+                                targetPath.getInternalStyle(requestPool),
+                                cleanLogs, requestPool.pool()), );
 }
 
 static void
-list_dblogs (const char *path, MessageReceiver &receiver, bool only_unused)
+list_dblogs (File &path, MessageReceiver &receiver, bool only_unused)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   apr_array_header_t *logfiles;
-  int i;
-  SVN_JNI_ERR(svn_repos_db_logfiles(&logfiles, path, only_unused,
-                                    requestPool.pool()), );
+
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_db_logfiles(&logfiles,
+                                    path.getInternalStyle(requestPool),
+                                    only_unused, requestPool.pool()), );
 
   /* Loop, printing log files.  We append the log paths to the
    * repository path, making sure to return everything to the native
    * style and encoding before printing. */
-  for (i = 0; i < logfiles->nelts; ++i)
+  for (int i = 0; i < logfiles->nelts; ++i)
     {
       const char *log_utf8;
-      log_utf8 = svn_dirent_join(path,
+      log_utf8 = svn_dirent_join(path.getInternalStyle(requestPool),
                                  APR_ARRAY_IDX(logfiles, i, const char *),
                                  requestPool.pool());
       log_utf8 = svn_dirent_local_style (log_utf8, requestPool.pool());
@@ -251,60 +282,73 @@ list_dblogs (const char *path, MessageRe
     }
 }
 
-void SVNAdmin::listDBLogs(const char *path, MessageReceiver &messageReceiver)
+void SVNAdmin::listDBLogs(File &path, MessageReceiver &messageReceiver)
 {
   list_dblogs(path, messageReceiver, false);
 }
 
-void SVNAdmin::listUnusedDBLogs(const char *path,
+void SVNAdmin::listUnusedDBLogs(File &path,
                                 MessageReceiver &messageReceiver)
 {
   list_dblogs(path, messageReceiver, true);
 }
 
-void SVNAdmin::load(const char *path,
+void SVNAdmin::load(File &path,
                     InputStream &dataIn,
-                    OutputStream &messageOut,
                     bool ignoreUUID,
                     bool forceUUID,
                     bool usePreCommitHook,
                     bool usePostCommitHook,
-                    const char *relativePath)
+                    const char *relativePath,
+                    ReposNotifyCallback *notifyCallback)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   enum svn_repos_load_uuid uuid_action = svn_repos_load_uuid_default;
   if (ignoreUUID)
     uuid_action = svn_repos_load_uuid_ignore;
   else if (forceUUID)
     uuid_action = svn_repos_load_uuid_force;
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
 
-  SVN_JNI_ERR(svn_repos_load_fs2(repos, dataIn.getStream(requestPool),
-                                 messageOut.getStream(requestPool),
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
+
+  SVN_JNI_ERR(svn_repos_load_fs3(repos, dataIn.getStream(requestPool),
                                  uuid_action, relativePath,
                                  usePreCommitHook, usePostCommitHook,
+                                 notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                 notifyCallback,
                                  NULL, NULL, requestPool.pool()), );
 }
 
-void SVNAdmin::lstxns(const char *path, MessageReceiver &messageReceiver)
+void SVNAdmin::lstxns(File &path, MessageReceiver &messageReceiver)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   apr_array_header_t *txns;
-  int i;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
   fs = svn_repos_fs (repos);
   SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool.pool()), );
 
   /* Loop, printing revisions. */
-  for (i = 0; i < txns->nelts; ++i)
+  for (int i = 0; i < txns->nelts; ++i)
     {
       messageReceiver.receiveMessage(APR_ARRAY_IDX (txns, i, const char *));
     }
@@ -312,33 +356,40 @@ void SVNAdmin::lstxns(const char *path, 
 
 }
 
-jlong SVNAdmin::recover(const char *path)
+jlong SVNAdmin::recover(File &path, ReposNotifyCallback *notifyCallback)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", -1);
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_revnum_t youngest_rev;
   svn_repos_t *repos;
 
-  SVN_JNI_ERR(svn_repos_recover3(path, FALSE, NULL, NULL, NULL, NULL,
-                                 requestPool.pool()),
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return -1;
+    }
+
+  SVN_JNI_ERR(svn_repos_recover4(path.getInternalStyle(requestPool), FALSE,
+                                 notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                 notifyCallback,
+                                 NULL, NULL, requestPool.pool()),
               -1);
 
   /* Since db transactions may have been replayed, it's nice to tell
    * people what the latest revision is.  It also proves that the
    * recovery actually worked. */
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), -1);
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), -1);
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest_rev, svn_repos_fs (repos),
                                   requestPool.pool()),
               -1);
   return youngest_rev;
 }
 
-void SVNAdmin::rmtxns(const char *path, StringArray &transactions)
+void SVNAdmin::rmtxns(File &path, StringArray &transactions)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_fs_txn_t *txn;
@@ -346,7 +397,14 @@ void SVNAdmin::rmtxns(const char *path, 
   int i;
   SVN::Pool transactionPool;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
   fs = svn_repos_fs (repos);
 
   args = transactions.array(requestPool);
@@ -380,13 +438,12 @@ void SVNAdmin::rmtxns(const char *path, 
 
 }
 
-void SVNAdmin::setRevProp(const char *path, Revision &revision,
+void SVNAdmin::setRevProp(File &path, Revision &revision,
                           const char *propName, const char *propValue,
                           bool usePreRevPropChangeHook,
                           bool usePostRevPropChangeHook)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
   SVN_JNI_NULL_PTR_EX(propName, "propName", );
   SVN_JNI_NULL_PTR_EX(propValue, "propValue", );
   if (revision.revision()->kind != svn_opt_revision_number)
@@ -395,10 +452,16 @@ void SVNAdmin::setRevProp(const char *pa
                                     _("Missing revision")), );
     }
 
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
   /* Open the filesystem. */
   svn_repos_t *repos;
-  path = svn_dirent_internal_style(path, requestPool.pool());
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
 
   /* If we are bypassing the hooks system, we just hit the filesystem
    * directly. */
@@ -417,8 +480,9 @@ void SVNAdmin::setRevProp(const char *pa
   else
     {
       svn_fs_t *fs = svn_repos_fs (repos);
-      err = svn_fs_change_rev_prop(fs, revision.revision()->value.number,
-                                   propName, propValStr, requestPool.pool());
+      err = svn_fs_change_rev_prop2(fs, revision.revision()->value.number,
+                                    propName, NULL, propValStr,
+                                    requestPool.pool());
     }
   SVN_JNI_ERR(err, );
 }
@@ -453,19 +517,25 @@ SVNAdmin::getRevnum(svn_revnum_t *revnum
   return SVN_NO_ERROR;
 }
 
-void SVNAdmin::verify(const char *path, OutputStream &messageOut,
-                      Revision &revisionStart, Revision &revisionEnd)
+void
+SVNAdmin::verify(File &path, Revision &revisionStart, Revision &revisionEnd,
+                 ReposNotifyCallback *notifyCallback)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_revnum_t youngest;
 
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
   /* This whole process is basically just a dump of the repository
    * with no interest in the output. */
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs (repos),
                                   requestPool.pool()), );
 
@@ -491,23 +561,74 @@ void SVNAdmin::verify(const char *path, 
       (SVN_ERR_INCORRECT_PARAMS, NULL,
        _("Start revision cannot be higher than end revision")), );
 
-  SVN_JNI_ERR(svn_repos_verify_fs(repos, messageOut.getStream(requestPool),
-                                  lower, upper,
-                                  NULL, NULL /* cancel callback/baton */,
-                                  requestPool.pool()), );
+  SVN_JNI_ERR(svn_repos_verify_fs2(repos, lower, upper,
+                                   notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                   notifyCallback,
+                                   NULL, NULL /* cancel callback/baton */,
+                                   requestPool.pool()), );
+}
+
+void SVNAdmin::pack(File &path, ReposNotifyCallback *notifyCallback)
+{
+  SVN::Pool requestPool;
+  svn_repos_t *repos;
+
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
+
+  SVN_JNI_ERR(svn_repos_fs_pack2(repos,
+                                 notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                 notifyCallback,
+                                 NULL, NULL,
+                                 requestPool.pool()),
+              );
+}
+
+void SVNAdmin::upgrade(File &path, ReposNotifyCallback *notifyCallback)
+{
+  SVN::Pool requestPool;
+
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_upgrade2(path.getInternalStyle(requestPool), FALSE,
+                                 notifyCallback != NULL
+                                    ? ReposNotifyCallback::notify
+                                    : NULL,
+                                 notifyCallback,
+                                 requestPool.pool()),
+              );
 }
 
-jobject SVNAdmin::lslocks(const char *path)
+jobject SVNAdmin::lslocks(File &path)
 {
   SVN::Pool requestPool;
-  SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   apr_hash_t *locks;
   apr_hash_index_t *hi;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), NULL);
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return NULL;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), NULL);
   fs = svn_repos_fs (repos);
   /* Fetch all locks on or below the root directory. */
   SVN_JNI_ERR(svn_repos_fs_get_locks(&locks, repos, "/", NULL, NULL,
@@ -538,17 +659,22 @@ jobject SVNAdmin::lslocks(const char *pa
   return CreateJ::Set(jlocks);
 }
 
-void SVNAdmin::rmlocks(const char *path, StringArray &locks)
+void SVNAdmin::rmlocks(File &path, StringArray &locks)
 {
   SVN::Pool requestPool;
   apr_pool_t *pool = requestPool.pool();
-  SVN_JNI_NULL_PTR_EX(path, "path", );
-  path = svn_dirent_internal_style(path, requestPool.pool());
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_fs_access_t *access;
 
-  SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+  if (path.isNull())
+    {
+      JNIUtil::throwNullPointerException("path");
+      return;
+    }
+
+  SVN_JNI_ERR(svn_repos_open(&repos, path.getInternalStyle(requestPool),
+                             requestPool.pool()), );
   fs = svn_repos_fs (repos);
   const char *username;
 

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNAdmin.h Tue Aug 10 22:07:24 2010
@@ -34,35 +34,39 @@
 #include "OutputStream.h"
 #include "InputStream.h"
 #include "MessageReceiver.h"
+#include "ReposNotifyCallback.h"
 #include "StringArray.h"
+#include "File.h"
 
 class SVNAdmin : public SVNBase
 {
  public:
-  void rmlocks(const char *path, StringArray &locks);
-  jobject lslocks(const char *path);
-  void verify(const char *path, OutputStream &messageOut,
-              Revision &revisionStart, Revision &revisionEnd);
-  void setRevProp(const char *path, Revision &revision,
+  void rmlocks(File &path, StringArray &locks);
+  jobject lslocks(File &path);
+  void verify(File &path, Revision &revisionStart, Revision &revisionEnd,
+              ReposNotifyCallback *notifyCallback);
+  void setRevProp(File &path, Revision &revision,
                   const char *propName, const char *propValue,
                   bool usePreRevPropChangeHook,
                   bool usePostRevPropChangeHook);
-  void rmtxns(const char *path, StringArray &transactions);
-  jlong recover(const char *path);
-  void lstxns(const char *path, MessageReceiver &messageReceiver);
-  void load(const char *path, InputStream &dataIn, OutputStream &messageOut,
-            bool ignoreUUID, bool forceUUID, bool usePreCommitHook,
-            bool usePostCommitHook, const char *relativePath);
-  void listUnusedDBLogs(const char *path,
+  void rmtxns(File &path, StringArray &transactions);
+  jlong recover(File &path, ReposNotifyCallback *notifyCallback);
+  void lstxns(File &path, MessageReceiver &messageReceiver);
+  void load(File &path, InputStream &dataIn, bool ignoreUUID, bool forceUUID,
+            bool usePreCommitHook, bool usePostCommitHook,
+            const char *relativePath, ReposNotifyCallback *notifyCallback);
+  void listUnusedDBLogs(File &path,
                         MessageReceiver &messageReceiver);
-  void listDBLogs(const char *path, MessageReceiver &messageReceiver);
-  void hotcopy(const char *path, const char *targetPath, bool cleanLogs);
-  void dump(const char *path, OutputStream &dataOut, OutputStream &messageOut,
-            Revision &revsionStart, Revision &RevisionEnd,
-            bool incremental, bool useDeltas);
-  void deltify(const char *path, Revision &start, Revision &end);
-  void create(const char *path, bool ignoreUUID, bool forceUUID,
-              const char *configPath, const char *fstype);
+  void listDBLogs(File &path, MessageReceiver &messageReceiver);
+  void hotcopy(File &path, File &targetPath, bool cleanLogs);
+  void dump(File &path, OutputStream &dataOut, Revision &revsionStart,
+            Revision &RevisionEnd, bool incremental, bool useDeltas,
+            ReposNotifyCallback *notifyCallback);
+  void deltify(File &path, Revision &start, Revision &end);
+  void create(File &path, bool ignoreUUID, bool forceUUID, File &configPath,
+              const char *fstype);
+  void upgrade(File &path, ReposNotifyCallback *callback);
+  void pack(File &path, ReposNotifyCallback *callback);
   SVNAdmin();
   virtual ~SVNAdmin();
   void dispose(jobject jthis);

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.cpp?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.cpp Tue Aug 10 22:07:24 2010
@@ -26,7 +26,7 @@
 
 #include "SVNClient.h"
 #include "JNIUtil.h"
-#include "NotifyCallback.h"
+#include "ClientNotifyCallback.h"
 #include "CopySources.h"
 #include "DiffSummaryReceiver.h"
 #include "ConflictResolverCallback.h"
@@ -40,6 +40,7 @@
 #include "ProplistCallback.h"
 #include "LogMessageCallback.h"
 #include "InfoCallback.h"
+#include "PatchCallback.h"
 #include "StatusCallback.h"
 #include "ChangelistCallback.h"
 #include "ListCallback.h"
@@ -59,6 +60,7 @@
 #include "svn_config.h"
 #include "svn_io.h"
 #include "svn_dirent_uri.h"
+#include "svn_path.h"
 #include "svn_utf.h"
 #include "svn_private_config.h"
 #include "JNIStringHolder.h"
@@ -176,14 +178,14 @@ SVNClient::status(const char *path, svn_
 
     rev.kind = svn_opt_revision_unspecified;
 
-    SVN_JNI_ERR(svn_client_status5(&youngest, checkedPath.c_str(),
-                                   &rev, StatusCallback::callback,
-                                   callback,
+    SVN_JNI_ERR(svn_client_status5(&youngest, ctx, checkedPath.c_str(),
+                                   &rev,
                                    depth,
                                    getAll, onServer, noIgnore,
                                    ignoreExternals,
                                    changelists.array(requestPool),
-                                   ctx, requestPool.pool()), );
+                                   StatusCallback::callback, callback,
+                                   requestPool.pool()), );
 }
 
 void SVNClient::username(const char *pi_username)
@@ -291,7 +293,7 @@ jlong SVNClient::checkout(const char *mo
     return rev;
 }
 
-void SVNClient::notification2(NotifyCallback *notify2)
+void SVNClient::notification2(ClientNotifyCallback *notify2)
 {
     delete m_notify2;
     m_notify2 = notify2;
@@ -1002,6 +1004,7 @@ void SVNClient::diff(const char *target1
                                    noDiffDelete,
                                    showCopiesAsAdds,
                                    force,
+                                   FALSE,
                                    SVN_APR_LOCALE_CHARSET,
                                    outfile,
                                    NULL /* error file */,
@@ -1033,6 +1036,7 @@ void SVNClient::diff(const char *target1
                                noDiffDelete,
                                showCopiesAsAdds,
                                force,
+                               FALSE,
                                SVN_APR_LOCALE_CHARSET,
                                outfile,
                                NULL /* error file */,
@@ -1230,7 +1234,7 @@ svn_client_ctx_t *SVNClient::getContext(
     ctx->cancel_func = checkCancel;
     m_cancelOperation = false;
     ctx->cancel_baton = this;
-    ctx->notify_func2= NotifyCallback::notify;
+    ctx->notify_func2= ClientNotifyCallback::notify;
     ctx->notify_baton2 = m_notify2;
 
     ctx->progress_func = ProgressListener::progress;
@@ -1659,107 +1663,11 @@ void SVNClient::setRevProperty(const cha
                                         requestPool.pool()), );
 }
 
-struct version_status_baton
-{
-    svn_revnum_t min_rev;    /* lowest revision found. */
-    svn_revnum_t max_rev;    /* highest revision found. */
-    svn_boolean_t switched;  /* is anything switched? */
-    svn_boolean_t modified;  /* is anything modified? */
-    svn_boolean_t committed; /* examine last committed revisions */
-    svn_boolean_t done;      /* note completion of our task. */
-    const char *wc_abspath;  /* path whose URL we're looking for. */
-    const char *wc_url;      /* URL for the path whose URL we're looking for. */
-    apr_pool_t *pool;        /* pool in which to store alloc-needy things. */
-};
-
-/* This implements `svn_cancel_func_t'. */
-static svn_error_t *
-cancel(void *baton)
-{
-    struct version_status_baton *sb = (version_status_baton *)baton;
-    if (sb->done)
-        return svn_error_create(SVN_ERR_CANCELLED, NULL, "Finished");
-    else
-        return SVN_NO_ERROR;
-}
-
-/* An svn_wc_status_func4_t callback function for analyzing status
- * structures. */
-static svn_error_t *
-analyze_status(void *baton,
-               const char *local_abspath,
-               const svn_wc_status3_t *status,
-               apr_pool_t *pool)
-{
-    struct version_status_baton *sb = (version_status_baton *)baton;
-
-    if (sb->done)
-        return SVN_NO_ERROR;
-
-    if (! status->entry)
-        return SVN_NO_ERROR;
-
-    /* Added files have a revision of no interest */
-    if (status->text_status != svn_wc_status_added)
-    {
-        svn_revnum_t item_rev = (sb->committed
-                                 ? status->entry->cmt_rev
-                                 : status->entry->revision);
-
-        if (sb->min_rev == SVN_INVALID_REVNUM || item_rev < sb->min_rev)
-            sb->min_rev = item_rev;
-
-        if (sb->max_rev == SVN_INVALID_REVNUM || item_rev > sb->max_rev)
-            sb->max_rev = item_rev;
-    }
-
-    sb->switched |= status->switched;
-    sb->modified |= (status->text_status != svn_wc_status_normal);
-    sb->modified |= (status->prop_status != svn_wc_status_normal
-                     && status->prop_status != svn_wc_status_none);
-
-    if (sb->wc_abspath
-        && (! sb->wc_url)
-        && (strcmp(local_abspath, sb->wc_abspath) == 0)
-        && (status->entry))
-        sb->wc_url = apr_pstrdup(sb->pool, status->entry->url);
-
-    return SVN_NO_ERROR;
-}
-
-
-/* This implements `svn_wc_notify_func_t'. */
-static void
-notify(void *baton,
-       const char *path,
-       svn_wc_notify_action_t action,
-       svn_node_kind_t kind,
-       const char *mime_type,
-       svn_wc_notify_state_t content_state,
-       svn_wc_notify_state_t prop_state,
-       svn_revnum_t revision)
-{
-    struct version_status_baton *sb = (version_status_baton *)baton;
-    if ((action == svn_wc_notify_status_external)
-        || (action == svn_wc_notify_status_completed))
-        sb->done = TRUE;
-}
-
 jstring SVNClient::getVersionInfo(const char *path, const char *trailUrl,
                                   bool lastChanged)
 {
-    struct version_status_baton sb;
     SVN::Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-    sb.switched = FALSE;
-    sb.modified = FALSE;
-    sb.committed = FALSE;
-    sb.min_rev = SVN_INVALID_REVNUM;
-    sb.max_rev = SVN_INVALID_REVNUM;
-    sb.wc_abspath = NULL;
-    sb.wc_url = NULL;
-    sb.done = FALSE;
-    sb.pool = requestPool.pool();
 
     Path intPath(path);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
@@ -1791,48 +1699,30 @@ jstring SVNClient::getVersionInfo(const 
         }
     }
 
-    sb.wc_abspath = intPath.c_str();
-    svn_opt_revision_t rev;
-    rev.kind = svn_opt_revision_unspecified;
+    svn_wc_revision_status_t *result;
+    const char *local_abspath;
 
-    svn_error_t *err;
-    err = svn_client_status5(NULL, intPath.c_str(), &rev, analyze_status,
-                             &sb, svn_depth_infinity, TRUE, FALSE, FALSE,
-                             FALSE, NULL, ctx, requestPool.pool());
-    if (err && (err->apr_err == SVN_ERR_CANCELLED))
-        svn_error_clear(err);
-    else
-        SVN_JNI_ERR(err, NULL);
-
-    if ((! sb.switched ) && (trailUrl))
-    {
-        /* If the trailing part of the URL of the working copy directory
-         * does not match the given trailing URL then the whole working
-         * copy is switched. */
-        if (! sb.wc_url)
-        {
-            sb.switched = TRUE;
-        }
-        else
-        {
-            apr_size_t len1 = strlen(trailUrl);
-            apr_size_t len2 = strlen(sb.wc_url);
-            if ((len1 > len2) || strcmp(sb.wc_url + len2 - len1, trailUrl))
-                sb.switched = TRUE;
-        }
-    }
+    SVN_JNI_ERR(svn_dirent_get_absolute(&local_abspath, intPath.c_str(),
+                                        requestPool.pool()), NULL);
+    SVN_JNI_ERR(svn_wc_revision_status2(&result, ctx->wc_ctx, local_abspath,
+                                        trailUrl, lastChanged,
+                                        ctx->cancel_func, ctx->cancel_baton,
+                                        requestPool.pool(),
+                                        requestPool.pool()), NULL);
 
     std::ostringstream value;
-    value << sb.min_rev;
-    if (sb.min_rev != sb.max_rev)
+    value << result->min_rev;
+    if (result->min_rev != result->max_rev)
     {
         value << ":";
-        value << sb.max_rev;
+        value << result->max_rev;
     }
-    if (sb.modified)
+    if (result->modified)
         value << "M";
-    if (sb.switched)
+    if (result->switched)
         value << "S";
+    if (result->sparse_checkout)
+        value << "P";
 
     return JNIUtil::makeJString(value.str().c_str());
 }
@@ -1885,30 +1775,6 @@ struct info_baton
     apr_pool_t *pool;
 };
 
-/**
- * Get information about a file or directory.
- */
-jobject SVNClient::info(const char *path)
-{
-    SVN::Pool requestPool;
-    svn_wc_adm_access_t *adm_access;
-    const svn_wc_entry_t *entry;
-
-    SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-    Path intPath(path);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
-
-    SVN_JNI_ERR(svn_wc_adm_probe_open3(&adm_access, NULL, intPath.c_str(),
-                                       FALSE, 0, NULL, NULL,
-                                       requestPool.pool()),
-                NULL);
-    SVN_JNI_ERR(svn_wc_entry(&entry, intPath.c_str(), adm_access, FALSE,
-                             requestPool.pool()),
-                NULL);
-
-    return CreateJ::Info(entry);
-}
-
 void
 SVNClient::info2(const char *path, Revision &revision, Revision &pegRevision,
                  svn_depth_t depth, StringArray &changelists,
@@ -1924,7 +1790,7 @@ SVNClient::info2(const char *path, Revis
     Path checkedPath(path);
     SVN_JNI_ERR(checkedPath.error_occured(), );
 
-    SVN_JNI_ERR(svn_client_info2(checkedPath.c_str(),
+    SVN_JNI_ERR(svn_client_info3(checkedPath.c_str(),
                                  pegRevision.revision(),
                                  revision.revision(),
                                  InfoCallback::callback,
@@ -1932,3 +1798,30 @@ SVNClient::info2(const char *path, Revis
                                  changelists.array(requestPool), ctx,
                                  requestPool.pool()), );
 }
+
+void
+SVNClient::patch(const char *patchPath, const char *targetPath, bool dryRun,
+                 int stripCount, bool reverse, bool ignoreWhitespace,
+                 bool removeTempfiles, PatchCallback *callback)
+{
+    SVN_JNI_NULL_PTR_EX(patchPath, "patchPath", );
+    SVN_JNI_NULL_PTR_EX(targetPath, "targetPath", );
+
+    SVN::Pool requestPool;
+    svn_client_ctx_t *ctx = getContext(NULL);
+    if (ctx == NULL)
+        return;
+
+    Path checkedPatchPath(patchPath);
+    SVN_JNI_ERR(checkedPatchPath.error_occured(), );
+    Path checkedTargetPath(targetPath);
+    SVN_JNI_ERR(checkedTargetPath.error_occured(), );
+
+    SVN_JNI_ERR(svn_client_patch(checkedPatchPath.c_str(),
+                                 checkedTargetPath.c_str(),
+                                 dryRun, stripCount, reverse, ignoreWhitespace,
+                                 removeTempfiles,
+                                 PatchCallback::callback, callback,
+                                 ctx, requestPool.pool(),
+                                 requestPool.pool()), );
+}

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/SVNClient.h Tue Aug 10 22:07:24 2010
@@ -34,7 +34,7 @@
 
 class Revision;
 class RevisionRange;
-class NotifyCallback;
+class ClientNotifyCallback;
 class ConflictResolverCallback;
 class ProgressListener;
 class Targets;
@@ -48,6 +48,7 @@ class LogMessageCallback;
 class InfoCallback;
 class ListCallback;
 class StatusCallback;
+class PatchCallback;
 class ChangelistCallback;
 class CommitMessage;
 class StringArray;
@@ -59,6 +60,9 @@ class RevpropTable;
 class SVNClient :public SVNBase
 {
  public:
+  void patch(const char *patchPath, const char *targetPath, bool dryRun,
+             int stripCount, bool reverse, bool ignoreWhitespace,
+             bool removeTempfiles, PatchCallback *callback);
   void info2(const char *path, Revision &revision, Revision &pegRevision,
              svn_depth_t depth, StringArray &changelists,
              InfoCallback *callback);
@@ -143,7 +147,7 @@ class SVNClient :public SVNBase
   void revert(const char *path, svn_depth_t depth, StringArray &changelists);
   void remove(Targets &targets, const char *message, bool force,
               bool keep_local, RevpropTable &revprops);
-  void notification2(NotifyCallback *notify2);
+  void notification2(ClientNotifyCallback *notify2);
   void setConflictResolver(ConflictResolverCallback *conflictResolver);
   void setProgressListener(ProgressListener *progressListener);
   jlong checkout(const char *moduleName, const char *destPath,
@@ -159,7 +163,6 @@ class SVNClient :public SVNBase
   void username(const char *pi_username);
   jstring getAdminDirectoryName();
   jboolean isAdminDirectory(const char *name);
-  jobject info(const char *path);
   void addToChangelist(Targets &srcPaths, const char *changelist,
                        svn_depth_t depth, StringArray &changelists);
   void removeFromChangelists(Targets &srcPaths, svn_depth_t depth,
@@ -225,7 +228,7 @@ class SVNClient :public SVNBase
             bool ignoreAncestry, bool noDiffDelete, bool force,
             bool showCopiesAsAdds);
 
-  NotifyCallback *m_notify2;
+  ClientNotifyCallback *m_notify2;
   ConflictResolverCallback *m_conflictResolver;
   ProgressListener *m_progressListener;
   Prompter *m_prompter;

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.cpp?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.cpp (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.cpp Tue Aug 10 22:07:24 2010
@@ -51,7 +51,7 @@ StatusCallback::~StatusCallback()
 svn_error_t *
 StatusCallback::callback(void *baton,
                          const char *local_abspath,
-                         const svn_wc_status3_t *status,
+                         const svn_client_status_t *status,
                          apr_pool_t *pool)
 {
   if (baton)
@@ -65,7 +65,7 @@ StatusCallback::callback(void *baton,
  */
 svn_error_t *
 StatusCallback::doStatus(const char *local_abspath,
-                         const svn_wc_status3_t *status,
+                         const svn_client_status_t *status,
                          apr_pool_t *pool)
 {
   JNIEnv *env = JNIUtil::getEnv();

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.h?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/StatusCallback.h Tue Aug 10 22:07:24 2010
@@ -44,12 +44,12 @@ class StatusCallback
 
   static svn_error_t* callback(void *baton,
                                const char *local_abspath,
-                               const svn_wc_status3_t *status,
+                               const svn_client_status_t *status,
                                apr_pool_t *pool);
 
  protected:
   svn_error_t *doStatus(const char *local_abspath,
-                        const svn_wc_status3_t *status,
+                        const svn_client_status_t *status,
                         apr_pool_t *pool);
 
  private:

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNAdmin.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNAdmin.cpp?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNAdmin.cpp (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNAdmin.cpp Tue Aug 10 22:07:24 2010
@@ -34,6 +34,8 @@
 #include "InputStream.h"
 #include "OutputStream.h"
 #include "MessageReceiver.h"
+#include "File.h"
+#include "ReposNotifyCallback.h"
 #include "svn_props.h"
 #include "svn_private_config.h"
 
@@ -72,8 +74,8 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_create
-(JNIEnv *env, jobject jthis, jstring jpath, jboolean jdisableFsyncCommit,
- jboolean jkeepLog, jstring jconfigpath, jstring jfstype)
+(JNIEnv *env, jobject jthis, jobject jpath, jboolean jdisableFsyncCommit,
+ jboolean jkeepLog, jobject jconfigpath, jstring jfstype)
 {
   JNIEntry(SVNAdmin, create);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -83,11 +85,11 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  JNIStringHolder configpath(jconfigpath);
+  File configpath(jconfigpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -101,7 +103,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_deltify
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevisionStart,
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jrevisionStart,
  jobject jrevisionStop)
 {
   JNIEntry(SVNAdmin, deltify);
@@ -112,7 +114,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -129,9 +131,9 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_dump
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jdataout,
- jobject jmessageout, jobject jrevisionStart, jobject jrevisionEnd,
- jboolean jincremental, jboolean juseDeltas)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jdataout,
+ jobject jrevisionStart, jobject jrevisionEnd, jboolean jincremental,
+ jboolean juseDeltas, jobject jnotifyCallback)
 {
   JNIEntry(SVNAdmin, dump);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -141,7 +143,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -149,10 +151,6 @@ Java_org_apache_subversion_javahl_SVNAdm
   if (JNIUtil::isExceptionThrown())
     return;
 
-  OutputStream messageOut(jmessageout);
-  if (JNIUtil::isExceptionThrown())
-    return;
-
   Revision revisionStart(jrevisionStart);
   if (JNIUtil::isExceptionThrown())
     return;
@@ -161,13 +159,16 @@ Java_org_apache_subversion_javahl_SVNAdm
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->dump(path, dataOut, messageOut, revisionStart, revisionEnd,
-           jincremental ? true : false, juseDeltas ? true : false);
+  ReposNotifyCallback notifyCallback(jnotifyCallback);
+
+  cl->dump(path, dataOut, revisionStart, revisionEnd,
+           jincremental ? true : false, juseDeltas ? true : false,
+           jnotifyCallback != NULL ? &notifyCallback : NULL);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_hotcopy
-(JNIEnv *env, jobject jthis, jstring jpath, jstring jtargetPath,
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jtargetPath,
  jboolean jcleanLogs)
 {
   JNIEntry(SVNAdmin, hotcopy);
@@ -178,11 +179,11 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  JNIStringHolder targetPath(jtargetPath);
+  File targetPath(jtargetPath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -191,7 +192,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_listDBLogs
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jreceiver)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jreceiver)
 {
   JNIEntry(SVNAdmin, listDBLogs);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -201,7 +202,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -214,7 +215,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_listUnusedDBLogs
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jreceiver)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jreceiver)
 {
   JNIEntry(SVNAdmin, listUnusedDBLogs);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -224,7 +225,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -237,9 +238,9 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_load
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jinputData,
- jobject joutputMsg, jboolean jignoreUUID, jboolean jforceUUID,
- jboolean jusePreCommitHook, jboolean jusePostCommitHook, jstring jrelativePath)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jinputData,
+ jboolean jignoreUUID, jboolean jforceUUID, jboolean jusePreCommitHook,
+ jboolean jusePostCommitHook, jstring jrelativePath, jobject jnotifyCallback)
 {
   JNIEntry(SVNAdmin, load);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -249,7 +250,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -257,23 +258,21 @@ Java_org_apache_subversion_javahl_SVNAdm
   if (JNIUtil::isExceptionThrown())
     return;
 
-
-  OutputStream outputMsg(joutputMsg);
-  if (JNIUtil::isExceptionThrown())
-    return;
-
   JNIStringHolder relativePath(jrelativePath);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->load(path, inputData, outputMsg, jignoreUUID ? true : false,
+  ReposNotifyCallback notifyCallback(jnotifyCallback);
+
+  cl->load(path, inputData, jignoreUUID ? true : false,
            jforceUUID ? true : false, jusePreCommitHook ? true : false,
-           jusePostCommitHook ? true : false, relativePath);
+           jusePostCommitHook ? true : false, relativePath,
+           jnotifyCallback != NULL ? &notifyCallback : NULL);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_lstxns
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jmessageReceiver)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jmessageReceiver)
 {
   JNIEntry(SVNAdmin, lstxns);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -283,7 +282,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -296,7 +295,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_recover
-(JNIEnv *env, jobject jthis, jstring jpath)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jnotifyCallback)
 {
   JNIEntry(SVNAdmin, recover);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -306,16 +305,18 @@ Java_org_apache_subversion_javahl_SVNAdm
       return -1;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return -1;
 
-  return cl->recover(path);
+  ReposNotifyCallback callback(jnotifyCallback);
+
+  return cl->recover(path, jnotifyCallback != NULL ? &callback : NULL);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_rmtxns
-(JNIEnv *env, jobject jthis, jstring jpath, jobjectArray jtransactions)
+(JNIEnv *env, jobject jthis, jobject jpath, jobjectArray jtransactions)
 {
   JNIEntry(SVNAdmin, rmtxns);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -325,7 +326,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -338,7 +339,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_setRevProp
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jrevision,
  jstring jpropName, jstring jpropValue, jboolean jusePreRevPropChangeHook,
  jboolean jusePostRevPropChangeHook)
 {
@@ -350,7 +351,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -373,8 +374,8 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_verify
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jmessageout,
- jobject jrevisionStart, jobject jrevisionEnd)
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jrevisionStart,
+ jobject jrevisionEnd, jobject jcallback)
 {
   JNIEntry(SVNAdmin, verify);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -384,28 +385,29 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  OutputStream messageOut(jmessageout);
+  Revision revisionStart(jrevisionStart);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  Revision revisionStart(jrevisionStart);
+  Revision revisionEnd(jrevisionEnd);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  Revision revisionEnd(jrevisionEnd);
+  ReposNotifyCallback callback(jcallback);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->verify(path, messageOut, revisionStart, revisionEnd);
+  cl->verify(path, revisionStart, revisionEnd,
+             jcallback != NULL ? &callback : NULL);
 }
 
 JNIEXPORT jobject JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_lslocks
-(JNIEnv *env, jobject jthis, jstring jpath)
+(JNIEnv *env, jobject jthis, jobject jpath)
 {
   JNIEntry(SVNAdmin, lslocks);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -415,7 +417,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return NULL;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
@@ -424,7 +426,7 @@ Java_org_apache_subversion_javahl_SVNAdm
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNAdmin_rmlocks
-(JNIEnv *env, jobject jthis, jstring jpath, jobjectArray jlocks)
+(JNIEnv *env, jobject jthis, jobject jpath, jobjectArray jlocks)
 {
   JNIEntry(SVNAdmin, rmlocks);
   SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
@@ -434,7 +436,7 @@ Java_org_apache_subversion_javahl_SVNAdm
       return;
     }
 
-  JNIStringHolder path(jpath);
+  File path(jpath);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -444,3 +446,45 @@ Java_org_apache_subversion_javahl_SVNAdm
 
   cl->rmlocks(path, locks);
 }
+
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNAdmin_upgrade
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jnotifyCallback)
+{
+  JNIEntry(SVNAdmin, upgrade);
+  SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+
+  File path(jpath);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  ReposNotifyCallback callback(jnotifyCallback);
+
+  cl->upgrade(path, jnotifyCallback != NULL ? &callback : NULL);
+}
+
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNAdmin_pack
+(JNIEnv *env, jobject jthis, jobject jpath, jobject jnotifyCallback)
+{
+  JNIEntry(SVNAdmin, pack);
+  SVNAdmin *cl = SVNAdmin::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+
+  File path(jpath);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  ReposNotifyCallback callback(jnotifyCallback);
+
+  cl->pack(path, jnotifyCallback != NULL ? &callback : NULL);
+}

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Aug 10 22:07:24 2010
@@ -33,7 +33,7 @@
 #include "Revision.h"
 #include "RevisionRange.h"
 #include "EnumMapper.h"
-#include "NotifyCallback.h"
+#include "ClientNotifyCallback.h"
 #include "ConflictResolverCallback.h"
 #include "ProgressListener.h"
 #include "CommitMessage.h"
@@ -43,6 +43,7 @@
 #include "DiffSummaryReceiver.h"
 #include "BlameCallback.h"
 #include "ProplistCallback.h"
+#include "PatchCallback.h"
 #include "LogMessageCallback.h"
 #include "InfoCallback.h"
 #include "StatusCallback.h"
@@ -354,7 +355,7 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
-  NotifyCallback *notify2 = NotifyCallback::makeCNotify(jnotify2);
+  ClientNotifyCallback *notify2 = ClientNotifyCallback::makeCNotify(jnotify2);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1608,25 +1609,6 @@ Java_org_apache_subversion_javahl_SVNCli
   cl->cancelOperation();
 }
 
-JNIEXPORT jobject JNICALL
-Java_org_apache_subversion_javahl_SVNClient_info
-(JNIEnv *env, jobject jthis, jstring jpath)
-{
-  JNIEntry(SVNClient, info);
-  SVNClient *cl = SVNClient::getCppObject(jthis);
-  if (cl == NULL)
-    {
-      JNIUtil::throwError("bad C++ this");
-      return NULL;
-    }
-
-  JNIStringHolder path(jpath);
-  if (JNIUtil::isExceptionThrown())
-    return NULL;
-
-  return cl->info(path);
-}
-
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_addToChangelist
 (JNIEnv *env, jobject jthis, jobject jtargets, jstring jchangelist,
@@ -1784,3 +1766,31 @@ Java_org_apache_subversion_javahl_SVNCli
   cl->info2(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
             changelists, &callback);
 }
+
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_patch
+(JNIEnv *env, jobject jthis, jstring jpatchPath, jstring jtargetPath,
+ jboolean jdryRun, jint jstripCount, jboolean jreverse,
+ jboolean jignoreWhitespace, jboolean jremoveTempfiles, jobject jcallback)
+{
+  JNIEntry(SVNClient, patch);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError("bad C++ this");
+      return;
+    }
+
+  JNIStringHolder patchPath(jpatchPath);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  JNIStringHolder targetPath(jtargetPath);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  PatchCallback callback(jcallback);
+  cl->patch(patchPath, targetPath, jdryRun ? true : false, (int) jstripCount,
+            jreverse ? true : false, jignoreWhitespace ? true : false,
+            jremoveTempfiles ? true : false, &callback);
+}

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNAdmin.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNAdmin.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNAdmin.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNAdmin.java Tue Aug 10 22:07:24 2010
@@ -26,8 +26,10 @@ package org.apache.subversion.javahl;
 import java.util.Set;
 import java.io.OutputStream;
 import java.io.InputStream;
+import java.io.File;
 
 import org.apache.subversion.javahl.SVNAdmin.MessageReceiver;
+import org.apache.subversion.javahl.callback.ReposNotifyCallback;
 
 public interface ISVNAdmin {
 
@@ -60,8 +62,8 @@ public interface ISVNAdmin {
 	 * @param fstype                the type of the filesystem (BDB or FSFS)
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void create(String path, boolean disableFsyncCommit,
-			boolean keepLog, String configPath, String fstype)
+	public abstract void create(File path, boolean disableFsyncCommit,
+			boolean keepLog, File configPath, String fstype)
 			throws ClientException;
 
 	/**
@@ -71,24 +73,24 @@ public interface ISVNAdmin {
 	 * @param end               end revision
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void deltify(String path, Revision start, Revision end)
+	public abstract void deltify(File path, Revision start, Revision end)
 			throws ClientException;
 
 	/**
 	 * dump the data in a repository
 	 * @param path              the path to the repository
 	 * @param dataOut           the data will be outputed here
-	 * @param errorOut          the messages will be outputed here
 	 * @param start             the first revision to be dumped
 	 * @param end               the last revision to be dumped
 	 * @param incremental       the dump will be incremantal
 	 * @param useDeltas         the dump will contain deltas between nodes
+     * @param callback          the callback to recieve notifications
 	 * @throws ClientException  throw in case of problem
 	 * @since 1.5
 	 */
-	public abstract void dump(String path, OutputStream dataOut,
-                OutputStream errorOut, Revision start, Revision end,
-                boolean incremental, boolean useDeltas)
+	public abstract void dump(File path, OutputStream dataOut,
+                Revision start, Revision end, boolean incremental,
+                boolean useDeltas, ReposNotifyCallback callback)
 			throws ClientException;
 
 	/**
@@ -99,7 +101,7 @@ public interface ISVNAdmin {
 	 *                          repository
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void hotcopy(String path, String targetPath,
+	public abstract void hotcopy(File path, File targetPath,
 			boolean cleanLogs) throws ClientException;
 
 	/**
@@ -108,7 +110,7 @@ public interface ISVNAdmin {
 	 * @param receiver          interface to receive the logfile names
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void listDBLogs(String path, MessageReceiver receiver)
+	public abstract void listDBLogs(File path, MessageReceiver receiver)
 			throws ClientException;
 
 	/**
@@ -117,7 +119,7 @@ public interface ISVNAdmin {
 	 * @param receiver          interface to receive the logfile names
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void listUnusedDBLogs(String path, MessageReceiver receiver)
+	public abstract void listUnusedDBLogs(File path, MessageReceiver receiver)
 			throws ClientException;
 
 	/**
@@ -135,10 +137,11 @@ public interface ISVNAdmin {
 	 * @throws ClientException  throw in case of problem
 	 * @since 1.5
 	 */
-	public abstract void load(String path, InputStream dataInput,
-			OutputStream messageOutput, boolean ignoreUUID, boolean forceUUID,
-			boolean usePreCommitHook, boolean usePostCommitHook,
-			String relativePath) throws ClientException;
+	public abstract void load(File path, InputStream dataInput,
+			boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook,
+            boolean usePostCommitHook, String relativePath,
+            ReposNotifyCallback callback)
+        throws ClientException;
 
 	/**
 	 * list all open transactions in a repository
@@ -146,7 +149,7 @@ public interface ISVNAdmin {
 	 * @param receiver          receives one transaction name per call
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void lstxns(String path, MessageReceiver receiver)
+	public abstract void lstxns(File path, MessageReceiver receiver)
 			throws ClientException;
 
 	/**
@@ -154,7 +157,8 @@ public interface ISVNAdmin {
 	 * @param path              the path to the repository
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract long recover(String path) throws ClientException;
+	public abstract long recover(File path, ReposNotifyCallback callback)
+            throws ClientException;
 
 	/**
 	 * remove open transaction in a repository
@@ -162,7 +166,7 @@ public interface ISVNAdmin {
 	 * @param transactions      the transactions to be removed
 	 * @throws ClientException  throw in case of problem
 	 */
-	public abstract void rmtxns(String path, String[] transactions)
+	public abstract void rmtxns(File path, String[] transactions)
 			throws ClientException;
 
 	/**
@@ -181,7 +185,7 @@ public interface ISVNAdmin {
 	 * @throws SubversionException If a problem occurs.
 	 * @since 1.5.0
 	 */
-	public abstract void setRevProp(String path, Revision rev, String propName,
+	public abstract void setRevProp(File path, Revision rev, String propName,
 			String propValue, boolean usePreRevPropChangeHook,
 			boolean usePostRevPropChangeHook) throws SubversionException;
 
@@ -190,13 +194,14 @@ public interface ISVNAdmin {
 	 * <code>start</code> and <code>end</code>.
 	 *
 	 * @param path              the path to the repository
-	 * @param messageOut        the receiver of all messages
 	 * @param start             the first revision
 	 * @param end               the last revision
+     * @param callback          the callback to recieve notifications
 	 * @throws ClientException If an error occurred.
 	 */
-	public abstract void verify(String path, OutputStream messageOut,
-			Revision start, Revision end) throws ClientException;
+	public abstract void verify(File path, Revision start, Revision end,
+                ReposNotifyCallback callback)
+            throws ClientException;
 
 	/**
 	 * list all locks in the repository
@@ -204,7 +209,7 @@ public interface ISVNAdmin {
 	 * @throws ClientException  throw in case of problem
 	 * @since 1.2
 	 */
-	public abstract Set<Lock> lslocks(String path) throws ClientException;
+	public abstract Set<Lock> lslocks(File path) throws ClientException;
 
 	/**
 	 * remove multiple locks from the repository
@@ -213,7 +218,24 @@ public interface ISVNAdmin {
 	 * @throws ClientException  throw in case of problem
 	 * @since 1.2
 	 */
-	public abstract void rmlocks(String path, String[] locks)
+	public abstract void rmlocks(File path, String[] locks)
 			throws ClientException;
 
+    /**
+     * upgrade the repository format
+     * @param path              the path to the repository
+     * @param callback          for notification
+	 * @throws ClientException  throw in case of problem
+     */
+    public abstract void upgrade(File path, ReposNotifyCallback callback)
+			throws ClientException;
+
+    /**
+     * pack the repository
+     * @param path              the path to the repository
+     * @param callback          for notification
+	 * @throws ClientException  throw in case of problem
+     */
+    public abstract void pack(File path, ReposNotifyCallback callback)
+			throws ClientException;
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Aug 10 22:07:24 2010
@@ -179,7 +179,7 @@ public interface ISVNClient
      *               file operations.
      * @since 1.2
      */
-    void notification2(NotifyCallback notify);
+    void notification2(ClientNotifyCallback notify);
 
     /**
      * Set the conflict resolution callback.
@@ -947,4 +947,21 @@ public interface ISVNClient
      */
     void upgrade(String path)
             throws ClientException;
+    
+    /**
+     * Apply a unidiff patch.
+     * @param patchPath        the path of the patch
+     * @param targetPath       the path to be patched
+     * @param dryRun           whether to actually modify the local content
+     * @param stripCount       how many leading path components should be removed
+     * @param reverse          whether to reverse the patch
+     * @param ignoreWhitespace whether to ignore whitespace
+     * @param removeTempfiles  whether to remove temp files
+     * @param callback         a handler to receive information as files are patched
+     * @throws ClientException
+     */
+    void patch(String patchPath, String targetPath, boolean dryRun,
+               int stripCount, boolean reverse, boolean ignoreWhitespace,
+               boolean removeTempfiles, PatchCallback callback)
+            throws ClientException;
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNAdmin.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNAdmin.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNAdmin.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNAdmin.java Tue Aug 10 22:07:24 2010
@@ -26,6 +26,9 @@ package org.apache.subversion.javahl;
 import java.util.Set;
 import java.io.OutputStream;
 import java.io.InputStream;
+import java.io.File;
+
+import org.apache.subversion.javahl.callback.ReposNotifyCallback;
 
 /**
  * This class offers the same commands as the svnadmin commandline
@@ -98,8 +101,8 @@ public class SVNAdmin implements ISVNAdm
      * @param fstype                the type of the filesystem (BDB or FSFS)
      * @throws ClientException  throw in case of problem
      */
-    public native void create(String path, boolean disableFsyncCommit,
-                              boolean keepLog, String configPath,
+    public native void create(File path, boolean disableFsyncCommit,
+                              boolean keepLog, File configPath,
                               String fstype) throws ClientException;
 
     /**
@@ -109,25 +112,12 @@ public class SVNAdmin implements ISVNAdm
      * @param end               end revision
      * @throws ClientException  throw in case of problem
      */
-    public native void deltify(String path, Revision start, Revision end)
+    public native void deltify(File path, Revision start, Revision end)
             throws ClientException;
 
-    /**
-     * dump the data in a repository
-     * @param path              the path to the repository
-     * @param dataOut           the data will be outputed here
-     * @param errorOut          the messages will be outputed here
-     * @param start             the first revision to be dumped
-     * @param end               the last revision to be dumped
-     * @param incremental       the dump will be incremantal
-     * @param useDeltas         the dump will contain deltas between nodes
-     * @throws ClientException  throw in case of problem
-     * @since 1.5
-     */
-    public native void dump(String path, OutputStream dataOut,
-                            OutputStream errorOut, Revision start,
-                            Revision end, boolean incremental,
-                            boolean useDeltas)
+    public native void dump(File path, OutputStream dataOut,
+                            Revision start, Revision end, boolean incremental,
+                            boolean useDeltas, ReposNotifyCallback callback)
             throws ClientException;
 
     /**
@@ -138,7 +128,7 @@ public class SVNAdmin implements ISVNAdm
      *                          repository
      * @throws ClientException  throw in case of problem
      */
-    public native void hotcopy(String path, String targetPath,
+    public native void hotcopy(File path, File targetPath,
                                boolean cleanLogs) throws ClientException;
 
     /**
@@ -147,7 +137,7 @@ public class SVNAdmin implements ISVNAdm
      * @param receiver          interface to receive the logfile names
      * @throws ClientException  throw in case of problem
      */
-    public native void listDBLogs(String path, MessageReceiver receiver)
+    public native void listDBLogs(File path, MessageReceiver receiver)
             throws ClientException;
 
     /**
@@ -156,7 +146,7 @@ public class SVNAdmin implements ISVNAdm
      * @param receiver          interface to receive the logfile names
      * @throws ClientException  throw in case of problem
      */
-    public native void listUnusedDBLogs(String path, MessageReceiver receiver)
+    public native void listUnusedDBLogs(File path, MessageReceiver receiver)
             throws ClientException;
 
     /**
@@ -171,25 +161,10 @@ public class SVNAdmin implements ISVNAdm
         public void receiveMessageLine(String message);
     }
 
-    /**
-     * load the data of a dump into a repository,
-     * @param path              the path to the repository
-     * @param dataInput         the data input source
-     * @param messageOutput     the target for processing messages
-     * @param ignoreUUID        ignore any UUID found in the input stream
-     * @param forceUUID         set the repository UUID to any found in the
-     *                          stream
-     * @param usePreCommitHook  use the pre-commit hook when processing commits
-     * @param usePostCommitHook use the post-commit hook when processing commits
-     * @param relativePath      the directory in the repository, where the data
-     *                          in put optional.
-     * @throws ClientException  throw in case of problem
-     * @since 1.5
-     */
-    public native void load(String path, InputStream dataInput,
-                            OutputStream messageOutput, boolean ignoreUUID,
-                            boolean forceUUID, boolean usePreCommitHook,
-                            boolean usePostCommitHook, String relativePath)
+    public native void load(File path, InputStream dataInput,
+                            boolean ignoreUUID, boolean forceUUID,
+                            boolean usePreCommitHook, boolean usePostCommitHook,
+                            String relativePath, ReposNotifyCallback callback)
             throws ClientException;
 
     /**
@@ -198,15 +173,11 @@ public class SVNAdmin implements ISVNAdm
      * @param receiver          receives one transaction name per call
      * @throws ClientException  throw in case of problem
      */
-    public native void lstxns(String path, MessageReceiver receiver)
+    public native void lstxns(File path, MessageReceiver receiver)
             throws ClientException;
 
-    /**
-     * recover the berkeley db of a repository, returns youngest revision
-     * @param path              the path to the repository
-     * @throws ClientException  throw in case of problem
-     */
-    public native long recover(String path) throws ClientException;
+    public native long recover(File path, ReposNotifyCallback callback)
+            throws ClientException;
 
     /**
      * remove open transaction in a repository
@@ -214,7 +185,7 @@ public class SVNAdmin implements ISVNAdm
      * @param transactions      the transactions to be removed
      * @throws ClientException  throw in case of problem
      */
-    public native void rmtxns(String path, String [] transactions)
+    public native void rmtxns(File path, String[] transactions)
             throws ClientException;
 
     /**
@@ -233,24 +204,14 @@ public class SVNAdmin implements ISVNAdm
      * @throws SubversionException If a problem occurs.
      * @since 1.5.0
      */
-    public native void setRevProp(String path, Revision rev,
+    public native void setRevProp(File path, Revision rev,
                                   String propName, String propValue,
                                   boolean usePreRevPropChangeHook,
                                   boolean usePostRevPropChangeHook)
             throws SubversionException;
 
-    /**
-     * Verify the repository at <code>path</code> between revisions
-     * <code>start</code> and <code>end</code>.
-     *
-     * @param path              the path to the repository
-     * @param messageOut        the receiver of all messages
-     * @param start             the first revision
-     * @param end               the last revision
-     * @throws ClientException If an error occurred.
-     */
-    public native void verify(String path, OutputStream messageOut,
-                              Revision start, Revision end)
+    public native void verify(File path, Revision start, Revision end,
+                              ReposNotifyCallback callback)
             throws ClientException;
 
     /**
@@ -259,7 +220,7 @@ public class SVNAdmin implements ISVNAdm
      * @throws ClientException  throw in case of problem
      * @since 1.2
      */
-    public native Set<Lock> lslocks(String path) throws ClientException;
+    public native Set<Lock> lslocks(File path) throws ClientException;
 
     /**
      * remove multiple locks from the repository
@@ -268,6 +229,10 @@ public class SVNAdmin implements ISVNAdm
      * @throws ClientException  throw in case of problem
      * @since 1.2
      */
-    public native void rmlocks(String path, String [] locks)
+    public native void rmlocks(File path, String[] locks)
             throws ClientException;
+
+    public native void upgrade(File path, ReposNotifyCallback callback);
+
+    public native void pack(File path, ReposNotifyCallback callback);
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Tue Aug 10 22:07:24 2010
@@ -174,7 +174,7 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.2
      */
-    public native void notification2(NotifyCallback notify);
+    public native void notification2(ClientNotifyCallback notify);
 
     /**
      * @since 1.5
@@ -508,14 +508,6 @@ public class SVNClient implements ISVNCl
             throws ClientException;
 
     /**
-     * @deprecated Use {@link #info2(String, Revision, Revision, int, String[],
-     *                               InfoCallback)} instead.
-     * @since 1.0
-     */
-    public native Info info(String path)
-            throws ClientException;
-
-    /**
      * @since 1.5
      */
     public native void addToChangelist(Set<String> paths, String changelist,
@@ -625,4 +617,14 @@ public class SVNClient implements ISVNCl
                              Collection<String> changelists,
                              InfoCallback callback)
             throws ClientException;
+    
+    /**
+     * @since 1.7
+     */
+    public native void patch(String patchPath, String targetPath,
+                             boolean dryRun, int stripCount, boolean reverse,
+                             boolean ignoreWhitespace, boolean removeTempfiles,
+                             PatchCallback callback)
+            throws ClientException;
+
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info.java Tue Aug 10 22:07:24 2010
@@ -24,6 +24,7 @@
 package org.tigris.subversion.javahl;
 
 import java.util.Date;
+import java.io.File;
 
 /**
  * Give information about one subversion item (file or directory) in the
@@ -143,16 +144,32 @@ public class Info implements java.io.Ser
     /**
      * A backward-compat constructor
      */
-    public Info(org.apache.subversion.javahl.Info aInfo)
+    public Info(org.apache.subversion.javahl.Info2 aInfo)
     {
-        this(aInfo.getName(), aInfo.getUrl(), aInfo.getUuid(),
-             aInfo.getRepository(), aInfo.getSchedule().ordinal(),
-             NodeKind.fromApache(aInfo.getNodeKind()),
-             aInfo.getAuthor(), aInfo.getRevision(),
-             aInfo.getLastChangedRevision(), aInfo.getLastChangedDate(),
-             aInfo.getLastDateTextUpdate(), aInfo.getLastDatePropsUpdate(),
-             aInfo.isCopied(), aInfo.isDeleted(), aInfo.isAbsent(),
-             aInfo.isIncomplete(), aInfo.getCopyRev(), aInfo.getCopyUrl());
+        this((new File(aInfo.getPath())).getName(), aInfo.getUrl(),
+             aInfo.getReposUUID(), aInfo.getReposRootUrl(),
+             aInfo.getSchedule().ordinal(),
+             NodeKind.fromApache(aInfo.getKind()),
+             aInfo.getLastChangedAuthor(), aInfo.getRev(),
+             aInfo.getLastChangedRev(), aInfo.getLastChangedDate(),
+             aInfo.getTextTime(), aInfo.getPropTime(), aInfo.getCopyFromUrl() != null,
+             aInfo.getSchedule() == org.apache.subversion.javahl.Info2.ScheduleKind.delete,
+             checkAbsent(aInfo.getPath()), checkIncomplete(aInfo.getPath()),
+             aInfo.getCopyFromRev(), aInfo.getCopyFromUrl());
+    }
+    
+    private static boolean checkAbsent(String path)
+    {
+    	File f = new File(path);
+    	return !f.exists();
+    }
+    
+    /** See if the path is incomplete.  We currently have no way of getting
+     *  this information from the existing info struct, so just return false.
+     */
+    private static boolean checkIncomplete(String path)
+    {
+    	return false;
     }
 
     /**

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/NotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/NotifyInformation.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/NotifyInformation.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/NotifyInformation.java Tue Aug 10 22:07:24 2010
@@ -149,7 +149,7 @@ public class NotifyInformation extends E
      * A backward-compat callback.
      */
     public NotifyInformation(
-                        org.apache.subversion.javahl.NotifyInformation aInfo)
+                        org.apache.subversion.javahl.ClientNotifyInformation aInfo)
     {
         this(aInfo.getPath(),
              fromAAction(aInfo.getAction()),
@@ -272,7 +272,7 @@ public class NotifyInformation extends E
     }
 
     private static int
-    fromAStatus(org.apache.subversion.javahl.NotifyInformation.Status aStatus)
+    fromAStatus(org.apache.subversion.javahl.ClientNotifyInformation.Status aStatus)
     {
         switch(aStatus)
         {
@@ -297,7 +297,7 @@ public class NotifyInformation extends E
     }
 
     private static int
-    fromAAction(org.apache.subversion.javahl.NotifyInformation.Action aAction)
+    fromAAction(org.apache.subversion.javahl.ClientNotifyInformation.Action aAction)
     {
         if (aAction == null)
             return -1;

Modified: subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java?rev=984234&r1=984233&r2=984234&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java (original)
+++ subversion/branches/ignore-mergeinfo/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java Tue Aug 10 22:07:24 2010
@@ -28,6 +28,56 @@ package org.tigris.subversion.javahl;
  *
  * @since 1.4.0
  */
-public class Path extends org.apache.subversion.javahl.Path
+public class Path
 {
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        org.apache.subversion.javahl.NativeResources.loadNativeLibrary();
+    }
+
+    /**
+     * A valid path is a UTF-8 string without any control characters.
+     *
+     * @return Whether Subversion can store the path in a repository.
+     */
+    public static boolean isValid(String path)
+    {
+        try {
+            byte[] bytes = path.getBytes("UTF-8");
+
+            for (byte b : bytes)
+            {
+                if (b < 0x20)
+                    return false;
+            }
+
+            return true;
+        }
+        catch (Exception ex)
+        {
+            return false;
+        }
+    }
+
+    /**
+     * Whether a URL is valid. Implementation may behave differently
+     * than <code>svn_path_is_url()</code>.
+     *
+     * @param path The Subversion "path" to inspect.
+     * @return Whether <code>path</code> is a URL.
+     * @throws IllegalArgumentException If <code>path</code> is
+     * <code>null</code>.
+     */
+    public static boolean isURL(String path)
+    {
+        if (path == null)
+        {
+            throw new IllegalArgumentException();
+        }
+        // Require at least "s://".
+        return (path.indexOf("://") > 0);
+    }
 }