subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r881143 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/tigris/subversion/javahl/
Date Tue, 17 Nov 2009 03:42:26 GMT
Author: hwright
Date: Tue Nov 17 03:42:25 2009
New Revision: 881143

URL: http://svn.apache.org/viewvc?rev=881143&view=rev
Log:
JavaHL: Punch svn_client_upgrade() through to JavaHL.

[ in subversion/bindings/javahl/ ]
* native/org_tigris_subversion_javahl_SVNClient.cpp
  (Java_org_tigris_subversion_javahl_SVNClient_upgrade): New.

* native/SVNClient.h
  (upgrade): New.

* native/SVNClient.cpp
  (upgrade): New.

* src/org/tigris/subversion/javahl/SVNClientSynchronized.java
  (upgrade): New.

* src/org/tigris/subversion/javahl/SVNClient.java
  (upgrade): New.

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

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=881143&r1=881142&r2=881143&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Tue Nov 17 03:42:25 2009
@@ -1862,6 +1862,21 @@
     return JNIUtil::makeJString(value.str().c_str());
 }
 
+void SVNClient::upgrade(const char *path)
+{
+    SVN::Pool requestPool;
+    SVN_JNI_NULL_PTR_EX(path, "path", );
+
+    svn_client_ctx_t *ctx = getContext(NULL);
+    if (ctx == NULL)
+        return;
+
+    Path checkedPath(path);
+    SVN_JNI_ERR(checkedPath.error_occured(), );
+
+    SVN_JNI_ERR(svn_client_upgrade(path, ctx, requestPool.pool()), );
+}
+
 jobjectArray SVNClient::revProperties(jobject jthis, const char *path,
                                       Revision &revision)
 {

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=881143&r1=881142&r2=881143&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Tue Nov 17 03:42:25 2009
@@ -182,6 +182,7 @@
                       const char *original_value, bool force);
   jstring getVersionInfo(const char *path, const char *trailUrl,
                          bool lastChanged);
+  void upgrade(const char *path);
   jobject propertyGet(jobject jthis, const char *path, const char *name,
                       Revision &revision, Revision &pegRevision);
   void diff(const char *target1, Revision &revision1,

Modified: subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp?rev=881143&r1=881142&r2=881143&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_SVNClient.cpp
Tue Nov 17 03:42:25 2009
@@ -1449,6 +1449,23 @@
   return cl->getVersionInfo(path, trailUrl, jlastChanged ? true:false);
 }
 
+JNIEXPORT void JNICALL Java_org_tigris_subversion_javahl_SVNClient_upgrade
+  (JNIEnv *env, jobject jthis, jstring jpath)
+{
+  JNIEntry(SVNClient, upgrade);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+  JNIStringHolder path(jpath);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  cl->upgrade(path);
+}
+
 JNIEXPORT void JNICALL
 Java_org_tigris_subversion_javahl_SVNClient_enableLogging
 (JNIEnv *env, jclass jclazz, jint jlogLevel, jstring jpath)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=881143&r1=881142&r2=881143&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
Tue Nov 17 03:42:25 2009
@@ -1359,6 +1359,12 @@
             throws ClientException;
 
     /**
+     * @since 1.7
+     */
+    public native void upgrade(String path)
+            throws ClientException;
+
+    /**
      * Enable logging in the JNI-code
      * @param logLevel      the level of information to log (See
      *                      SVNClientLogLevel)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java?rev=881143&r1=881142&r2=881143&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
Tue Nov 17 03:42:25 2009
@@ -1836,4 +1836,15 @@
         }
     }
 
+    /**
+     * @since 1.7
+     */
+    public void upgrade(String path)
+        throws ClientException
+    {
+        synchronized (clazz)
+        {
+            worker.upgrade(path);
+        }
+    }
 }



Mime
View raw message