You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2007/04/20 21:32:49 UTC

[PATCH] JavaHL list API update

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The following patch updates the JavaHL list implementation to use the
most recent version of svn_client_list.  The callback addition and other
changes were straightforward, except for the implementation of the
compatibility wrapper.

There was a semantic change between svn_client_ls3() and
svn_client_list() which accounted for in svn_client_ls3()'s
implementation of the wrapper.  I believe that I've captured the same
changes in the MyListCallback class, but want to make sure.

- -Hyrum

[[[
JavaHL: Update to the most recent version of the client API.

[ in subversion/bindings/javahl/ ]
* native/org_tigris_subversion_javahl_SVNClient.cpp
  (list): Use the new list interface in SVNClient.

* native/SVNClient.h,
  native/SVNClient.cpp
  (createJavaDirEntry): Move to ListCallback.
  (list): Update to use svn_client_list2().

* native/ListCallback.h,
  native/ListCallback.cpp
  New callback class.  Include createJavaDirEntry() from SVNClient.

* src/org/tigris/subversion/javahl/DirEntry.java
  (absPath): New data member.
  (DirEntry): Add the absolute path to the constructor.
  (getAbsPath): Getter function.
  (setPath): Setter function.  Used by the compatibility wrapper.

* src/org/tigris/subversion/javahl/SVNClient.java
  (list): New overloaded function.
  (list): Implement as a thin wrapper around the new version of list().
  (MyListCallback): Callback used to implement the thin wrapper.

* src/org/tigris/subversion/javahl/SVNClientInterface.java,
  src/org/tigris/subversion/javahl/SVNClientSynchronized.java
  (list): New overloaded function.

* src/org/tigris/subversion/javahl/ListCallback.java
  New callback interface.
]]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGKTFbCwOubk4kUXwRAr7MAJ4sdj95LJA22RFKrG8piTeJQb2MJwCgumV8
tMXKVOOqJWoBiS1C/MPrzcE=
=lgQ0
-----END PGP SIGNATURE-----

Re: [PATCH] JavaHL list API update

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Mark Phippard wrote:
> On 4/21/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>> Mark Phippard wrote:
>> > On 4/20/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>> >> -----BEGIN PGP SIGNED MESSAGE-----
>> >> Hash: SHA1
>> >>
>> >> The following patch updates the JavaHL list implementation to use the
>> >> most recent version of svn_client_list.  The callback addition and
>> other
>> >> changes were straightforward, except for the implementation of the
>> >> compatibility wrapper.
>> >>
>> >> There was a semantic change between svn_client_ls3() and
>> >> svn_client_list() which accounted for in svn_client_ls3()'s
>> >> implementation of the wrapper.  I believe that I've captured the same
>> >> changes in the MyListCallback class, but want to make sure.
>> >
>> > In the DirEntry class you change the constructor.  You have to add a
>> > new one and leave the old one intact, else you are breaking
>> > compatibility.
>>
>> The DirEntry constructor is documented as only being used by the JNI
>> code.  As such, I don't believe that it constitutes a public interface.
> 
> Right.  OK.
> 
>> > The MyListCallback looks OK.  I am just trusting that you are right
>> > about the semantic change since I have not looked at the C API.  I am
>> > a little confused about what exactly the change was though.
>>
>> So was I, honestly.  The biggest change that I noticed is that the
>> svn_client_list2() produces one more dirent than svn_client_ls3() if
>> called for a directory.  The extra entry being for the directory the
>> list was performed on.
>>
>> The other issue is that if a list is performed on a file, it's name is
>> not included in the path that's returned.  Perhaps someone more familiar
>> with the implementations can comment.
> 
> So if the old C methods were modified to call this new function do
> they provide a similar workaround to maintain compatibility?

Yes.  And the C wrappers were the basis for the code in the
MyListCallback wrapper.

Committed in r24712.

-Hyrum


Re: [PATCH] JavaHL list API update

Posted by Mark Phippard <ma...@gmail.com>.
On 4/21/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> Mark Phippard wrote:
> > On 4/20/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> The following patch updates the JavaHL list implementation to use the
> >> most recent version of svn_client_list.  The callback addition and other
> >> changes were straightforward, except for the implementation of the
> >> compatibility wrapper.
> >>
> >> There was a semantic change between svn_client_ls3() and
> >> svn_client_list() which accounted for in svn_client_ls3()'s
> >> implementation of the wrapper.  I believe that I've captured the same
> >> changes in the MyListCallback class, but want to make sure.
> >
> > In the DirEntry class you change the constructor.  You have to add a
> > new one and leave the old one intact, else you are breaking
> > compatibility.
>
> The DirEntry constructor is documented as only being used by the JNI
> code.  As such, I don't believe that it constitutes a public interface.

Right.  OK.

> > The MyListCallback looks OK.  I am just trusting that you are right
> > about the semantic change since I have not looked at the C API.  I am
> > a little confused about what exactly the change was though.
>
> So was I, honestly.  The biggest change that I noticed is that the
> svn_client_list2() produces one more dirent than svn_client_ls3() if
> called for a directory.  The extra entry being for the directory the
> list was performed on.
>
> The other issue is that if a list is performed on a file, it's name is
> not included in the path that's returned.  Perhaps someone more familiar
> with the implementations can comment.

So if the old C methods were modified to call this new function do
they provide a similar workaround to maintain compatibility?

-- 
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

Re: [PATCH] JavaHL list API update

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Phippard wrote:
> On 4/20/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> The following patch updates the JavaHL list implementation to use the
>> most recent version of svn_client_list.  The callback addition and other
>> changes were straightforward, except for the implementation of the
>> compatibility wrapper.
>>
>> There was a semantic change between svn_client_ls3() and
>> svn_client_list() which accounted for in svn_client_ls3()'s
>> implementation of the wrapper.  I believe that I've captured the same
>> changes in the MyListCallback class, but want to make sure.
> 
> In the DirEntry class you change the constructor.  You have to add a
> new one and leave the old one intact, else you are breaking
> compatibility.

The DirEntry constructor is documented as only being used by the JNI
code.  As such, I don't believe that it constitutes a public interface.

> The MyListCallback looks OK.  I am just trusting that you are right
> about the semantic change since I have not looked at the C API.  I am
> a little confused about what exactly the change was though.

So was I, honestly.  The biggest change that I noticed is that the
svn_client_list2() produces one more dirent than svn_client_ls3() if
called for a directory.  The extra entry being for the directory the
list was performed on.

The other issue is that if a list is performed on a file, it's name is
not included in the path that's returned.  Perhaps someone more familiar
with the implementations can comment.

- -Hyrum

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGKrvHCwOubk4kUXwRAgKrAKCgoDrL8m0VKQu6z3+W72x9+8OtIgCgvGaI
arkgmIED+3o01G9J3DJGr6E=
=zeZF
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] JavaHL list API update

Posted by Mark Phippard <ma...@gmail.com>.
On 4/20/07, Hyrum K. Wright <hy...@mail.utexas.edu> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The following patch updates the JavaHL list implementation to use the
> most recent version of svn_client_list.  The callback addition and other
> changes were straightforward, except for the implementation of the
> compatibility wrapper.
>
> There was a semantic change between svn_client_ls3() and
> svn_client_list() which accounted for in svn_client_ls3()'s
> implementation of the wrapper.  I believe that I've captured the same
> changes in the MyListCallback class, but want to make sure.

In the DirEntry class you change the constructor.  You have to add a
new one and leave the old one intact, else you are breaking
compatibility.

The MyListCallback looks OK.  I am just trusting that you are right
about the semantic change since I have not looked at the C API.  I am
a little confused about what exactly the change was though.

-- 
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