Merge commit 'refs/pull/69763/head' of github.com:Microsoft/vscode into pr/69763

This commit is contained in:
Joao Moreno 2019-06-12 12:35:24 +02:00
commit fee4ee0df8

View file

@ -488,13 +488,15 @@ export class CommandCenter {
);
const choices = [];
let message = localize('proposeopen', "Would you like to open the cloned repository?");
const open = localize('openrepo', "Open Repository");
let message = localize('proposeopen', "Where would you to open the cloned repository?");
const open = localize('openrepo', "Current Window");
const openNewWindow = localize('openreponew', "New Window");
choices.push(open);
choices.push(openNewWindow);
const addToWorkspace = localize('add', "Add to Workspace");
if (workspace.workspaceFolders) {
message = localize('proposeopen2', "Would you like to open the cloned repository, or add it to the current workspace?");
message = localize('proposeopen2', "Where would you like to open the cloned repository, or add it to the current workspace?");
choices.push(addToWorkspace);
}
@ -515,6 +517,8 @@ export class CommandCenter {
commands.executeCommand('vscode.openFolder', uri);
} else if (result === addToWorkspace) {
workspace.updateWorkspaceFolders(workspace.workspaceFolders!.length, 0, { uri });
} else if (result === openNewWindow) {
commands.executeCommand('vscode.openFolder', uri, true);
}
} catch (err) {
if (/already exists and is not an empty directory/.test(err && err.stderr || '')) {
@ -600,9 +604,11 @@ export class CommandCenter {
await this.git.init(repositoryPath);
const choices = [];
let message = localize('proposeopen init', "Would you like to open the initialized repository?");
const open = localize('openrepo', "Open Repository");
let message = localize('proposeopen init', "Where would you like to open the initialized repository?");
const open = localize('openrepo', "Current Window");
const openNewWindow = localize('openreponew', "New Window");
choices.push(open);
choices.push(openNewWindow);
if (!askToOpen) {
return;
@ -610,7 +616,7 @@ export class CommandCenter {
const addToWorkspace = localize('add', "Add to Workspace");
if (workspace.workspaceFolders) {
message = localize('proposeopen2 init', "Would you like to open the initialized repository, or add it to the current workspace?");
message = localize('proposeopen2 init', "Where would you like to open the initialized repository, or add it to the current workspace?");
choices.push(addToWorkspace);
}
@ -621,6 +627,8 @@ export class CommandCenter {
commands.executeCommand('vscode.openFolder', uri);
} else if (result === addToWorkspace) {
workspace.updateWorkspaceFolders(workspace.workspaceFolders!.length, 0, { uri });
} else if (result === openNewWindow) {
commands.executeCommand('vscode.openFolder', uri, true);
} else {
await this.model.openRepository(repositoryPath);
}