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

Re: Bugs in new JavaHL merge tracking API's

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-06-05 03:04:04 CEST

This simple test shows the prolbem #2 with getCopySource().

    public void testCopySourceException() throws Throwable
    {
        OneTest thisTest = new OneTest();
        CopySource src = client.getCopySource(thisTest.getWCPath(),
Revision.HEAD);
    }

This one should be easy to fix. The C++ code is just trying to
construct a Java revision with -1 and it does not want to accept that
value.

Mark

On 6/4/07, Mark Phippard <markphip@gmail.com> wrote:
> Here is a test you can use locally to produce the crash in #1 below.
> Just paste it into BasicTests.java.
>
> /**
> * Test the basic functionality of {@link
> * org.tigris.subversion.javahl.SVNClientInterface#getMergeInfo(}).
> * @throws Throwable
> * @since 1.5
> */
> public void testMergeInfoCrash() throws Throwable
> {
> OneTest thisTest = new OneTest();
> File localPath = new File(thisTest.getWCPath(), "notesWC");
> client.checkout("http://svn.collab.net/repos/svn/trunk/notes",
> localPath.toString(),
> Revision.HEAD, Revision.HEAD, 1, true, true);
> MergeInfo mergeInfo =
> client.getMergeInfo(localPath.toString(), Revision.HEAD);
> System.out.println(mergeInfo.toString());
> }
>
>
>
> Mark
>
>
> On 6/4/07, Mark Phippard <markphip@gmail.com> wrote:
> > Ran into a couple of bugs in some of the new merge-tracking related
> > API's in JavaHL. I imagine some of these are not just in JavaHL.
> >
> > 1) getMergeInfo(localPath, Revision.HEAD) crashes the JVM when called
> > on a WC from an http repository. In this case, it was tigris.org (SVN
> > 1.3.x). To recreate, checkout:
> >
> > svn co http://subclipse.tigris.org/svn/subclipse/trunk/subclipse/feature
> >
> > Chosen because it is small and demonstrates the problem.
> >
> > Recreated this problem on Windows and OSX.
> >
> > 2) getCopySource(localPath, Revision.HEAD) when called on a local
> > path that has never been copied gives these errors:
> >
> > Exception in thread "main" java.lang.IllegalArgumentException: Invalid
> > (negative) revision number: -1
> > at org.tigris.subversion.javahl.Revision$Number.<init>(Revision.java:216)
> > at org.tigris.subversion.javahl.Revision.getInstance(Revision.java:127)
> > at org.tigris.subversion.javahl.SVNClient.getCopySource(Native Method)
> > at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getCopySource(AbstractJhlClientAdapter.java:2034)
> > at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getCopySource(AbstractJhlClientAdapter.java:2025)
> >
> >
> > I think the problem is that the C++ code is trying to create null
> > revision objects for the path by using a value of -1. But that is not
> > a value the JavaHL Revision class will accept. This problem does not
> > appear to cause any additional problems other than the exception being
> > logged.
> >
> > Let me know if you would rather I file issues in the issue tracker.
> >
> > --
> > Thanks
> >
> > Mark Phippard
> > http://markphip.blogspot.com/
> >
>
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 5 03:04:17 2007

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.