diff --git a/src/tfvc/tfvcscmprovider.ts b/src/tfvc/tfvcscmprovider.ts index 770c15b6a..71f6c0858 100644 --- a/src/tfvc/tfvcscmprovider.ts +++ b/src/tfvc/tfvcscmprovider.ts @@ -5,7 +5,8 @@ "use strict"; import { Logger } from "../helpers/logger"; -import { commands, scm, Uri, Disposable, SCMProvider, SCMResource, SCMResourceGroup, Event, EventEmitter, ProviderResult, workspace } from "vscode"; +import { TfvcCommandNames } from "../helpers/constants"; +import { CancellationToken, commands, scm, Uri, Disposable, SCMProvider, SCMResource, SCMResourceGroup, Event, EventEmitter, ProviderResult, workspace } from "vscode"; import { CommitHoverProvider } from "./scm/commithoverprovider"; import { Model } from "./scm/model"; import { Status } from "./scm/status"; @@ -241,6 +242,11 @@ export class TfvcSCMProvider implements SCMProvider { return uri.with({ scheme: TfvcSCMProvider.scmScheme }); } + acceptChanges(token: CancellationToken): ProviderResult { + console.log("acceptChanges", token); + return commands.executeCommand(TfvcCommandNames.Checkin); + } + dispose(): void { TfvcSCMProvider.instance = undefined; this.cleanup(); diff --git a/src/vscode.proposed.d.ts b/src/vscode.proposed.d.ts index cfcc7efb6..144fbbc7f 100644 --- a/src/vscode.proposed.d.ts +++ b/src/vscode.proposed.d.ts @@ -137,10 +137,12 @@ export type ProviderResult = T | undefined | null | Thenable; readonly count?: number | undefined; + readonly state?: string; getOriginalResource?(uri: Uri, token: CancellationToken): ProviderResult; open?(resource: SCMResource, token: CancellationToken): ProviderResult; drag?(resource: SCMResource, resourceGroup: SCMResourceGroup, token: CancellationToken): ProviderResult; + acceptChanges?(token: CancellationToken): ProviderResult; } export interface SCMInputBox { @@ -156,5 +158,14 @@ export type ProviderResult = T | undefined | null | Thenable; } /* tslint:enable */