Hi, Your arguments sounds fine from a first reading but it is far from my area of expertise.
I'll try to find some time in the next week to review this and to dig further into the background. Cheers, Daniel Den mån 5 maj 2025 kl 17:04 skrev Timofei Zhakov <t...@chemodax.net>: > Hi again, > > I made several patches which will fix the issue. > svn-info-assert-path.patch.txt and svn-info-fix-revision-kind.patch.txt > files are attached to this email. > > Any thoughts? > > On Fri, May 2, 2025 at 4:20 PM Timofei Zhakov <t...@chemodax.net> wrote: > >> 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 >> > > > -- > Timofei Zhakov >