Dan,
The following patch is more cleanup work for the JavaHL info
implementation. I've done a things on the JavaHL side, but the major
changes are in in libsvn_client/info.c. The idea being that we already
are opening the entry in libsvn_client, why not just pull the four
relevant boolean values from it there, instead of reopening the entry in
JavaHL? Of course, this adds overhead for every invocation of info,
whether it is JavaHL bindings related or not, but that overhead is
small, and substantially helps the JavaHL bindings.
If there is another way of calculating the same information, without
having to modify svn_info_t, I'm interested in learning it.
Anyway, this is just an idea, and I'm interested in any feedback.
This patch passes 'make check-javahl' for me, including testBasicInfo2().
-Hyrum
[[[
JavaHL: Further cleanups to info() implementation. The major change
here is that we move a slight bit of backwards compat code from the
JavaHL bindings into libsvn_client proper. See the following thread for
discussion on the topic:
[insert link to relevant thread here]
* subversion/include/svn_client.h
(svn_info_t): Add four boolean flags used for JavaHL backwards
computability.
* subversion/libsvn_client/info.c
(build_info_from_entry): Populate the new members of svn_info_t with
the respective members of the svn_wc_entry_t.
[ in subversion/bindings/javahl/ ]
* native/InfoCallback.h,
native/InfoCallback.cpp
(setWcPath, wcPath): Remove
(createJavaInfo2): Do not open the entry for the given path, instead,
just use the flags in svn_info_t.
* native/SVNClient.cpp
(info): Do not set the wcPath in the info callback, as it is no longer
needed. Also, trap the "entry not found error" from
svn_client_info(). We don't need to catch this error, because we will
handle it in the java wrapper.
* src/org/tigris/subversion/javahl/SVNClient.java
(info): Detect the fact that no Info2 objects were returned, and
return null in this case. Update comments to reflect this.
]]]
Received on Mon Apr 9 20:39:13 2007