vscode-perforce icon indicating copy to clipboard operation
vscode-perforce copied to clipboard

Inline annotations

Open mjcrouch opened this issue 5 years ago • 0 comments

GitLens supports the ability to perform line-by-line blame on the current file in a variety of ways. It adds the annotations to the currently open file (instead of creating a new read only file) and includes changes that have been made to the local file, including when those changes are made.

Currently the perforce annotate view opens a new window with the current state of the document in perforce, not taking in to account the working changes.

I'm not really sure how this is done in GitLens - i.e. how it determines the age of workspace edits - if there's an API to help with this or if it's tracked in the extension

A simple way of doing it for a static view would be to parse the p4 diff (-dc or -dn), decorate the working file and add or change the decoration where a line has been added or removed

However this would not really be practical for a 'current line' blame that updates while you are working - in this case we would need to keep track of what's been changed since we last did a diff, which could be quite difficult - not just looking at which lines have changed but also whether they are still different after being changed back

mjcrouch avatar Mar 13 '20 18:03 mjcrouch