Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Removed revert confirmation alert (close #395) #396

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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