[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: possible improvement to svn log with "forward" revision range

From: Avalon <third-chance_at_gmx.de>
Date: Fri, 20 May 2011 01:01:49 +0200

>>> There are now two different issues brought up in these thread:
>>>
>>> 1. For 'svn log -rX:Y PATH_at_PEG, where Y> PEG, don't croak when PATH_at_Y
>>> doesn't exist. Instead, automatically substitute for Y the last revision
>>> in
>>> which PATH_at_THAT-REV *did* exist, and continue the operation. I believe
>>> this
>>> is something that we can reasonably achieve without too much trouble and,
>>> more importantly, in a client-side change (which helps with client/server
>>> compatibility).
>>
>> As far as i know the history is always collected from youngest to oldest
>> revision (not the other way around).
>> Your suggestion to modify Y to the latest revision where PATH_at_PEG still
>> exists looks like the easiest approach.
>> But i could not yet figure out how to perform this operation.
>>
>> Could you give me an advice how this could be realized or point me to some
>> other code area where a similar "forward" traversal/search is performed?
>> May be with some hints i can carry on with this by myself.
>>
>
> This might help: http://svn.haxx.se/dev/archive-2011-04/0215.shtml

Indeed - this helped a lot - thank you for this valuable hint.

Now i have a prototype working which can partly handle the previously mentioned case (1):
   svn log -rX:Y PATH_at_PEG
     where Y > X and Y > PEG even if PATH_at_PEG has been deleted in revision Z, where PEG < Z < Y

(Until now it only works for Y = HEAD but this is hopefully easy to fix)

Since this is my first time digging into subversion it is very likely that i did something totally wrong (any suggestions are highly appreciated).
Currently i do use these additional functions:
- svn_ra_get_session_url
- svn_client__path_relative_to_root
- svn_ra_get_deleted_rev
in order to modify Y before calling svn_ra_get_log2 in subversion/libsvn_client/log.c:svn_client_log5().

I will try to get the case Y != HEAD working [and check if anything is broken] and send a diff as soon as i have is working.

Dirk
Received on 2011-05-20 01:02:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.