Hi,

I was consuming the Subversion API, especially requesting the working copy
information, and noticed a little bit of weird behaviour when the WORKING
revision kind was specified. For some reason, it makes a request to a
server, even if it shouldn't. However, if svn_opt_revision_unspecified
revision kind is passed instead, everything works perfectly as a local
working copy operation.

I dug down into the implementation a little bit, and noticed this block of
code: [1]. Here, info decides whether to do a lookup into WC DB or make an
RA request. However, the branch for local info is being invoked only if the
kind of both revision and peg revision are 'unspecified', but 'working'
doesn't trigger it. Maybe, the svn_opt_revision_base revision kind should
be considered as local, but I'm not sure, because there is a reason for
svn_client_info4 to execute on the target itself but not its working and
base variants if you get what I mean. But this is a reason against
supporting info for 'working' revision. Still, this must be either
disallowed or optimised. What do you think?

Also, I noticed that it doesn't assert the abspath_or_url argument whether
it's a local abspath or not. This may cause a crash later on.

Am I right with this or is there conceptual proof behind?

[1]
https://github.com/apache/subversion/blob/54e2d898f180c47050d0fc788f75ab5e2e43f6e1/subversion/libsvn_client/info.c#L353

-- 
Timofei Zhakov

Reply via email to