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

Re: History of a line?

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: 2006-02-07 00:13:34 CET

On 2/6/2006 12:06 PM, kfogel@collab.net wrote:
> Duncan Murdoch <murdoch@stats.uwo.ca> writes:
>> Is there a relatively easy way to get the history of a particular line
>> (or small group of lines) of source? That is, what I'd like to see is
>> the information that would be in the log for that file, but filtered
>> so that only changes affecting particular lines are shown; it be nice
>> to see the diffs for each of the modifications, but only those that
>> affect the section of interest.
>>
>> The use is this: I'm trying to fix a bug in some obscure code in a
>> project I'm working on. I'm hoping the history of that section of
>> code will throw some light on what the intentions were.
>>
>> I can use svn blame to find when the section of code was last
>> modified, then use it again for the modification before that, etc.,
>> but it's really tedious, and I have to separately look at the log to
>> see the commit messages for those changes. (So far I've tracked
>> backwards through about 5 modifications over 6 years, all of which
>> look like they were incidental formatting changes. I suspect the
>> commit messages aren't going to help me with this one, but I've wanted
>> to do this before; this is just a particularly aggravating instance of
>> it.)
>
> There's no easy way to do this in Subversion. The question itself is
> complex: to a human it's obvious what is "the same line" at different
> points in its history. But when you try to think about it computably,
> it becomes dicey :-).
>
> If you wrote a wrapper around 'svn blame' to do this, I think many
> people would be interested.

Thanks for the response. As you say, it's not trivial, and I probably
won't be able to tackle it. But if someone else does, I'd be happy to
test it out :-).

Duncan Murdoch

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 7 00:14:38 2006

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

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