Skip to content

Commit 4dce3c9

Browse files
edgardmessiasJohnstonCode
authored andcommitted
fix: Removed revert confirmation alert (close #395) (#396)
1 parent 6d67ba4 commit 4dce3c9

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@
606606
{
607607
"command": "svn.revertSelectedRanges",
608608
"group": "2_svn@3",
609-
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflicts.conflicts-diff && && svnHasSupportToRegisterDiffCommand == 1"
609+
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflicts.conflicts-diff && svnHasSupportToRegisterDiffCommand == 1"
610610
}
611611
],
612612
"explorer/context": [

src/commands/command.ts

+1-10
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ export abstract class Command implements Disposable {
3838
}
3939

4040
if (options.diff && hasSupportToRegisterDiffCommand()) {
41-
const command = this.createRepositoryCommand(this.execute);
4241
this._disposable = commands.registerDiffInformationCommand(
4342
commandName,
44-
command
43+
(...args: any[]) => this.execute(...args)
4544
);
4645
return;
4746
}
@@ -437,14 +436,6 @@ export abstract class Command implements Disposable {
437436
ref: "BASE"
438437
});
439438
const originalDocument = await workspace.openTextDocument(originalUri);
440-
const basename = path.basename(modifiedUri.fsPath);
441-
const message = `Are you sure you want to revert the selected changes in ${basename}?`;
442-
const yes = "Revert Changes";
443-
const pick = await window.showWarningMessage(message, { modal: true }, yes);
444-
445-
if (pick !== yes) {
446-
return;
447-
}
448439

449440
const result = applyLineChanges(
450441
originalDocument,

0 commit comments

Comments
 (0)