-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code comments don't work when changing the number of lines #67
Comments
I can confirm this bug. It seems like a design flaw or like CodeCommentsPlugin has been designed before Trac was able to adjust the size of the context. The line number the comment is linked to refers to a line number of the diff, not of the original or changed file. While version control guarantees that the set of changes making up a changeset will never be altered, this is not guaranteed for the diff. The diff changes depending on the "number of lines around each change". The diff might even change depending on the algorithm that is used for diffing. Note that the bug is also reproducible the other way around:
|
Also note that it happens with all parameters of the diff view:
All of these settings influence what is being shown on the screen, and the code comment is referenced to what is shown on the screen, not the actual line of code. |
I'm almost finished writing a fix for that. In order to keep things simple I would like to migrate any old comments from line-comments (inside the diff) to changeset-comments (at the very bottom of the changeset). The information about what line of the diff the comment was originally created on would be added to the text of each comment. This allows for not having to maintain the old functionality of attaching a comment to a line of the diff. @rjollos what do you think? |
When changing the number of lines shown in a diff the code comments fail to work correctly unless they are viewed at the same line.
Steps:
The text was updated successfully, but these errors were encountered: