Skip to content

Commit 6d70c33

Browse files
committed
fixed issue with opening multiple SCM
1 parent 6eb9e26 commit 6d70c33

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
- Added throttle decorators to try and limit async requests.
66
- at 8.1 as i messed versioning up.
77

8+
## Bug Fixes
9+
- Fixed issues with only one SCM being created in multi-root
10+
811
**v0.7.0**
912
=============================================
1013

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svn-scm",
33
"displayName": "svn-scm",
44
"description": "",
5-
"version": "0.8.0",
5+
"version": "0.8.1",
66
"publisher": "johnstoncode",
77
"engines": {
88
"vscode": "^1.16.0"

src/model.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ Model.prototype.getRepository = function(path) {
4141
return liveRepository && liveRepository.repository;
4242
};
4343

44-
Model.prototype.getOpenRepository = function(path) {
45-
if (!path) {
44+
Model.prototype.getOpenRepository = function(hint) {
45+
if (!hint) {
4646
return undefined;
4747
}
4848

49-
if (path instanceof Repository) {
50-
return this.openRepositories.filter(r => r === path)[0];
49+
if (hint instanceof Repository) {
50+
return this.openRepositories.filter(r => r === hint)[0];
5151
}
5252

53-
path = Uri.file(path);
53+
hint = Uri.file(hint);
5454

5555
for (const liveRepository of this.openRepositories) {
5656
const relativePath = path.relative(
5757
liveRepository.repository.root,
58-
path.fsPath
58+
hint.fsPath
5959
);
6060

6161
if (!/^\.\./.test(relativePath)) {

src/repository.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { throttleAsync } = require("./decorators");
55
function Repository(repository) {
66
this.repository = repository;
77
this.root = repository.root;
8-
this.watcher = workspace.createFileSystemWatcher("**");
8+
this.watcher = workspace.createFileSystemWatcher(this.root + "/**/*");
99
this.sourceControl = scm.createSourceControl(
1010
"svn",
1111
"svn",

0 commit comments

Comments
 (0)