Author: brane
Date: Sun Feb 8 02:56:55 2015
New Revision: 1658127
URL: http://svn.apache.org/r1658127
Log:
On the pin-externals branch: Update the JavaHL ISVNClient.copy() method and
its implementation to match recent changes to svn_client_copy7.
Note that this is just interface adaptation, semantics will follow.
[in subversion/bindings/javahl]
* src/org/apache/subversion/javahl/ISVNClient.java,
src/org/apache/subversion/javahl/SVNClient.java
(ISVNClient.copy): Add parameter externalsToPin.
* native/SVNClient.h, native/SVNClient.cpp
(SVNClient::copy): Add jexternalsToPin parameter, but ignore it for now.
* native/org_apache_subversion_javahl_SVNClient.cpp
(Java_org_apache_subversion_javahl_SVNClient_copy)
Update signature and pass the jexternalsToPin parameter ti SVNClient::copy.
* tests/org/apache/subversion/javahl/BasicTests.java
(BasicTests.testCopy, BasicTests.setupAndPerformMerge):
Update calls to ISVNClient.copy.
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
Sun Feb 8 02:56:55 2015
@@ -445,7 +445,8 @@ void SVNClient::commit(Targets &targets,
void SVNClient::copy(CopySources ©Sources, const char *destPath,
CommitMessage *message, bool copyAsChild,
- bool makeParents, bool ignoreExternals, bool pinExternals,
+ bool makeParents, bool ignoreExternals,
+ bool pinExternals, jobject jexternalsToPin,
PropertyTable &revprops, CommitCallback *callback)
{
SVN::Pool subPool(pool);
@@ -462,7 +463,7 @@ void SVNClient::copy(CopySources ©So
SVN_JNI_ERR(svn_client_copy7(srcs, destinationPath.c_str(),
copyAsChild, makeParents, ignoreExternals,
- pinExternals,
+ pinExternals, /* FIXME: */NULL,
revprops.hash(subPool),
CommitCallback::callback, callback,
ctx, subPool.getPool()), );
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
Sun Feb 8 02:56:55 2015
@@ -150,6 +150,7 @@ class SVNClient :public SVNBase
void copy(CopySources ©Sources, const char *destPath,
CommitMessage *message, bool copyAsChild, bool makeParents,
bool ignoreExternals, bool pinExternals,
+ jobject jexternalsToPin,
PropertyTable &revprops, CommitCallback *callback);
void commit(Targets &targets, CommitMessage *message, svn_depth_t depth,
bool noUnlock, bool keepChangelist,
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
Sun Feb 8 02:56:55 2015
@@ -559,8 +559,8 @@ JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_copy
(JNIEnv *env, jobject jthis, jobject jcopySources, jstring jdestPath,
jboolean jcopyAsChild, jboolean jmakeParents, jboolean jignoreExternals,
- jboolean jpinExternals, jobject jrevpropTable, jobject jmessage,
- jobject jcallback)
+ jboolean jpinExternals, jobject jexternalsToPin,
+ jobject jrevpropTable, jobject jmessage, jobject jcallback)
{
JNIEntry(SVNClient, copy);
@@ -591,9 +591,9 @@ Java_org_apache_subversion_javahl_SVNCli
return;
CommitCallback callback(jcallback);
- cl->copy(copySources, destPath, &message, jcopyAsChild ? true : false,
- jmakeParents ? true : false, jignoreExternals ? true : false,
- jpinExternals ? true : false,
+ cl->copy(copySources, destPath, &message,
+ bool(jcopyAsChild), bool(jmakeParents),
+ bool(jignoreExternals), bool(jpinExternals), jexternalsToPin,
revprops, jcallback ? &callback : NULL);
}
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
Sun Feb 8 02:56:55 2015
@@ -378,6 +378,18 @@ public interface ISVNClient
* as part of this operation.
* @param pinExternals Whether or not to pin external definitions as part
* of this operation.
+ * @param externalsToPin The set of externals to pin.
+ * Keys are either local absolute paths (when the source of the
+ * copy is the working copy) or URLs within the repository
+ * (when the source is the repository) where an
+ * <code>svn:externals</code> property is defined.
+ * Values are lists of parsed {@link ExternalItem}
+ * objects from each external definitions.
+ * If <code>pinExternals</code> is <code>true</code>, only
+ * the externals in this set will be pinned; if this parameter
+ * is <code>null</code>, all externals will be pinned.
+ * If <code>pinExternals</code> is <code>false</code>,
+ * this parameter will be ignored.
* @param revpropTable A string-to-string mapping of revision properties
* to values which will be set if this operation
* results in a commit.
@@ -385,10 +397,12 @@ public interface ISVNClient
* if <code>destPath</code> is not a URL
* @throws ClientException If the copy operation fails.
* @throws NullPointerException if the <code>sources</code> list is empty.
+ * @since 1.9
*/
void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
boolean ignoreExternals, boolean pinExternals,
+ Map<String, List<ExternalItem>> externalsToPin,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback callback)
throws ClientException;
@@ -397,7 +411,8 @@ public interface ISVNClient
* Copy versioned paths with the history preserved.
* <p>
* Behaves like the 1.9 version with
- * <code>pinExternals = false</code> and
+ * <code>pinExternals<code> set to <code>false</code> and
+ * <code>externalsToPin<code> set to <code>null</code>.
*/
void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Sun Feb 8 02:56:55 2015
@@ -241,6 +241,7 @@ public class SVNClient implements ISVNCl
public native void copy(List<CopySource> sources, String destPath,
boolean copyAsChild, boolean makeParents,
boolean ignoreExternals, boolean pinExternals,
+ Map<String, List<ExternalItem>> externalsToPin,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback
callback)
throws ClientException;
@@ -253,7 +254,7 @@ public class SVNClient implements ISVNCl
throws ClientException
{
copy(sources, destPath, copyAsChild, makeParents, ignoreExternals,
- false, revpropTable, handler, callback);
+ false, null, revpropTable, handler, callback);
}
public native void move(Set<String> srcPaths, String destPath,
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1658127&r1=1658126&r2=1658127&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Sun Feb 8 02:56:55 2015
@@ -1060,7 +1060,7 @@ public class BasicTests extends SVNTests
}
client.copy(sources,
new File(thisTest.getWorkingCopy(), "A/B/F").getPath(),
- true, false, false, null, null, null);
+ true, false, false, false, null, null, null, null);
// Commit the changes, and check the state of the WC.
checkCommitRevision(thisTest,
@@ -1077,7 +1077,7 @@ public class BasicTests extends SVNTests
"A/B").getPath(), Revision.WORKING,
Revision.WORKING));
client.copy(wcSource, thisTest.getUrl() + "/parent/A/B",
- true, true, false, null,
+ true, true, false, false, null, null,
new ConstMsg("Copy WC to URL"), null);
// update the WC to get new folder and confirm the copy
@@ -3003,7 +3003,7 @@ public class BasicTests extends SVNTests
srcs.add(new CopySource(thisTest.getUrl() + "/A", Revision.HEAD,
Revision.HEAD));
client.copy(srcs, thisTest.getUrl() + "/branches/A",
- true, false, false, null,
+ true, false, false, false, null, null,
new ConstMsg("create A branch"), null);
// update the WC (to r3) so that it has the branches folder