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 2011/08/23 16:19:44 UTC
svn commit: r1160705 - in /subversion/trunk/subversion/bindings/javahl:
native/CreateJ.cpp src/org/apache/subversion/javahl/CommitInfo.java
Author: hwright
Date: Tue Aug 23 14:19:43 2011
New Revision: 1160705
URL: http://svn.apache.org/viewvc?rev=1160705&view=rev
Log:
JavaHL: Expose a couple of new values in the commit info struct.
Note: This is *not* a backward incompatable change, but it would still be
nice to get into 1.7.0.
[ in subversion/bindings/javahl/ ]
* native/CreateJ.cpp
(CommitInfo): Create and edit the additional params from the commit info
struct.
* src/org/apache/subversion/javahl/CommitInfo.java
(postCommitError, reposRoot): New data members.
(CommitInfo): Update the ctor.
(getPostCommitError, getReposRoot): New.
Modified:
subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java
Modified: subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp?rev=1160705&r1=1160704&r2=1160705&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp Tue Aug 23 14:19:43 2011
@@ -871,7 +871,8 @@ CreateJ::CommitInfo(const svn_commit_inf
if (midCT == 0)
{
midCT = env->GetMethodID(clazz, "<init>",
- "(JLjava/lang/String;Ljava/lang/String;)V");
+ "(JLjava/lang/String;Ljava/lang/String;"
+ "Ljava/lang/String;Ljava/lang/String;)V");
if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
POP_AND_RETURN_NULL;
}
@@ -886,8 +887,18 @@ CreateJ::CommitInfo(const svn_commit_inf
jlong jRevision = commit_info->revision;
+ jstring jPostCommitError = JNIUtil::makeJString(
+ commit_info->post_commit_err);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN_NULL;
+
+ jstring jReposRoot = JNIUtil::makeJString(commit_info->repos_root);
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN_NULL;
+
// call the Java method
- jobject jInfo = env->NewObject(clazz, midCT, jRevision, jDate, jAuthor);
+ jobject jInfo = env->NewObject(clazz, midCT, jRevision, jDate, jAuthor,
+ jPostCommitError, jReposRoot);
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN_NULL;
Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java?rev=1160705&r1=1160704&r2=1160705&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java Tue Aug 23 14:19:43 2011
@@ -50,13 +50,21 @@ public class CommitInfo implements java.
/** the author of the revision */
String author;
+ /** post commit error (or NULL) */
+ String postCommitError;
+
+ /** repos root (or NULL) */
+ String reposRoot;
+
/** This constructor will be only called from the jni code. */
- public CommitInfo(long rev, String d, String a)
+ public CommitInfo(long rev, String d, String a, String pce, String rr)
throws java.text.ParseException
{
revision = rev;
date = (new LogDate(d)).getDate();
author = a;
+ postCommitError = pce;
+ reposRoot = rr;
}
/**
@@ -82,4 +90,20 @@ public class CommitInfo implements java.
{
return author;
}
+
+ /**
+ * return any post commit error for the commit
+ */
+ public String getPostCommitError()
+ {
+ return postCommitError;
+ }
+
+ /**
+ * return the repos root
+ */
+ public String getReposRoot()
+ {
+ return reposRoot;
+ }
}