You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Duncan Murdoch <mu...@stats.uwo.ca> on 2006/02/05 13:34:34 UTC
History of a line?
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.)
Duncan Murdoch
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: History of a line?
Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
On 2/6/2006 12:06 PM, kfogel@collab.net wrote:
> Duncan Murdoch <mu...@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
Re: History of a line?
Posted by kf...@collab.net.
Duncan Murdoch <mu...@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.
-Karl
--
www.collab.net <> CollabNet | Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org