You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/01 03:03:09 UTC
svn commit: r1527844 - in /subversion/trunk/subversion/bindings/javahl:
native/ src/org/apache/subversion/javahl/ tests/org/apache/subversion/javahl/
Author: brane
Date: Tue Oct 1 01:03:09 2013
New Revision: 1527844
URL: http://svn.apache.org/r1527844
Log:
Add an overload to JavaHL's ISVNClient.info2 that exposes the new
arguments from svn_client_info3.
[in subversion/bindings/javahl/src/org/apache/subversion/javahl]
* ISVNClient.java (info2): Added new overload that exposes parameters
fetchExcluded and fetchActualOnly.
* SVNClient.java (info2): Change native method prototype and
implement the old overload in terms of the new one.
[in subversion/bindings/javahl/native]
* SVNClient.h, SVNClient.cpp (SVNClient::info2): Added the
fetchExcluded and fetchActualOnly parameters.
* org_apache_subversion_javahl_SVNClient.cpp
(Java_org_apache_subversion_javahl_SVNClient_info2): Likewise.
[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
* BasicTests.java (collectInfos): Use the new info2 overload.
Modified:
subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.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=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Tue Oct 1 01:03:09 2013
@@ -1420,9 +1420,10 @@ jobject SVNClient::revProperties(const c
}
void
-SVNClient::info2(const char *path, Revision &revision, Revision &pegRevision,
- svn_depth_t depth, StringArray &changelists,
- InfoCallback *callback)
+SVNClient::info2(const char *path,
+ Revision &revision, Revision &pegRevision, svn_depth_t depth,
+ svn_boolean_t fetchExcluded, svn_boolean_t fetchActualOnly,
+ StringArray &changelists, InfoCallback *callback)
{
SVN_JNI_NULL_PTR_EX(path, "path", );
@@ -1437,7 +1438,7 @@ SVNClient::info2(const char *path, Revis
SVN_JNI_ERR(svn_client_info3(checkedPath.c_str(),
pegRevision.revision(),
revision.revision(),
- depth, FALSE, TRUE,
+ depth, fetchExcluded, fetchActualOnly,
changelists.array(subPool),
InfoCallback::callback, callback,
ctx, subPool.getPool()), );
Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Tue Oct 1 01:03:09 2013
@@ -66,9 +66,10 @@ class SVNClient :public SVNBase
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);
+ void info2(const char *path,
+ Revision &revision, Revision &pegRevision, svn_depth_t depth,
+ svn_boolean_t fetchExcluded, svn_boolean_t fetchActualOnly,
+ StringArray &changelists, InfoCallback *callback);
void unlock(Targets &targets, bool force);
void lock(Targets &targets, const char *comment, bool force);
jobject revProperties(const char *path, Revision &revision);
Modified: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Oct 1 01:03:09 2013
@@ -1795,8 +1795,9 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_info2
(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision, jobject jdepth, jobject jchangelists,
- jobject jinfoCallback)
+ jobject jpegRevision, jobject jdepth,
+ jboolean jfetchExcluded, jboolean jfetchActualOnly,
+ jobject jchangelists, jobject jinfoCallback)
{
JNIEntry(SVNClient, info2);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1823,6 +1824,7 @@ Java_org_apache_subversion_javahl_SVNCli
InfoCallback callback(jinfoCallback);
cl->info2(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
+ svn_boolean_t(jfetchExcluded), svn_boolean_t(jfetchActualOnly),
changelists, &callback);
}
Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Oct 1 01:03:09 2013
@@ -1133,7 +1133,56 @@ public interface ISVNClient
throws ClientException;
/**
+ * Invoke <code>callback</code> to return information
+ * <code>pathOrUrl</code> in <code>revision</code>. The
+ * information returned is system-generated metadata, not the sort
+ * of "property" metadata created by users.
+ * <p>
+ * If both revision arguments are either <code>null</code> or
+ * {@link Revision#START}, then information will be pulled solely
+ * from the working copy; no network connections will be made.
+ * <p>
+ * Otherwise, information will be pulled from a repository. The
+ * actual node revision selected is determined by the
+ * <code>pathOrUrl</code> as it exists in
+ * <code>pegRevision</code>. If <code>pegRevision</code> is
+ * {@link Revision#START}, then it defaults to {@link
+ * Revision#HEAD} for URLs or {@link Revision#WORKING} for WC
+ * targets.
+ * <p>
+ * If <code>pathOrUrl</code> is not a local path, then if
+ * <code>revision</code> is {@link Revision#PREVIOUS} (or some
+ * other kind that requires a local path), an error will be
+ * returned, because the desired revision cannot be determined.
+ * <p>
+ * If <code>pathOrUrl</code> is a file, just invoke the callback on it. If it
+ * is a directory, then descend according to <code>depth</code>.
+ * <p>
+ * @param pathOrUrl the path or the url of the item
+ * @param revision the revision of the item to return
+ * @param pegRevision the revision to interpret pathOrUrl
+ * @param depth the depth to recurse
+ * @param fetchExcluded when <code>true</code>, retreive
+ * information about nodes that are excluded from the working copy
+ * @param fetchActualOnly when <code>true</code>, retreive
+ * information about node that are not versioned, but are still
+ * tree conflicted.
+ * @param changelists if non-null, filter paths using changelists
+ * @param callback a callback to receive the infos retrieved
+ * @since 1.9
+ */
+ void info2(String pathOrUrl,
+ Revision revision, Revision pegRevision, Depth depth,
+ boolean fertchExcluded, boolean fetchActualOnly,
+ Collection<String> changelists, InfoCallback callback)
+ throws ClientException;
+
+ /**
* Retrieve information about repository or working copy items.
+ * <p>
+ * Behaves like the 1.9 version, with <code>fetchExcluded</code>
+ * set to <code>false</code> and <code>fetchActualOnly</code> set
+ * to <code>true</code>.
* @param pathOrUrl the path or the url of the item
* @param revision the revision of the item to return
* @param pegRevision the revision to interpret pathOrUrl
Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Tue Oct 1 01:03:09 2013
@@ -662,10 +662,21 @@ public class SVNClient implements ISVNCl
public native void info2(String pathOrUrl, Revision revision,
Revision pegRevision, Depth depth,
+ boolean fetchExcluded, boolean fetchActualOnly,
Collection<String> changelists,
InfoCallback callback)
throws ClientException;
+ public void info2(String pathOrUrl, Revision revision,
+ Revision pegRevision, Depth depth,
+ Collection<String> changelists,
+ InfoCallback callback)
+ throws ClientException
+ {
+ info2(pathOrUrl, revision, pegRevision, depth,
+ false, true, changelists, callback);
+ }
+
public native void patch(String patchPath, String targetPath,
boolean dryRun, int stripCount, boolean reverse,
boolean ignoreWhitespace, boolean removeTempfiles,
Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1527844&r1=1527843&r2=1527844&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Tue Oct 1 01:03:09 2013
@@ -4002,8 +4002,8 @@ public class BasicTests extends SVNTests
{
final List<Info> infos = new ArrayList<Info>();
- client.info2(pathOrUrl, revision, pegRevision, depth, changelists,
- new InfoCallback () {
+ client.info2(pathOrUrl, revision, pegRevision, depth, true, true,
+ changelists, new InfoCallback () {
public void singleInfo(Info info)
{ infos.add(info); }
});