In case you have no idea on whether path exists in repository or not,
then you indeed may use log (SVNLogClient.doLog(...)) to iterate over
revisions to discover revision in which path exist (set
discoverChanedPaths to 'true' to received map of paths modified in
each revision). It is important to note, that particular path may have
several independent histories, e.g:
r1 A /path
rN D /path
rM A /path
In the above case path at rM is not the same as the one at r1:rN.
In case there are lot of revisions in repository you may then use
binary search - test if path exists (with doInfo()) in
revisionsCount/2 revision, then (if path was not found) test centers
of the halves, etc until you find a path. Then do log for that path
using found revision as a peg to figure out when path was created and
what is the last revision it exists at.
I suppose that binary search may work faster than full repository log,
but using log operation only has a benefit that you will only need
that single operation to run and with the information provided by the
log it will be possible to recreate full history(ies) of a path.
On 11 January 2012 18:41, STEVE INGLE <steveingle@...> wrote:
> Is there any command in svnkit that allows searching through all versions of
> an SVN repository given a URL path. If the path exist in the repository I
> need to get the version number of where it exists. I could always loop thru
> each version and call doinfo each time, but I was wondering if there is more
> elegant way.
> Steve Ingle