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

Re: Find a deleted file and WC-NG

From: Gavin \ <gavin.baumanis_at_palcare.com.au>
Date: Thu, 14 Apr 2011 12:55:42 +1000

Hi Greg,

Thanks for the reply and indulging my naive questions...

But I have a few more, please.

If the information is appropriately stored in the repository, and can be resolved somewhat via doing svn log / text searches;
Why can't a function ;
getTheLastRevisionAndPathThisFileExisted(filename, repo://startingPath); be created? that does that process for me under the hood?

Is it simply a case of "someone" needing to do the required work of creating the function(s) and API?

If function(s) already exist to get various pieces of the puzzle (within svn log, in this case) - then it would "seem" that what is missing is someone to come and do the "wiring" of existing functions together to obtain the end-result .

(Again I realise I could be (am) naive to complexities of svn code)
But a "wiring" task of existing code using existing APIs seems like a "relatively" easier path than write it from scratch - particularly for a newcomer.
And gets the benefit of using units of code that have already been well tested / exercised, too.

Gavin.

On 14/04/2011, at 11:37 AM, Greg Stein wrote:

> Hey Gavin,
>
> That information is only in the repository (on the server). Historical
> details of deletions are not stored on the client, so wc-ng is not
> going to change anything here.
>
> The only solid way to do this from a client is with 'svn log', like
> you stated in your original email. And the algorithm really should
> start at the *latest* revision and move backwards toward r1, based on
> the assumption you want the *latest* revision where a path is deleted
> (remember that it could have been deleted, re-added, and then deleted
> again... many times). If it weren't for the re-add possibility, then a
> binary search would be best... but nope. Step backwards one revision
> at a time.
>
> You could maybe improve your 'svn log' delay by starting at the end
> and requesting (say) 100 revs at a time and looking for the deletion.
> Then move to the previous 100.
>
> Cheers,
> -g
>
> On Wed, Apr 13, 2011 at 21:26, Gavin "Beau" Baumanis
> <gavin.baumanis_at_palcare.com.au> wrote:
>> Hi Everyone,
>>
>> Recently @users;
>> I asked for some help with how to find revision / path of a file that was previously deleted.
>> http://svn.haxx.se/users/archive-2011-04/0135.shtml
>>
>> In one of the responses, Stefan suggested that I look through this thread;
>> http://svn.haxx.se/users/archive-2011-04/0151.shtml
>>
>> and also mentioned the use of;
>> svnsearch and fisheye for data mining the repository.
>>
>> My question isn't so much about getting an answer to my original question - but does follow-on from it.
>>
>> Will WC-NG and more specifically the fact that it is a SQLite database, allow me to find the revision and path of a deleted file, more easily : directly via SQL / SQL Wrappers?
>>
>> Does an appropriate function / API already exist for this in 1.7?
>> And if not - would it seem like an appropriate task for a newbie, from a SVN development POV (me), to take on?
>>
>> There's a learning curve to be sure;
>> I need to get acquainted with HACKING / the header files / etc..
>>
>> But assuming I get through all that;
>> It seems like much of the work will be in SQL with appropriate wrappers / public API - which at the surface doesn't seem like an unsurmountable task.
>>
>> I suppose what I am after now is;
>> Do data mining functions exist already in 1.7 - thus - "nothing to do here".
>>
>> Is it an appropriately task for a new developer to take on?
>> I'm happy to get talked into / out of it - as existing developers you have a far greater understanding than I do.
>>
>> Gavin.
Received on 2011-04-14 04:56:24 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.