[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1456006 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ src/org/tigris/subversion/javahl/ tests/org/apache/subversion/javahl/

From: Mark Phippard <markphip_at_gmail.com>
Date: Fri, 15 Mar 2013 12:57:25 -0400

Just starting to do some JavaHL review as requested.

There is a problem with how this change was made. The rules for changing a
method are pretty much the same as they are for C. We cannot simply add
new options to the existing method we need to add those in a "move2" method.

In the SVNClient class, we can then have the old method just call the new
method. If you look in the old tigris packages you will see a lot of
example of this. When we renamed the package in 1.7 we were able to
jettison all of that cruft, but now we have to start adding it back again.

I do not know if this is the only instance of this problem, but so far it
is the only one I see in my usage of the API in Subclipse. We obviously do
not use every method though.

Mark

On Wed, Mar 13, 2013 at 11:36 AM, <philip_at_apache.org> wrote:

> Author: philip
> Date: Wed Mar 13 15:36:23 2013
> New Revision: 1456006
>
> URL: http://svn.apache.org/r1456006
> Log:
> Update JavaHL to support the 1.8 allow_mixed_revisions flag to move.
>
> [In subversion/bindings/javahl]
>
> * native/SVNClient.h
> * native/SVNClient.cpp
> (SVNClient::move): Add allowMixRev parameter.
>
> * native/org_apache_subversion_javahl_SVNClient.cpp
> (Java_org_apache_subversion_javahl_SVNClient_move): Add allowMixRev
> parameter.
>
> * src/org/apache/subversion/javahl/ISVNClient.java
> (ISVNClient.move): Add allowMixRev parameter.
>
> * src/org/apache/subversion/javahl/SVNClient.java
> (SVNClient.move): Add allowMixRev parameter.
>
> * src/org/tigris/subversion/javahl/SVNClient.java
> (SVNClient.move): Pass true for allowMixRev.
>
> * tests/org/apache/subversion/javahl/BasicTests.java
> (BasicTests.testMove, BasicTests.testTreeConflict): Pass false for
> allowMixRev.
>
> 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/src/org/tigris/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=1456006&r1=1456005&r2=1456006&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
> (original)
> +++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Wed
> Mar 13 15:36:23 2013
> @@ -469,7 +469,7 @@ void SVNClient::copy(CopySources &copySo
>
> void SVNClient::move(Targets &srcPaths, const char *destPath,
> CommitMessage *message, bool force, bool moveAsChild,
> - bool makeParents, bool metadataOnly,
> + bool makeParents, bool metadataOnly, bool
> allowMixRev,
> RevpropTable &revprops, CommitCallback *callback)
> {
> SVN::Pool subPool(pool);
> @@ -487,7 +487,7 @@ void SVNClient::move(Targets &srcPaths,
> SVN_JNI_ERR(svn_client_move7((apr_array_header_t *) srcs,
> destinationPath.c_str(), moveAsChild,
> makeParents,
> - FALSE /* allow_mixed_revisions */,
> + allowMixRev,
> metadataOnly,
> revprops.hash(subPool),
> CommitCallback::callback, callback, ctx,
>
> Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=1456006&r1=1456005&r2=1456006&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
> (original)
> +++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Wed Mar
> 13 15:36:23 2013
> @@ -126,7 +126,7 @@ class SVNClient :public SVNBase
> RevpropTable &revprops, CommitCallback *callback);
> void move(Targets &srcPaths, const char *destPath,
> CommitMessage *message, bool force, bool moveAsChild,
> - bool makeParents, bool metadataOnly,
> + bool makeParents, bool metadataOnly, bool allowMixRev,
> RevpropTable &revprops, CommitCallback *callback);
> void copy(CopySources &copySources, const char *destPath,
> CommitMessage *message, bool copyAsChild, bool makeParents,
>
> 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=1456006&r1=1456005&r2=1456006&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
> Wed Mar 13 15:36:23 2013
> @@ -552,8 +552,8 @@ JNIEXPORT void JNICALL
> Java_org_apache_subversion_javahl_SVNClient_move
> (JNIEnv *env, jobject jthis, jobject jsrcPaths, jstring jdestPath,
> jboolean jforce, jboolean jmoveAsChild, jboolean jmakeParents,
> - jboolean jmetadataOnly, jobject jrevpropTable, jobject jmessage,
> - jobject jcallback)
> + jboolean jmetadataOnly, jboolean jallowMixRev, jobject jrevpropTable,
> + jobject jmessage, jobject jcallback)
> {
> JNIEntry(SVNClient, move);
>
> @@ -583,7 +583,7 @@ Java_org_apache_subversion_javahl_SVNCli
> CommitCallback callback(jcallback);
> cl->move(srcPaths, destPath, &message, jforce ? true : false,
> jmoveAsChild ? true : false, jmakeParents ? true : false,
> - jmetadataOnly ? true: false,
> + jmetadataOnly ? true: false, jallowMixRev ? true : false,
> revprops, jcallback ? &callback : NULL);
> }
>
>
> 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=1456006&r1=1456005&r2=1456006&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
> Wed Mar 13 15:36:23 2013
> @@ -323,6 +323,9 @@ public interface ISVNClient
> * children of <code>destPath</code>.
> * @param makeParents Whether to create intermediate parents.
> * @param metadataOnly Move just the metadata and not the working
> files/dirs
> + * @param allowMixRev If true use copy and delete without move
> tracking
> + * when a srcPath is mixed-revision, if false
> return
> + * an error when a srcPath is mixed-revision.
> * @param revpropTable A string-to-string mapping of revision
> properties
> * to values which will be set if this operation
> * results in a commit.
> @@ -332,7 +335,7 @@ public interface ISVNClient
> */
> void move(Set<String> srcPaths, String destPath, boolean force,
> boolean moveAsChild, boolean makeParents, boolean
> metadataOnly,
> - Map<String, String> revpropTable,
> + boolean allowMixRev, Map<String, String> revpropTable,
> CommitMessageCallback handler, CommitCallback callback)
> throws ClientException;
>
>
> 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=1456006&r1=1456005&r2=1456006&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
> Wed Mar 13 15:36:23 2013
> @@ -207,6 +207,7 @@ public class SVNClient implements ISVNCl
> public native void move(Set<String> srcPaths, String destPath,
> boolean force, boolean moveAsChild,
> boolean makeParents, boolean metadataOnly,
> + boolean allowMixRev,
> Map<String, String> revpropTable,
> CommitMessageCallback handler, CommitCallback
> callback)
> throws ClientException;
>
> 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=1456006&r1=1456005&r2=1456006&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
> Wed Mar 13 15:36:23 2013
> @@ -1067,6 +1067,7 @@ public class SVNClient implements SVNCli
> aSVNClient.move(new HashSet<String>(Arrays.asList(srcPaths)),
> destPath, force, moveAsChild, makeParents,
> false /* metadataOnly */,
> + true /* allowMixRev */,
> revpropTable,
> message == null ? cachedHandler
> : new ConstMsg(message),
>
> 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=1456006&r1=1456005&r2=1456006&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
> Wed Mar 13 15:36:23 2013
> @@ -1027,7 +1027,7 @@ public class BasicTests extends SVNTests
> }
> client.move(srcPaths,
> new File(thisTest.getWorkingCopy(),
> "A/B/F").getPath(),
> - false, true, false, false, null, null, null);
> + false, true, false, false, false, null, null, null);
>
> // Commit the changes, and check the state of the WC.
> checkCommitRevision(thisTest,
> @@ -3190,7 +3190,7 @@ public class BasicTests extends SVNTests
> }
> client.move(srcPaths,
> new File(thisTest.getWorkingCopy(),
> "A/B/F").getPath(),
> - false, true, false, false, null, null, null);
> + false, true, false, false, false, null, null, null);
>
> // Commit the changes, and check the state of the WC.
> checkCommitRevision(thisTest,
>
>
>

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2013-03-15 17:57:57 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.