Skip to content

Commit 0d08627

Browse files
committed
Trying to get quick diff guttering to show
2 parents 4f3d9f5 + 5c09a91 commit 0d08627

File tree

2 files changed

+8
-31
lines changed

2 files changed

+8
-31
lines changed

extension.js

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// The module 'vscode' contains the VS Code extensibility API
2-
// Import the module and reference it with the alias vscode in your code below
31
var vscode = require('vscode');
42
const SvnSpawn = require('svn-spawn');
53
const path = require('path');
@@ -71,28 +69,13 @@ const updateResourceGroup = (data, type) => {
7169
return matches;
7270
}
7371

74-
// this method is called when your extension is activated
75-
// your extension is activated the very first time the command is executed
7672
function activate(context) {
77-
78-
// Use the console to output diagnostic information (console.log) and errors (console.error)
79-
// This line of code will only be executed once when your extension is activated
80-
console.log('Congratulations, your extension "svn-scm" is now active!');
81-
82-
// The command has been defined in the package.json file
83-
// Now provide the implementation of the command with registerCommand
84-
// The commandId parameter must match the command field in package.json
85-
var disposable = vscode.commands.registerCommand('extension.sayHello', function () {
86-
// The code you place here will be executed every time your command is executed
87-
88-
// Display a message box to the user
89-
vscode.window.showInformationMessage('Hello World!');
90-
});
73+
console.log('svn-scm is now active!');
9174

9275
const rootPath = vscode.workspace.rootPath;
9376
const outputChannel = createChannel();
9477
vscode.commands.registerCommand('vscode-svn.showOutputChannel', () => outputChannel.show());
95-
78+
9679
const statusBar = createStatusBar();
9780
const client = createClient(rootPath);
9881
const watcher = vscode.workspace.createFileSystemWatcher(`${rootPath}/**/*`);
@@ -116,24 +99,24 @@ function activate(context) {
11699
notTracked.hideWhenEmpty = true;
117100

118101
const main = () => {
119-
return checkAllFiles(client, statusBar)
102+
return checkAllFiles(client, statusBar)
120103
.then((data) => {
121104
modified.resourceStates = updateResourceGroup(data, 'modified');
122105
removed.resourceStates = updateResourceGroup(data, 'removed');
123106
notTracked.resourceStates = updateResourceGroup(data, 'unversioned');
124107
})
125-
.catch((err) => vscode.window.showErrorMessage(err));
108+
.catch((err) => vscode.window.showErrorMessage(err));
126109
};
127-
110+
128111
watcher.onDidChange(main);
129112
watcher.onDidCreate(main);
130113
watcher.onDidDelete(main);
131-
132-
main();
114+
115+
main();
133116

134117

135118

136-
context.subscriptions.push(disposable);
119+
context.subscriptions.push(disposable);
137120
}
138121
exports.activate = activate;
139122

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
"*"
2424
],
2525
"main": "./extension",
26-
"contributes": {
27-
"commands": [{
28-
"command": "extension.sayHello",
29-
"title": "Hello World"
30-
}]
31-
},
3226
"scripts": {
3327
"postinstall": "node ./node_modules/vscode/bin/install",
3428
"test": "node ./node_modules/vscode/bin/test"

0 commit comments

Comments
 (0)