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

Re: how to search body of all revisions?

From: Mike Dixon <michael.dixon_at_denovosoftware.com>
Date: Tue, 19 Jan 2010 09:45:07 -0800

Felix Saphir wrote:
> saurabh kumar schrieb:
>> Hi, A coder apparently overwrote some piece of code and then future
>> revisions naturally did not have that piece of code.
>> I need to find which revision had that piece of text.
>> Is there a way I can search across all revisions to find that piece
>> of text for a given file in my repository?
> Not that I'm aware of. Do you have a logmessage that you could search for?
> The only other possibility I know is to get a full repo dump and search
> for your code there.

svn blame may be able to point you in the right direction, but I don't
know of a way to make it show when lines were removed. Still, if you
know where the missing code was located in the file, you may be able to
figure it out from changes to the surrounding lines.

If you don't have any luck with that, I've been handling this problem
with a kind of binary search. ie. if the file was created in r1 and HEAD
is currently r1000, I'd manually check if r500 had the missing text,
then r250 or r750 as appropriate, and so on. Usually only takes me a few
minutes to find the exact revision that removed it.

I hear vague rumors of "svn find" or "svn grep" commands that exist in
concept, but I don't think there are any current plans to do anything
about it.



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-01-19 18:45:24 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

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