Skip to content
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

feat: Adds blame toggle button to toolbar, configuration of SVN path #490

Merged
merged 9 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
A Visual Studio Code extension to SVN blame files.
When run, this extension will place an icon next to each line of your file. Each differently-coloured icon means a different revision. Hovering a line will display a tooltip, showing the committer, date, and message. Blame data will also display inline.

![](/marketplace/example.gif)
<img src="src/img/marketplace/example.gif" width="700">

## Requirements

Expand All @@ -20,6 +20,28 @@ When run, this extension will place an icon next to each line of your file. Each

If you use TortoiseSVN, make sure the option Command Line Tools is checked during installation, and C:\Program Files\TortoiseSVN\bin is available in PATH.

## Features

#### Visually identify lines changed by the same revision

<img src="src/img/marketplace/visual-indicators.png" width="700">

#### Display revision information and logs in line

<img src="src/img/marketplace/inline-blame.png" width="700">

#### Hover line blame to read the full commit log

<img src="src/img/marketplace/blame-hover-message.png" width="700">

#### Auto-blame files as you open them

<img src="src/img/marketplace/auto-blame.gif" width="700">

#### Toggle blame from the toolbar

<img src="src/img/marketplace/toolbar-toggle.gif" width="700">

## Commands

This extension contributes the following commands to the Command palette.
Expand All @@ -37,6 +59,7 @@ This extension contributes the following commands to the Command palette.
| **Auto Blame** | Automatically blames files as you open them. | `true` |
| **Enable Details** | Fetches and displays revision log data in the popup. | `false` |
| **Enable Visual Indicators** | Toggle visual indicators that sit to the left of the line number. | `true` |
| **SVN Executable Path** | Path to svn executable or alternative command. | `"svn"` |

## Known Issues

Expand Down
7 changes: 0 additions & 7 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ let ctx = await esbuild.context({
to: ["./dist/img"],
},
}),
copy({
resolveFrom: "cwd",
assets: {
from: ["./public/**/*"],
to: ["./dist/public"],
},
}),
],
sourcemap: process.argv.includes("--sourcemap"),
});
Expand Down
Binary file removed marketplace/example.gif
Binary file not shown.
Binary file removed marketplace/example.mp4
Binary file not shown.
23 changes: 21 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@
"url": "https://github.com/BeauAgst/blamer-vs/issues"
},
"homepage": "https://github.com/BeauAgst/blamer-vs",
"icon": "dist/public/icon.png",
"icon": "dist/img/marketplace/icon.png",
"engines": {
"vscode": "^1.87.0"
},
"categories": [
"SCM Providers",
"Other"
],
"keywords": [
"svn",
"blame",
"log"
],
"main": "./dist/extension.js",
"activationEvents": [
"onStartupFinished"
Expand All @@ -36,6 +41,7 @@
},
{
"command": "blamer-vs.toggleBlame",
"icon": "$(git-merge)",
"title": "SVN Blamer: Toggle blame"
}
],
Expand All @@ -53,6 +59,11 @@
"description": "Enables popup revision log data. Disabling this setting will significantly speed up blame.",
"type": "boolean"
},
"svnBlamer.svnExecutablePath": {
"type": "string",
"default": "svn",
"description": "Path to svn executable or alternative command"
},
"svnBlamer.enableVisualIndicators": {
"default": true,
"description": "Enable/Disable visual indicators that sit to the left of the line number.",
Expand All @@ -73,7 +84,15 @@
"mac": "ctrl+cmd+y",
"when": "editorTextFocus"
}
]
],
"menus": {
"editor/title": [
{
"command": "blamer-vs.toggleBlame",
"group": "navigation"
}
]
}
},
"scripts": {
"compile-tests": "tsc -p . --outDir out",
Expand Down
2 changes: 1 addition & 1 deletion src/decoration-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class DecorationManager {

constructor() {
const extensionPath = extensions.getExtension(EXTENSION_ID)!.extensionPath;
this.imageDir = path.join(extensionPath, "dist", "img");
this.imageDir = path.join(extensionPath, "dist", "img", "indicators");
}

private *generator(files: string[]) {
Expand Down
8 changes: 8 additions & 0 deletions src/errors/configuration-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export class ConfigurationError extends Error {
constructor(
public property: string,
public value: any,
) {
super(`Setting: ${property} is not configured correctly. Value is "${value}"`);
}
}
1 change: 1 addition & 0 deletions src/img/icons/source-control.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Loading