It's all about the answers!

Ask a question

Is there a way to find all the changes that affect a specific line of code?


Daniel Reilly (1431620) | asked Mar 04 '15, 9:13 p.m.
History will find all the changes for a file.  Is there a way to filter that, or execute an extended search, that finds all changes to a specific line within the file?

Comments
Geoffrey Clemm commented Mar 05 '15, 12:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that the "changes to a specific line" will always be somewhat ambiguous.  All an SCM system knows is a series of file versions that have been checked in.  Whether a given line is considered "the same", "modified", or "deleted" from one version to the next depends upon the specific diff tool you are using.

Accepted answer


permanent link
Evan Hughes (2.4k1318) | answered Mar 05 '15, 10:54 a.m.
JAZZ DEVELOPER
In the Eclipse client, you can select the file in the Package Explorer, open the context menu, and run 'Team - Annotate' on the file. That will show a column on the left side of the editor that you can hover your mouse over to see who edited it last. (If you want to see the previous edit, select the preceding change set in the History view and run Annotate from the context menu)

You can also get blame in the command line by running 'lscm annotate'. 
Daniel Reilly selected this answer as the correct answer

Comments
1
Kevin Ramer commented Mar 05 '15, 10:59 a.m.

Don't you mean assign blame :-)


Evan Hughes commented Mar 05 '15, 12:34 p.m.
JAZZ DEVELOPER

Assign, get, whatever. ;)


(I meant 'blame' in the CVS/SVN sense)


1
Daniel Reilly commented Mar 05 '15, 9:46 p.m.

Thank you.  Annotate was what I was looking for; an aid to track down changes in a module at the line level.


Geoffrey Clemm commented Mar 07 '15, 5:37 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that "annotate" or "blame" only tells you what was the last change on a given line, not all the changes for a given line.

One other answer



permanent link
Atul Kumar (1872329) | answered Mar 05 '15, 12:49 a.m.
Not very sure, but you can try exploring the history API if it has something useful.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.