Is there a way to find all the changes that affect a specific line of code?
![]()
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?
|
Accepted answer
![]()
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
Thank you. Annotate was what I was looking for; an aid to track down changes in a module at the line level.
![]() 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
![]()
Not very sure, but you can try exploring the history API if it has something useful.
|
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.
Comments
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.