Skip to content

Commit

Permalink
fix: Removed revert confirmation alert (close #395) (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and JohnstonCode committed Oct 25, 2018
1 parent 6d67ba4 commit 4dce3c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
{
"command": "svn.revertSelectedRanges",
"group": "2_svn@3",
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflicts.conflicts-diff && && svnHasSupportToRegisterDiffCommand == 1"
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflicts.conflicts-diff && svnHasSupportToRegisterDiffCommand == 1"
}
],
"explorer/context": [
Expand Down
11 changes: 1 addition & 10 deletions src/commands/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ export abstract class Command implements Disposable {
}

if (options.diff && hasSupportToRegisterDiffCommand()) {
const command = this.createRepositoryCommand(this.execute);
this._disposable = commands.registerDiffInformationCommand(
commandName,
command
(...args: any[]) => this.execute(...args)
);
return;
}
Expand Down Expand Up @@ -437,14 +436,6 @@ export abstract class Command implements Disposable {
ref: "BASE"
});
const originalDocument = await workspace.openTextDocument(originalUri);
const basename = path.basename(modifiedUri.fsPath);
const message = `Are you sure you want to revert the selected changes in ${basename}?`;
const yes = "Revert Changes";
const pick = await window.showWarningMessage(message, { modal: true }, yes);

if (pick !== yes) {
return;
}

const result = applyLineChanges(
originalDocument,
Expand Down

0 comments on commit 4dce3c9

Please sign in to comment.