Skip to content

Commit 6a8a351

Browse files
committed
changed code styling
1 parent f91393e commit 6a8a351

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/svnContentProvider.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,35 @@ var svnSpawn = require('svn-spawn');
33
var path = require('path');
44

55
module.exports = {
6+
client: null,
7+
68
init: function() {
9+
this.client = this.createClient();
710
vscode.workspace.registerTextDocumentContentProvider('svn', this);
811
},
912

1013
provideTextDocumentContent: function(uri) {
1114
const relativePath = path.relative(vscode.workspace.rootPath, uri.fsPath).replace(/\\/g, '/');
1215

13-
var client = this.createClient();
14-
1516
return new Promise((resolve, reject) => {
16-
client.cmd(['ls', relativePath], function(err, data) {
17+
this.client.cmd(['ls', relativePath], function(err, data) {
1718
if (err) {
1819
resolve('');
1920
reject(err);
2021
}
2122
});
2223

23-
client.cmd(['cat', '-r', 'HEAD', relativePath], function(err, data) {
24+
this.client.cmd(['cat', '-r', 'HEAD', relativePath], function(err, data) {
2425
resolve(data);
2526
reject(err);
2627
});
27-
});
28+
});
2829
},
2930

30-
createClient: () => {
31+
createClient: function() {
3132
return new svnSpawn({
32-
cwd: vscode.workspace.rootPath,
33-
noAuthCache: true,
33+
cwd: vscode.workspace.rootPath,
34+
noAuthCache: true,
3435
});
3536
}
3637
};

src/svnSCM.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ module.exports = {
1717

1818
return new Uri().with({ scheme: 'svn', query: uri.path, path: uri.path});
1919
}
20-
};
20+
};

0 commit comments

Comments
 (0)