Skip to content

Fixes #118 and #119#121

Open
cagdas001 wants to merge 4 commits intobillsedison:tc-devfrom
cagdas001:fix-line-commits
Open

Fixes #118 and #119#121
cagdas001 wants to merge 4 commits intobillsedison:tc-devfrom
cagdas001:fix-line-commits

Conversation

@cagdas001
Copy link
Copy Markdown

@cagdas001 cagdas001 commented Jan 4, 2019

Fixes #118 #119

  • getBlameForFileRevision and blame_revision functions have been implemented, in order to get blame data of lines for specific revisions/commits.

  • Even though line numbers are different (document has changes), the target line will be detected correctly.

  • CommentLine, which has To and From fields, has been implemented.

    • Details about BitBucket API comments endpoint

      • to:

      The comment's anchor line in the new version of the file.

      • from:

      The comment's anchor line in the old version of the file.

    • It was adding and getting all comments in/from to field before, now it detects the field which should be used, and sends/gets the line number within it. This field is important if you'll add/show (or other actions) on a deleted/added/changed line.

    • To understand the difference and importance of these fields, see the screencast.

2019-01-04_03-43-27

  • NOTE: There are still some parts using the Line field of Comment Therefore we're keeping it for now, not to cause any issue in other parts

TESTED CASES

For your reference. Below cases tested on my side and haven't had any issue.

  • In the edit mode (not the DiffView)
    • Show/Add/Delete/Edit/Reply on any line from old commits (take blame annotation as reference)
    • Show/Add/Delete/Edit/Reply on a line that is affected by the current commit. (take blame annotation as reference)
      Note: In the Edit mode, Current commit is the last commit that made a change on this file
    • Repeat above cases on the BitBucket website and check if VSCode side is fully compatible.
    • Make a change in the file, that changes the line numbers from above steps.
    • Repeat above cases.
  • In the DiffView (Commit Search -> Select a commit -> Select a file)
    • On the right side (the revision/commit we're reviewing)
      • Select an unchanged (neither coloured as green nor red) line and Show/Add/Edit/Reply/Delete functionalities. Check BitBucket side to see all functions are working and affecting well on both sides
      • Select a line changed or added (green) in this revision and check the above functionalities on both sides.
    • On the left side (previous revision to compare changes)
      • Select an unchanged (neither coloured as green nor red) line and Show/Add/Edit/Reply/Delete functionalities. Check BitBucket side to see all functions are working and affecting well on both sides.
      • Select a line deleted (red) in the new revision and check the above functionalities on both sides.

Your actions should affect only the related line, even if their line numbers would be same.

KNOWN ISSUE

In case of multiple DiffViews are opened, only the last one will work properly with the existing code. So I have not fixed it and went with the same way that the existing code uses. Let me know if we need to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant