Skip to content

Commit 600042c

Browse files
committed
Commit command now works with multi root workspaces
1 parent b885f14 commit 600042c

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ SvnCommands.prototype.commitWithMessage = async function(repository) {
7272
let message = repository.inputBox.value;
7373

7474
try {
75-
await this.svn.commit(message);
75+
await svn.commit(message);
7676
repository.inputBox.value = "";
7777
changesCommitted();
7878
} catch (error) {

src/model.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Model.prototype.getOpenRepository = function(path) {
4141
return undefined;
4242
}
4343

44+
if (path instanceof Repository) {
45+
return this.openRepositories.filter(r => r === path)[0];
46+
}
47+
4448
path = Uri.file(path);
4549

4650
for (const liveRepository of this.openRepositories) {

src/repository.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ function Repository(repository) {
1313
this.sourceControl.acceptInputCommand = {
1414
command: "svn.commitWithMessage",
1515
title: "commit",
16-
arguments: this.sourceControl
16+
arguments: [this]
1717
};
1818
this.sourceControl.quickDiffProvider = this;
19-
this.inputBox = this.sourceControl.inputBox;
19+
this.repository.inputBox = this.sourceControl.inputBox;
2020

2121
this.changes = this.sourceControl.createResourceGroup("changes", "Changes");
2222
this.notTracked = this.sourceControl.createResourceGroup(

src/svn.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ function svn(cwd = null) {
99
});
1010

1111
this.isSVNAvailable()
12-
.then(() => {})
1312
.catch(() => {
1413
vscode.window.showErrorMessage(
1514
"SVN is not avaialbe in your $PATH. svn-scm is unable to run!"

0 commit comments

Comments
 (0)