Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Some fixes related to the Undo menu option and command #145

Merged
merged 2 commits into from
Mar 8, 2017
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
27 changes: 8 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
}
],
"scm/title": [
{
"command" : "team.AssociateWorkItems",
"group": "3_commit@4"
},
{
"command" : "tfvc.Checkin",
"group": "navigation@1",
Expand All @@ -65,16 +61,14 @@
"when": "scmProvider == tfvc"
},
{
"command" : "tfvc.Undo",
"group": "1_sync@2",
"command" : "tfvc.Checkin",
"group": "3_commit@1",
"when": "scmProvider == tfvc"
},
{
"command" : "tfvc.Checkin",
"group": "3_commit@3",
"when": "scmProvider == tfvc"
"command" : "team.AssociateWorkItems",
"group": "3_commit@2"
},

{
"command" : "tfvc.ShowOutput",
"group": "5_output",
Expand All @@ -95,17 +89,17 @@
{
"command": "tfvc.Undo",
"when": "scmProvider == tfvc && scmResourceGroup != conflicts",
"group": "1_modification@1"
"group": "3_commit@1"
},
{
"command": "tfvc.Include",
"when": "scmProvider == tfvc && scmResourceGroup == excluded",
"group": "1_modification@2"
"group": "1_modification@1"
},
{
"command": "tfvc.Exclude",
"when": "scmProvider == tfvc && scmResourceGroup == included",
"group": "1_modification@2"
"group": "1_modification@1"
},
{
"command": "tfvc.ResolveTakeTheirs",
Expand All @@ -124,7 +118,7 @@
},
{
"command": "tfvc.Undo",
"when": "scmProvider == tfvc && scmResourceGroup != conflicts",
"when": "scmProvider == tfvc",
"group": "inline@1"
},
{
Expand All @@ -137,11 +131,6 @@
"when": "scmProvider == tfvc && scmResourceGroup == included",
"group": "inline@2"
},
{
"command": "tfvc.Undo",
"when": "scmProvider == tfvc && scmResourceGroup == conflicts",
"group": "inline@1"
},
{
"command": "tfvc.ResolveTakeTheirs",
"when": "scmProvider == tfvc && scmResourceGroup == conflicts",
Expand Down
6 changes: 0 additions & 6 deletions src/tfvc/tfvc-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@ export class TfvcExtension {
async () => {
//When calling from UI, we have the uri of the resource from which the command was invoked
let pathToUndo: string = TfvcSCMProvider.GetPathFromUri(uri);
if (!pathToUndo) {
//This is called from the command palette, so check for an open file in the editor
if (window.activeTextEditor) {
pathToUndo = window.activeTextEditor.document.fileName;
}
}
if (pathToUndo) {
const basename: string = path.basename(pathToUndo);
const message: string = `Are you sure you want to undo changes to ${basename}?`;
Expand Down