Annotate files
Annotating a file (also known as blame) displays revision information for each line directly in the editor. This helps you identify when a line was last changed, who made the change, and which changelist introduced it.
On this page:
Annotate a file
-
Open the file you want to annotate in the editor.
-
Select View from the Menu bar.
-
Open the Command Palette.
-
Type P4: Annotate, and then press Enter
Revision information appears in the editor gutter next to each line of the file.
Understand annotation information
Each annotated line displays the following details:
-
Revision number: The depot revision that last changed the line.
-
User: The P4 user who made the change.
-
Description: The changelist description (truncated).
-
Time ago: How long ago the change was made (for example, 3 days ago).
This information helps you trace the origin and context of changes without leaving the editor.
Control how annotations follow history
By default, annotation follows file history across branches and integrations. You can see the original author of each line, even if the file was branched or integrated from another location.
To restrict annotation to the current file’s revision history only and ignore integrations, deselect the Annotate: Follow Branches setting under Extensions > P4 VS Code.